void EntityClassDoom3_clear(){ for ( EntityClasses::iterator i = g_EntityClassDoom3_classes.begin(); i != g_EntityClassDoom3_classes.end(); ++i ) { ( *i ).second->free( ( *i ).second ); } g_EntityClassDoom3_classes.clear(); }
void CleanEntityList(EntityClasses& entityClasses) { for(EntityClasses::iterator i = entityClasses.begin(); i != entityClasses.end(); ++i) { (*i).second->free((*i).second); } entityClasses.clear(); }
void realise(){ if ( --m_unrealised == 0 ) { globalOutputStream() << "searching vfs directory " << makeQuoted( "def" ) << " for *.def\n"; GlobalFileSystem().forEachFile( "def/", "def", makeCallbackF(EntityClassDoom3_loadFile) ); { for ( Models::iterator i = g_models.begin(); i != g_models.end(); ++i ) { Model_resolveInheritance( ( *i ).first.c_str(), ( *i ).second ); } } { for ( EntityClasses::iterator i = g_EntityClassDoom3_classes.begin(); i != g_EntityClassDoom3_classes.end(); ++i ) { EntityClass_resolveInheritance( ( *i ).second ); if ( !string_empty( ( *i ).second->m_modelpath.c_str() ) ) { Models::iterator j = g_models.find( ( *i ).second->m_modelpath ); if ( j != g_models.end() ) { ( *i ).second->m_modelpath = ( *j ).second.m_mesh; ( *i ).second->m_skin = ( *j ).second.m_skin; } } eclass_capture_state( ( *i ).second ); StringOutputStream usage( 256 ); usage << "-------- NOTES --------\n"; if ( !string_empty( ( *i ).second->m_comments.c_str() ) ) { usage << ( *i ).second->m_comments.c_str() << "\n"; } usage << "\n-------- KEYS --------\n"; for ( EntityClassAttributes::iterator j = ( *i ).second->m_attributes.begin(); j != ( *i ).second->m_attributes.end(); ++j ) { const char* name = EntityClassAttributePair_getName( *j ); const char* description = EntityClassAttributePair_getDescription( *j ); if ( !string_equal( name, description ) ) { usage << EntityClassAttributePair_getName( *j ) << " : " << EntityClassAttributePair_getDescription( *j ) << "\n"; } } ( *i ).second->m_comments = usage.c_str(); } } m_observers.realise(); } }
void EntityClassDoom3_forEach( EntityClassVisitor& visitor ){ for ( EntityClasses::iterator i = g_EntityClassDoom3_classes.begin(); i != g_EntityClassDoom3_classes.end(); ++i ) { visitor.visit( ( *i ).second ); } }