Main Page | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals

Cfg Namespace Reference


Data Structures

class  Handler

Functions

const bool Empty (void)
void Push (Handler *aCfg)
HandlerPush (string aFile)
void Pop (const Handler &aCfg)
void Pop (void)
HandlerGetCfg (string aFile)

Variables

deque< Handler * > CfgStacks


Function Documentation

const bool Cfg::Empty void   ) 
 

Definition at line 10 of file CfgHandler.cpp.

References CfgStacks.

Referenced by Pop(), and Ars::ArsApplication::~ArsApplication().

00011 {
00012         return CfgStacks.empty();
00013 }

Handler & Cfg::GetCfg string  aFile = "Ars.Cfg"  ) 
 

Definition at line 46 of file CfgHandler.cpp.

References CfgStacks, Cfg::Handler::GetCfgFile(), and Push().

Referenced by Parameters::CreateGalaxy(), MainGame::EnableWindow(), Galaxy::evMessage(), Ars::ArsApplication::GenDefaultCfg(), Borqueror::GenDefaultCfg(), HallOfFame::HallOfFame(), Ars::ArsApplication::Init(), Ars::ExprIntParser::Init(), Ars::ExprParser::Context::Init(), Borqueror::Init(), Ars::Painter::Init(), Ars::Thing::Init(), Parameters::InitDialog(), Galaxy::Load(), Ars::Sounds::Load(), Ars::Graf::LoadImg(), MainLoad::MainLoad(), Parameters::MainLoop(), MainSave::MainSave(), Parameters::Parameters(), MainGame::PlayIntro(), Ars::Preload(), Push(), Ars::Rsrc::Rsrc(), InitGalaxyScreen::Run(), Parameters::SetupStarInfo(), Ars::XScrollBar::SetupWindow(), Ars::XMPEG::SetupWindow(), HallOfFame::SetupWindow(), GalaxyScreen::SetupWindow(), Ars::Thing::Thing(), and Ars::View::View().

00047 {
00048         if( aFile[0] == '@' )
00049                 aFile = GetCfg().GetCfgFile( "Paths" , aFile.substr( 1 ) );
00050 
00051         deque<Handler *>::iterator      pos = find_if( CfgStacks.begin() , CfgStacks.end() , bind2nd( mem_fun( &Handler::IsTheFile ) , aFile.c_str() ) );
00052 
00053         if( pos == CfgStacks.end() )
00054                 return Push( aFile );
00055         return **pos;
00056 }

void Cfg::Pop void   ) 
 

Definition at line 39 of file CfgHandler.cpp.

References CfgStacks, and Empty().

Referenced by Ars::ArsApplication::~ArsApplication().

00040 {
00041         if( !Empty() )
00042                 delete CfgStacks.back();
00043         CfgStacks.pop_back();
00044 }

void Cfg::Pop const Handler &  aCfg  ) 
 

Definition at line 29 of file CfgHandler.cpp.

References CfgStacks, and Cfg::Handler::GetFilename().

00030 {
00031         deque<Handler *>::iterator      pos = find_if( CfgStacks.begin() , CfgStacks.end() , bind2nd( mem_fun( &Handler::IsTheFile ) , aCfg.GetFilename().c_str() ) );
00032         if( pos != CfgStacks.end() )
00033         {
00034                 delete *pos;
00035                 CfgStacks.erase( pos );
00036         }
00037 }

Handler & Cfg::Push string  aFile  ) 
 

Definition at line 20 of file CfgHandler.cpp.

References CfgStacks, GetCfg(), Cfg::Handler::GetCfgFile(), and Push().

00021 {
00022         if( aFile[0] == '@' )
00023                 aFile = GetCfg().GetCfgFile( "Paths" , aFile.substr( 1 ) );
00024 
00025         Push( new Handler( aFile ) );
00026         return *CfgStacks.back();
00027 }

void Cfg::Push Handler *  aCfg  ) 
 

Definition at line 15 of file CfgHandler.cpp.

References CfgStacks.

Referenced by GetCfg(), Ars::ArsApplication::Init(), and Push().

00016 {
00017         CfgStacks.push_back( aCfg );
00018 }


Variable Documentation

deque<Handler *> Cfg::CfgStacks [static]
 

Definition at line 8 of file CfgHandler.cpp.

Referenced by Empty(), GetCfg(), Pop(), and Push().


Generated on Fri Dec 5 04:07:05 2003 for Borqueror by doxygen 1.3.3