예제 #1
0
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;
    }
}
예제 #2
0
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() );
}
예제 #3
0
void HeapLogger::unregisterEntity(CoreThread *coreThread){
#ifdef HEAPLOGGER_ENABLED
	unregisterEntity(coreThread->name);
#endif
}
예제 #4
0
void HeapLogger::unregisterEntity(CoreObject *coreObject){
#ifdef HEAPLOGGER_ENABLED
	unregisterEntity(coreObject->name);
#endif
}