EgtInterface 1.5k3 :

- esposte ulteriori funzionalità.
This commit is contained in:
Dario Sassi
2014-11-21 17:46:17 +00:00
parent 73c8bd68b0
commit 4661bb7c66
13 changed files with 629 additions and 276 deletions
+43 -5
View File
@@ -378,17 +378,34 @@ __stdcall EgtRemoveName( int nId)
BOOL
__stdcall EgtSetInfo( int nId, const wchar_t* wsKey, const wchar_t* wsInfo)
{
return EgtSetInfo( nId, wstrztoA( wsKey), wstrztoA( wsInfo)) ;
return ( EgtSetInfo( nId, wstrztoA( wsKey), wstrztoA( wsInfo)) ? TRUE : FALSE) ;
}
//-----------------------------------------------------------------------------
BOOL
bool
__stdcall EgtSetInfo( int nId, const string& sKey, const string& sInfo)
{
IGeomDB* pGeomDB = GetCurrGeomDB() ;
VERIFY_GEOMDB( pGeomDB, FALSE)
// assegno la info
return ( pGeomDB->SetInfo( nId, sKey, sInfo) ? TRUE : FALSE) ;
return pGeomDB->SetInfo( nId, sKey, sInfo) ;
}
//-----------------------------------------------------------------------------
BOOL
__stdcall EgtSetInfoInt( int nId, const wchar_t* wsKey, int nInfo)
{
return ( EgtSetInfo( nId, wstrztoA( wsKey), nInfo) ? TRUE : FALSE) ;
}
//-----------------------------------------------------------------------------
bool
__stdcall EgtSetInfo( int nId, const string& sKey, int nInfo)
{
IGeomDB* pGeomDB = GetCurrGeomDB() ;
VERIFY_GEOMDB( pGeomDB, FALSE)
// assegno la info
return pGeomDB->SetInfo( nId, sKey, nInfo) ;
}
//-----------------------------------------------------------------------------
@@ -403,15 +420,36 @@ __stdcall EgtGetInfo( int nId, const wchar_t* wsKey, wchar_t*& wsInfo)
}
//-----------------------------------------------------------------------------
BOOL
bool
__stdcall EgtGetInfo( int nId, const string& sKey, string& sInfo)
{
IGeomDB* pGeomDB = GetCurrGeomDB() ;
VERIFY_GEOMDB( pGeomDB, FALSE)
// recupero la info
// recupero info
return pGeomDB->GetInfo( nId, sKey, sInfo) ;
}
//-----------------------------------------------------------------------------
BOOL
__stdcall EgtGetInfoInt( int nId, const wchar_t* wsKey, int* pnInfo)
{
// verifico il parametro
if ( pnInfo == nullptr)
return FALSE ;
// recupero info
return ( EgtGetInfo( nId, wstrztoA( wsKey), *pnInfo) ? TRUE : FALSE) ;
}
//-----------------------------------------------------------------------------
bool
__stdcall EgtGetInfo( int nId, const string& sKey, int& nInfo)
{
IGeomDB* pGeomDB = GetCurrGeomDB() ;
VERIFY_GEOMDB( pGeomDB, FALSE)
// recupero la info
return pGeomDB->GetInfo( nId, sKey, nInfo) ;
}
//-----------------------------------------------------------------------------
BOOL
__stdcall EgtExistsInfo( int nId, const wchar_t* wsKey)