From 39e77f7d7f8a2c9148fb1c064c2e1437ad378ccb Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 9 Aug 2006 07:50:49 +0000 Subject: Renamed it, it also is no longer a singleton, although your child class could be. --- src/configmanager.cpp | 63 --------------------------------------------------- 1 file changed, 63 deletions(-) delete mode 100644 src/configmanager.cpp (limited to 'src/configmanager.cpp') diff --git a/src/configmanager.cpp b/src/configmanager.cpp deleted file mode 100644 index 6c239f8..0000000 --- a/src/configmanager.cpp +++ /dev/null @@ -1,63 +0,0 @@ -#include -#include -#include "xmlnode.h" -#include "xmlfilereader.h" -#include "configmanagerbase.h" - -ConfigManagerBase::ConfigManager() -{ -} - -ConfigManagerBase::~ConfigManager() -{ -} - -void ConfigManagerBase::addSearchPath( const std::string &sPath ) -{ - lSearchPath.push_back( sPath ); -} - -void ConfigManagerBase::loadConfig( const char *lpProfile ) -{ - // Try a few locations... - std::list::const_iterator i; - for( i = lSearchPath.begin(); i != lSearchPath.end(); i++ ) - { - if( parseConfig( (*i).c_str(), lpProfile ) ) - { - break; - } - } -} - -bool ConfigManagerBase::parseConfig( const char *lpFileName, const char *lpProfile ) -{ - XmlNode *pRoot, *pCur; - XmlFileReader doc( lpFileName ); - - pRoot = doc.getRoot(); - if( pRoot == NULL ) - { - return false; - } - - if( strcmp("config", pRoot->getName() ) ) - { - return false; - } - - for( int j = 0;; j++ ) - { - pCur = pRoot->getChild( "profile", j ); - if( pCur == NULL ) - return false; - - if( !strcmp( pCur->getProperty("id"), lpProfile ) ) - { - return processProfile( pCur ); - } - } - - return false; -} - -- cgit v1.2.3