Include :

- aggiornamento interfacce.
This commit is contained in:
Dario Sassi
2014-03-18 08:52:35 +00:00
parent 75c298a002
commit d566004aa9
7 changed files with 68 additions and 20 deletions
+6 -3
View File
@@ -58,9 +58,12 @@ class __declspec( novtable) IGdbIterator
virtual bool RevertStatus( void) = 0 ;
virtual bool GetStatus( int& nStat) const = 0 ;
virtual bool GetCalcStatus( int& nStat) const = 0 ;
virtual bool SetColor( Color cCol) = 0 ;
virtual bool GetColor( Color& cCol) const = 0 ;
virtual bool GetCalcColor( Color& cCol) const = 0 ;
virtual bool SetMaterial( int nMat) = 0 ;
virtual bool SetMaterial( Color cCol) = 0 ;
virtual bool GetMaterial( int& nMat) const = 0 ;
virtual bool GetMaterial( Color& cCol) const = 0 ;
virtual bool GetCalcMaterial( int& nMat) const = 0 ;
virtual bool GetCalcMaterial( Color& cCol) const = 0 ;
virtual bool SetName( const std::string& sName) = 0 ;
virtual bool GetName( std::string& sName) const = 0 ;
virtual bool RemoveName( void) = 0 ;
+8 -5
View File
@@ -77,11 +77,14 @@ class __declspec( novtable) IGeomDB
virtual bool RevertStatus( int nId) = 0 ;
virtual bool GetStatus( int nId, int& nStat) const = 0 ;
virtual bool GetCalcStatus( int nId, int& nStat) const = 0 ;
virtual bool SetDefaultColor( Color cCol) = 0 ;
virtual bool GetDefaultColor( Color& cCol) const = 0 ;
virtual bool SetColor( int nId, Color cCol) = 0 ;
virtual bool GetColor( int nId, Color& cCol) const = 0 ;
virtual bool GetCalcColor( int nId, Color& cCol) const = 0 ;
virtual bool SetDefaultMaterial( Color cCol) = 0 ;
virtual bool GetDefaultMaterial( Color& cCol) const = 0 ;
virtual bool SetMaterial( int nId, int nMat) = 0 ;
virtual bool SetMaterial( int nId, Color cCol) = 0 ;
virtual bool GetMaterial( int nId, int& nMat) const = 0 ;
virtual bool GetMaterial( int nId, Color& cCol) const = 0 ;
virtual bool GetCalcMaterial( int nId, int& nMat) const = 0 ;
virtual bool GetCalcMaterial( int nId, Color& cCol) const = 0 ;
virtual bool SetName( int nId, const std::string& sName) = 0 ;
virtual bool GetName( int nId, std::string& sName) const = 0 ;
virtual bool RemoveName( int nId) = 0 ;
+39 -2
View File
@@ -7,6 +7,7 @@
//
//
// Modifiche : 10.02.13 DS Creazione modulo.
// 15.03.14 DS Agg. classe wcharBuffer per buffer con Windows API.
//
//
//----------------------------------------------------------------------------
@@ -16,7 +17,10 @@
//-----------------------------------------------------------------------------
#include <windows.h>
#include <vector>
//-----------------------------------------------------------------------------
// Funzioni ausiliarie
//-----------------------------------------------------------------------------
template <class _CharType>
inline void SmartAllocMemory( _CharType** ppBuff, int nLength, _CharType* pszFixedBuffer, int nFixedBufferLength)
@@ -121,8 +125,11 @@ inline bool IsTextUtf8( const char* psz)
return true ;
}
//-----------------------------------------------------------------------------
template< int t_nBufferLength = 128 >
//! Classe per convertire stringhe A (char UTF-8) in stringhe W (wchar_t UTF-16)
//-----------------------------------------------------------------------------
template< int t_nBufferLength = 128>
class AtoWEX
{
public :
@@ -182,8 +189,11 @@ class AtoWEX
typedef AtoWEX<> AtoW ;
#define stringtoW(s) LPWSTR( AtoW( s.c_str()))
//-----------------------------------------------------------------------------
template < int t_nBufferLength = 128 >
//! Classe per convertire stringhe W (wchar_t UTF-16) in stringhe A (char UTF-8)
//-----------------------------------------------------------------------------
template < int t_nBufferLength = 128>
class WtoAEX
{
public :
@@ -245,3 +255,30 @@ class WtoAEX
typedef WtoAEX<> WtoA ;
#define wstringtoA(ws) LPSTR( WtoA( ws.c_str()))
//-----------------------------------------------------------------------------
//! Classe contenente un buffer di wchar_t da passare alle funzioni Unicode delle API
//! di Windows, con metodo per terminarlo e macro per convertirlo in char UTF-8.<BR>
//! Esempio di utilizzo :<PRE>
//! wcharBuffer wBuffer( nLen) ;
//! int nChar = GetLine( nCurrLine, wBuffer.data(), nLen) ;
//! wBuffer.terminate( nChar) ;
//! string sCmd = wcharBtoA( wBuffer) ; </PRE>
//----------------------------------------------------------------------------
class wcharBuffer
{
public :
wcharBuffer( size_t nDim)
{ m_wBuffer.resize( nDim) ; }
wchar_t* data( void)
{ return m_wBuffer.data() ; }
void terminate( size_t nLen)
{ nLen = min( nLen, m_wBuffer.size() - 1) ;
m_wBuffer[nLen] = '\0' ; }
private :
std::vector<wchar_t> m_wBuffer ;
} ;
#define wcharBtoA(wcB) LPSTR( WtoA( wcB.data()))
+5 -2
View File
@@ -1,7 +1,7 @@
//----------------------------------------------------------------------------
// EgalTech 2013-2013
// EgalTech 2013-2014
//----------------------------------------------------------------------------
// File : EgnStringUtils.h Data : 20.11.13 Versione : 1.3a1
// File : EgnStringUtils.h Data : 17.03.14 Versione : 1.5c2
// Contenuto : Dichiarazione delle funzioni di utilità per le stringhe.
//
//
@@ -110,3 +110,6 @@ EGN_EXPORT bool Tokenize( const std::string& sString, const std::string& sSepara
//----------------------------------------------------------------------------
EGN_EXPORT int ReplaceString( std::string& sString, const std::string& sOld, const std::string& sNew) ;
//----------------------------------------------------------------------------
EGN_EXPORT const std::string CurrDateTime( void) ;
+1
View File
@@ -23,5 +23,6 @@ class __declspec( novtable) ICmdExecutor
public :
virtual bool SetCmdParser( ICmdParser* pParser) = 0 ;
virtual bool AddExecutor( ICmdExecutor* pOtherExec) = 0 ;
virtual bool AddStandardVariables( void) = 0 ;
virtual bool Execute( const std::string& sCmd1, const std::string& sCmd2, const STRVECTOR& vsParams) = 0 ;
} ;
+7 -6
View File
@@ -1,13 +1,13 @@
//----------------------------------------------------------------------------
// EgalTech 2013-2013
// EgalTech 2013-2014
//----------------------------------------------------------------------------
// File : EgnCmdParser.h Data : 25.11.13 Versione : 1.3a1
// File : EgnCmdParser.h Data : 15.03.14 Versione : 1.5c
// Contenuto : Dichiarazione della interfaccia ICmdParser.
//
//
//
// Modifiche : 25.11.13 DS Creazione modulo.
//
// 15.03.14 DS Agg. ExecuteLine.
//
//----------------------------------------------------------------------------
@@ -31,12 +31,13 @@ class __declspec( novtable) ICmdParser
{
public :
virtual ~ICmdParser( void) {}
virtual bool Init( ICmdExecutor* pCmdExec, int nLev = 0) = 0 ;
virtual bool Run( const std::string& sCmdFile) = 0 ;
virtual bool Init( ICmdExecutor* pCmdExec) = 0 ;
virtual bool Run( const std::string& sCmdFile, bool bIsolated = true) = 0 ;
virtual bool ExecLine( const std::string& sCmdLine, bool bIsolated = false) = 0 ;
virtual bool AddVariable( const std::string& sName, int nVal) = 0 ;
virtual bool SetVariable( const std::string& sName, int nVal) = 0 ;
virtual bool GetVariable( const std::string& sName, int& nVal) = 0 ;
virtual bool EraseVariable( const std::string& sName) = 0 ;
virtual bool RemoveVariable( const std::string& sName) = 0 ;
} ;
//-----------------------------------------------------------------------------
+2 -2
View File
@@ -202,8 +202,8 @@ namespace egtlogger
char strDate[10] = { '\0'} ;
char strTime[10] = { '\0'} ;
_strdate_s( strDate, 10) ;
_strtime_s( strTime, 10) ;
_strdate_s( strDate) ;
_strtime_s( strTime) ;
(*strm) << strDate << " " << strTime ;