EgtInterface 1.5j4 :
- ora si imposta un context corrente anche per le API come per LUA - il context corrente di LUA coincide con quello delle API.
This commit is contained in:
+66
-66
@@ -25,9 +25,9 @@ using namespace std ;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtSetLevel( int nGseCtx, int nId, int nLevel)
|
||||
__stdcall EgtSetLevel( int nId, int nLevel)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, FALSE)
|
||||
// imposto il livello
|
||||
return ( pGeomDB->SetLevel( nId, nLevel) ? TRUE : FALSE) ;
|
||||
@@ -35,9 +35,9 @@ __stdcall EgtSetLevel( int nGseCtx, int nId, int nLevel)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtRevertLevel( int nGseCtx, int nId)
|
||||
__stdcall EgtRevertLevel( int nId)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, FALSE)
|
||||
// porto il livello allo stato precedente
|
||||
return ( pGeomDB->RevertLevel( nId) ? TRUE : FALSE) ;
|
||||
@@ -45,9 +45,9 @@ __stdcall EgtRevertLevel( int nGseCtx, int nId)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtGetLevel( int nGseCtx, int nId, int* pnLevel)
|
||||
__stdcall EgtGetLevel( int nId, int* pnLevel)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, FALSE)
|
||||
// verifico il parametro
|
||||
if ( pnLevel == nullptr)
|
||||
@@ -58,9 +58,9 @@ __stdcall EgtGetLevel( int nGseCtx, int nId, int* pnLevel)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtGetCalcLevel( int nGseCtx, int nId, int* pnLevel)
|
||||
__stdcall EgtGetCalcLevel( int nId, int* pnLevel)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, FALSE)
|
||||
// verifico il parametro
|
||||
if ( pnLevel == nullptr)
|
||||
@@ -71,9 +71,9 @@ __stdcall EgtGetCalcLevel( int nGseCtx, int nId, int* pnLevel)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtSetMode( int nGseCtx, int nId, int nMode)
|
||||
__stdcall EgtSetMode( int nId, int nMode)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, FALSE)
|
||||
// imposto il modo
|
||||
return ( pGeomDB->SetMode( nId, nMode) ? TRUE : FALSE) ;
|
||||
@@ -81,9 +81,9 @@ __stdcall EgtSetMode( int nGseCtx, int nId, int nMode)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtRevertMode( int nGseCtx, int nId)
|
||||
__stdcall EgtRevertMode( int nId)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, FALSE)
|
||||
// porto il modo allo stato precedente
|
||||
return ( pGeomDB->RevertMode( nId) ? TRUE : FALSE) ;
|
||||
@@ -91,9 +91,9 @@ __stdcall EgtRevertMode( int nGseCtx, int nId)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtGetMode( int nGseCtx, int nId, int* pnMode)
|
||||
__stdcall EgtGetMode( int nId, int* pnMode)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, FALSE)
|
||||
// verifico il parametro
|
||||
if ( pnMode == nullptr)
|
||||
@@ -104,9 +104,9 @@ __stdcall EgtGetMode( int nGseCtx, int nId, int* pnMode)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtGetCalcMode( int nGseCtx, int nId, int* pnMode)
|
||||
__stdcall EgtGetCalcMode( int nId, int* pnMode)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, FALSE)
|
||||
// verifico il parametro
|
||||
if ( pnMode == nullptr)
|
||||
@@ -117,9 +117,9 @@ __stdcall EgtGetCalcMode( int nGseCtx, int nId, int* pnMode)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtSetStatus( int nGseCtx, int nId, int nStat)
|
||||
__stdcall EgtSetStatus( int nId, int nStat)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, FALSE)
|
||||
// imposto il modo
|
||||
return ( pGeomDB->SetStatus( nId, nStat) ? TRUE : FALSE) ;
|
||||
@@ -127,9 +127,9 @@ __stdcall EgtSetStatus( int nGseCtx, int nId, int nStat)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtRevertStatus( int nGseCtx, int nId)
|
||||
__stdcall EgtRevertStatus( int nId)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, FALSE)
|
||||
// porto lo stato al valore precedente
|
||||
return ( pGeomDB->RevertStatus( nId) ? TRUE : FALSE) ;
|
||||
@@ -137,9 +137,9 @@ __stdcall EgtRevertStatus( int nGseCtx, int nId)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtGetStatus( int nGseCtx, int nId, int* pnStat)
|
||||
__stdcall EgtGetStatus( int nId, int* pnStat)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, FALSE)
|
||||
// verifico il parametro
|
||||
if ( pnStat == nullptr)
|
||||
@@ -150,9 +150,9 @@ __stdcall EgtGetStatus( int nGseCtx, int nId, int* pnStat)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtGetCalcStatus( int nGseCtx, int nId, int* pnStat)
|
||||
__stdcall EgtGetCalcStatus( int nId, int* pnStat)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, FALSE)
|
||||
// verifico il parametro
|
||||
if ( pnStat == nullptr)
|
||||
@@ -163,9 +163,9 @@ __stdcall EgtGetCalcStatus( int nGseCtx, int nId, int* pnStat)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtSetMark( int nGseCtx, int nId)
|
||||
__stdcall EgtSetMark( int nId)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, FALSE)
|
||||
// imposto l'evidenziazione
|
||||
return ( pGeomDB->SetMark( nId) ? TRUE : FALSE) ;
|
||||
@@ -173,9 +173,9 @@ __stdcall EgtSetMark( int nGseCtx, int nId)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtResetMark( int nGseCtx, int nId)
|
||||
__stdcall EgtResetMark( int nId)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, FALSE)
|
||||
// cancello l'evidenziazione
|
||||
return ( pGeomDB->ResetMark( nId) ? TRUE : FALSE) ;
|
||||
@@ -183,9 +183,9 @@ __stdcall EgtResetMark( int nGseCtx, int nId)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtGetMark( int nGseCtx, int nId, BOOL* pbMark)
|
||||
__stdcall EgtGetMark( int nId, BOOL* pbMark)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, FALSE)
|
||||
// verifico il parametro
|
||||
if ( pbMark == nullptr)
|
||||
@@ -196,9 +196,9 @@ __stdcall EgtGetMark( int nGseCtx, int nId, BOOL* pbMark)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtGetCalcMark( int nGseCtx, int nId, BOOL* pbMark)
|
||||
__stdcall EgtGetCalcMark( int nId, BOOL* pbMark)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, FALSE)
|
||||
// verifico il parametro
|
||||
if ( pbMark == nullptr)
|
||||
@@ -233,9 +233,9 @@ __stdcall EgtStdColor( const string& sName, int& nRed, int& nGreen, int& nBlue,
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtSetColor( int nGseCtx, int nId, int nRed, int nGreen, int nBlue, int nAlpha)
|
||||
__stdcall EgtSetColor( int nId, int nRed, int nGreen, int nBlue, int nAlpha)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, FALSE)
|
||||
// assegno il colore
|
||||
Color cCol( nRed, nGreen, nBlue, nAlpha) ;
|
||||
@@ -244,9 +244,9 @@ __stdcall EgtSetColor( int nGseCtx, int nId, int nRed, int nGreen, int nBlue, in
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtGetColor( int nGseCtx, int nId, int& nRed, int& nGreen, int& nBlue, int& nAlpha)
|
||||
__stdcall EgtGetColor( int nId, int& nRed, int& nGreen, int& nBlue, int& nAlpha)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, FALSE)
|
||||
// recupero il colore
|
||||
Color cCol ;
|
||||
@@ -263,9 +263,9 @@ __stdcall EgtGetColor( int nGseCtx, int nId, int& nRed, int& nGreen, int& nBlue,
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtGetCalcColor( int nGseCtx, int nId, int& nRed, int& nGreen, int& nBlue, int& nAlpha)
|
||||
__stdcall EgtGetCalcColor( int nId, int& nRed, int& nGreen, int& nBlue, int& nAlpha)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, FALSE)
|
||||
// recupero il colore
|
||||
Color cCol ;
|
||||
@@ -282,16 +282,16 @@ __stdcall EgtGetCalcColor( int nGseCtx, int nId, int& nRed, int& nGreen, int& nB
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtSetName( int nGseCtx, int nId, const wchar_t* wsName)
|
||||
__stdcall EgtSetName( int nId, const wchar_t* wsName)
|
||||
{
|
||||
return EgtSetName( nGseCtx, nId, wstrztoA( wsName)) ;
|
||||
return EgtSetName( nId, wstrztoA( wsName)) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtSetName( int nGseCtx, int nId, const string& sName)
|
||||
__stdcall EgtSetName( int nId, const string& sName)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, FALSE)
|
||||
// assegno il nome
|
||||
return ( pGeomDB->SetName( nId, sName) ? TRUE : FALSE) ;
|
||||
@@ -299,10 +299,10 @@ __stdcall EgtSetName( int nGseCtx, int nId, const string& sName)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtGetName( int nGseCtx, int nId, wchar_t*& wsName)
|
||||
__stdcall EgtGetName( int nId, wchar_t*& wsName)
|
||||
{
|
||||
string sName ;
|
||||
if ( ! EgtGetName( nGseCtx, nId, sName))
|
||||
if ( ! EgtGetName( nId, sName))
|
||||
return FALSE ;
|
||||
wsName = _wcsdup( stringtoW( sName)) ;
|
||||
return (( wsName == nullptr) ? FALSE : TRUE) ;
|
||||
@@ -310,9 +310,9 @@ __stdcall EgtGetName( int nGseCtx, int nId, wchar_t*& wsName)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtGetName( int nGseCtx, int nId, string& sName)
|
||||
__stdcall EgtGetName( int nId, string& sName)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, FALSE)
|
||||
// recupero il nome
|
||||
return pGeomDB->GetName( nId, sName) ;
|
||||
@@ -320,9 +320,9 @@ __stdcall EgtGetName( int nGseCtx, int nId, string& sName)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtExistsName( int nGseCtx, int nId)
|
||||
__stdcall EgtExistsName( int nId)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, FALSE)
|
||||
// verifico esistenza del nome
|
||||
return ( pGeomDB->ExistsName( nId) ? TRUE : FALSE) ;
|
||||
@@ -330,9 +330,9 @@ __stdcall EgtExistsName( int nGseCtx, int nId)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtRemoveName( int nGseCtx, int nId)
|
||||
__stdcall EgtRemoveName( int nId)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, FALSE)
|
||||
// rimuovo il nome
|
||||
return ( pGeomDB->RemoveName( nId) ? TRUE : FALSE) ;
|
||||
@@ -340,16 +340,16 @@ __stdcall EgtRemoveName( int nGseCtx, int nId)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtSetInfo( int nGseCtx, int nId, const wchar_t* wsKey, const wchar_t* wsInfo)
|
||||
__stdcall EgtSetInfo( int nId, const wchar_t* wsKey, const wchar_t* wsInfo)
|
||||
{
|
||||
return EgtSetInfo( nGseCtx, nId, wstrztoA( wsKey), wstrztoA( wsInfo)) ;
|
||||
return EgtSetInfo( nId, wstrztoA( wsKey), wstrztoA( wsInfo)) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtSetInfo( int nGseCtx, int nId, const string& sKey, const string& sInfo)
|
||||
__stdcall EgtSetInfo( int nId, const string& sKey, const string& sInfo)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, FALSE)
|
||||
// assegno la info
|
||||
return ( pGeomDB->SetInfo( nId, sKey, sInfo) ? TRUE : FALSE) ;
|
||||
@@ -357,10 +357,10 @@ __stdcall EgtSetInfo( int nGseCtx, int nId, const string& sKey, const string& sI
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtGetInfo( int nGseCtx, int nId, const wchar_t* wsKey, wchar_t*& wsInfo)
|
||||
__stdcall EgtGetInfo( int nId, const wchar_t* wsKey, wchar_t*& wsInfo)
|
||||
{
|
||||
string sInfo ;
|
||||
if ( ! EgtGetInfo( nGseCtx, nId, wstrztoA( wsKey), sInfo))
|
||||
if ( ! EgtGetInfo( nId, wstrztoA( wsKey), sInfo))
|
||||
return FALSE ;
|
||||
wsInfo = _wcsdup( stringtoW( sInfo)) ;
|
||||
return (( wsInfo == nullptr) ? FALSE : TRUE) ;
|
||||
@@ -368,9 +368,9 @@ __stdcall EgtGetInfo( int nGseCtx, int nId, const wchar_t* wsKey, wchar_t*& wsIn
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtGetInfo( int nGseCtx, int nId, const string& sKey, string& sInfo)
|
||||
__stdcall EgtGetInfo( int nId, const string& sKey, string& sInfo)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, FALSE)
|
||||
// recupero la info
|
||||
return pGeomDB->GetInfo( nId, sKey, sInfo) ;
|
||||
@@ -378,16 +378,16 @@ __stdcall EgtGetInfo( int nGseCtx, int nId, const string& sKey, string& sInfo)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtExistsInfo( int nGseCtx, int nId, const wchar_t* wsKey)
|
||||
__stdcall EgtExistsInfo( int nId, const wchar_t* wsKey)
|
||||
{
|
||||
return EgtExistsInfo( nGseCtx, nId, wstrztoA( wsKey)) ;
|
||||
return EgtExistsInfo( nId, wstrztoA( wsKey)) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtExistsInfo( int nGseCtx, int nId, const string& sKey)
|
||||
__stdcall EgtExistsInfo( int nId, const string& sKey)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, FALSE)
|
||||
// verifico esistenza info
|
||||
return ( pGeomDB->ExistsInfo( nId, sKey) ? TRUE : FALSE) ;
|
||||
@@ -395,16 +395,16 @@ __stdcall EgtExistsInfo( int nGseCtx, int nId, const string& sKey)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtRemoveInfo( int nGseCtx, int nId, const wchar_t* wsKey)
|
||||
__stdcall EgtRemoveInfo( int nId, const wchar_t* wsKey)
|
||||
{
|
||||
return EgtRemoveInfo( nGseCtx, nId, wstrztoA( wsKey)) ;
|
||||
return EgtRemoveInfo( nId, wstrztoA( wsKey)) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtRemoveInfo( int nGseCtx, int nId, const string& sKey)
|
||||
__stdcall EgtRemoveInfo( int nId, const string& sKey)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, FALSE)
|
||||
// rimuovo la info
|
||||
return ( pGeomDB->RemoveInfo( nId, sKey) ? TRUE : FALSE) ;
|
||||
|
||||
Reference in New Issue
Block a user