Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

PANA_CfgManager Class Reference

#include <pana_config_manager.h>

List of all members.

Public Member Functions

 PANA_CfgManager ()
virtual ~PANA_CfgManager ()
void open (std::string &cfg_file)
void close ()
PANA_Cfg & data ()
PANA_CfgGeneralgeneral ()
PANA_CfgClientclient ()
PANA_CfgAuthAgentauthAgent ()


Detailed Description

Configuration loader. Abstraction class for populating PANA_Cfg structures from the windows registry or XML configuration file.

Definition at line 252 of file pana_config_manager.h.


Constructor & Destructor Documentation

PANA_CfgManager::PANA_CfgManager  ) 
 

constructor - set's default values into PANA_Cfg

Definition at line 581 of file pana_config_manager.cxx.

00582 {
00583 }

PANA_CfgManager::~PANA_CfgManager  )  [virtual]
 

destructor

Definition at line 585 of file pana_config_manager.cxx.

00586 {
00587     // do nothing
00588 }


Member Function Documentation

PANA_CfgAuthAgent& PANA_CfgManager::authAgent  )  [inline]
 

Access function for auth agent configuration

Definition at line 298 of file pana_config_manager.h.

00298 { return data_.auth_agent_; }

PANA_CfgClient& PANA_CfgManager::client  )  [inline]
 

Access function for client configuration

Definition at line 293 of file pana_config_manager.h.

00293 { return data_.client_; }

void PANA_CfgManager::close  ) 
 

Closes data manager. Currently this is merely resets configuration to defaults

Definition at line 603 of file pana_config_manager.cxx.

00604 {
00605    // free up allocated provider list
00606    PANA_CfgProviderInfo *i;
00607    PANA_CfgProviderList &ispList = data_.auth_agent_.isp_info_;
00608 
00609    while (! ispList.empty()) {
00610       i = ispList.front();
00611       if (i) {
00612          delete i;
00613       }
00614       ispList.pop_front();
00615    }
00616 }

PANA_Cfg& PANA_CfgManager::data  )  [inline]
 

Access functions for PANA_Cfg

Definition at line 283 of file pana_config_manager.h.

00283 { return data_; }

PANA_CfgGeneral& PANA_CfgManager::general  )  [inline]
 

Access function for general configuration

Definition at line 288 of file pana_config_manager.h.

00288 { return data_.general_; }

void PANA_CfgManager::open std::string &  cfg_file  ) 
 

Loads data from platform specific database into run-time configuration.

Parameters:
cfg_file XML configuration file. This will not be used in the case of windows.

Definition at line 590 of file pana_config_manager.cxx.

00591 {
00592     std::string cfgRoot = "pana_configuration";
00593 
00594     PANA_XMLTreeParser parser;
00595     PANA_XMLData configData(cfgRoot, data_);
00596 
00597     if (parser.open(cfg_file, configData) != 0) {
00598         throw (PANA_Exception(PANA_Exception::CONFIG_ERROR, 
00599                               "Fatal: Unable to parse XML config file"));
00600     }
00601 }


The documentation for this class was generated from the following files:
Generated on Fri Jun 25 19:18:30 2004 for PANA by doxygen 1.3.5