EgtExecutor :

- aggiunta funzione ExeGetNameInGroup, semplificata di conseguenza LuaGetNameInGroup
- piccole migliorie a exe/lua GetInfoInGroup.
This commit is contained in:
Dario Sassi
2024-12-23 12:04:47 +01:00
parent 057e9b1169
commit 5da9e0a1dd
2 changed files with 42 additions and 28 deletions
+19 -1
View File
@@ -219,12 +219,30 @@ ExeGetPrevName( int nId, const string& sName)
return pGeomDB->GetPrevName( nId, sName) ;
}
//-----------------------------------------------------------------------------
bool
ExeGetNameInGroup( int nGroupId, const string& sName, INTVECTOR& vIds)
{
IGeomDB* pGeomDB = GetCurrGeomDB() ;
VERIFY_GEOMDB( pGeomDB, false)
if ( ! pGeomDB->ExistsObj( nGroupId))
return false ;
// recupero gli oggetti con il nome desiderato
vIds.clear() ;
int nId = pGeomDB->GetFirstNameInGroup( nGroupId, sName) ;
while ( nId != GDB_ID_NULL) {
vIds.push_back( nId) ;
nId = pGeomDB->GetNextName( nId, sName) ;
}
return true ;
}
//-----------------------------------------------------------------------------
bool
ExeGetInfoInGroup( int nGroupId, const string& sKey, INTVECTOR& vIds)
{
IGeomDB* pGeomDB = GetCurrGeomDB() ;
VERIFY_GEOMDB( pGeomDB, GDB_ID_NULL)
VERIFY_GEOMDB( pGeomDB, false)
if ( ! pGeomDB->ExistsObj( nGroupId))
return false ;
// recupero gli oggetti con l'info desiderata