EgtExecutor :
- aggiunta funzione Exe e Lua GetAllInGroup.
This commit is contained in:
@@ -74,6 +74,30 @@ ExeGetGroupObjs( int nId)
|
||||
return pGeomDB->GetGroupObjs( nId) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeGetAllInGroup( int nGroupId, INTVECTOR& vIds)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, false)
|
||||
// recupero il numero di oggetti nel gruppo
|
||||
if ( ! pGeomDB->ExistsObj( nGroupId))
|
||||
return false ;
|
||||
// preparo il riempimento del vettore
|
||||
vIds.clear() ;
|
||||
int nCount = pGeomDB->GetGroupObjs( nGroupId) ;
|
||||
if ( nCount == 0)
|
||||
return true ;
|
||||
vIds.reserve( nCount) ;
|
||||
// eseguo il riempimento
|
||||
int nEntId = pGeomDB->GetFirstInGroup( nGroupId) ;
|
||||
while ( nEntId != GDB_ID_NULL) {
|
||||
vIds.emplace_back( nEntId) ;
|
||||
nEntId = pGeomDB->GetNext( nEntId) ;
|
||||
}
|
||||
return true ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
int
|
||||
ExeGetFirstInGroup( int nGroupId)
|
||||
|
||||
Reference in New Issue
Block a user