void System::unregisterEntity( EntityType const& anEntityType, String const& anID ) { switch ( anEntityType ) { case EntityType::VARIABLE: { VariableMap::iterator i( theVariableMap.find( anID ) ); if ( i == theVariableMap.end() ) { THROW_EXCEPTION_INSIDE( NotFound, asString() + ": Variable [" + anID + "] is not associated." ); } unregisterEntity( i ); } break; case EntityType::PROCESS: { ProcessMap::iterator i( theProcessMap.find( anID ) ); if ( i == theProcessMap.end() ) { THROW_EXCEPTION_INSIDE( NotFound, asString() + ": Process [" + anID + "] is not associated." ); } unregisterEntity( i ); } break; case EntityType::SYSTEM: { SystemMap::iterator i( theSystemMap.find( anID ) ); if ( i == theSystemMap.end() ) { THROW_EXCEPTION_INSIDE( NotFound, asString() + ": System [" + anID + "] is not associated." ); } unregisterEntity( i ); } break; } }
void System::unregisterEntity( Entity* anEntity ) { System const* const aSuperSystem( anEntity->getSuperSystem() ); if ( !aSuperSystem ) { THROW_EXCEPTION_INSIDE( NotFound, asString() + ": " + anEntity->asString() + " is not associated to any System" ); } if ( aSuperSystem != this ) { THROW_EXCEPTION_INSIDE( NotFound, asString() + ": " + anEntity->asString() + " is associated to another system" ); } unregisterEntity( anEntity->getEntityType(), anEntity->getID() ); }
void HeapLogger::unregisterEntity(CoreThread *coreThread){ #ifdef HEAPLOGGER_ENABLED unregisterEntity(coreThread->name); #endif }
void HeapLogger::unregisterEntity(CoreObject *coreObject){ #ifdef HEAPLOGGER_ENABLED unregisterEntity(coreObject->name); #endif }