Configuration Class Reference

#include <Configuration.h>

Collaboration diagram for Configuration:

Collaboration graph
[legend]
List of all members.

Public Types

typedef XMLnode::KeyType KeyType
typedef XMLnode::KeyTypeList KeyTypeList

Public Member Functions

 Configuration ()
 Configuration (const std::string &fname, const std::string &root)
 ~Configuration ()
bool read_config_file (const std::string &input_filename, const std::string &root=std::string())
bool read_abs_config_file (const std::string &input_filename, const std::string &root=std::string())
bool read_config_string (const std::string &)
void value (const std::string &key, std::string &ret, const char *defaultvalue="") const
void value (const std::string &key, bool &ret, bool defaultvalue=false) const
void value (const std::string &key, int &ret, int defaultvalue=0) const
void value (const char *key, std::string &ret, const char *defaultvalue="") const
void value (const char *key, bool &ret, bool defaultvalue=false) const
void value (const char *key, int &ret, int defaultvalue=0) const
void set (const std::string &key, const std::string &value, bool write_to_file)
void set (const char *key, const char *value, bool write_to_file)
void set (const char *key, const std::string &value, bool write_to_file)
void set (const char *key, int, bool write_to_file)
std::vector< std::string > listkeys (const std::string &key, bool longformat=true)
std::vector< std::string > listkeys (const char *key, bool longformat=true)
std::string dump (void)
std::ostream & dump (std::ostream &o, const std::string &indentstr)
void write_back (void)
void clear (const std::string &new_root=std::string())
void getsubkeys (KeyTypeList &ktl, const std::string &basekey)

Private Attributes

XMLnodexmltree
std::string rootname
std::string filename
bool is_file

Detailed Description

Definition at line 25 of file Configuration.h.


Member Typedef Documentation

typedef XMLnode::KeyType Configuration::KeyType

Definition at line 69 of file Configuration.h.

typedef XMLnode::KeyTypeList Configuration::KeyTypeList

Definition at line 70 of file Configuration.h.


Constructor & Destructor Documentation

Configuration::Configuration (  )  [inline]

Definition at line 28 of file Configuration.h.

Configuration::Configuration ( const std::string &  fname,
const std::string &  root 
) [inline]

Definition at line 31 of file Configuration.h.

References read_config_file().

Here is the call graph for this function:

Configuration::~Configuration (  )  [inline]

Definition at line 35 of file Configuration.h.

References xmltree.


Member Function Documentation

bool Configuration::read_config_file ( const std::string &  input_filename,
const std::string &  root = std::string() 
)

Referenced by Configuration(), exult_main(), ExultStudio::ExultStudio(), main(), test1(), and test2().

bool Configuration::read_abs_config_file ( const std::string &  input_filename,
const std::string &  root = std::string() 
)

Referenced by exult_main().

bool Configuration::read_config_string ( const std::string &   ) 

void Configuration::value ( const std::string &  key,
std::string &  ret,
const char *  defaultvalue = "" 
) const

Referenced by Audio::Audio(), BuildGameMap(), Audio::can_sfx(), Game::create_game(), ExultStudio::create_new_game(), XMIDI::ExtractTracks(), exult_main(), ExultStudio::ExultStudio(), Game_window::Game_window(), ucxtInit::get_datadir(), get_game_paths(), get_play_1st_scene(), get_play_intro(), Gump_manager::Gump_manager(), Init(), Cheat::init(), MyMidiPlayer::init_device(), Game_window::init_files(), Audio::Init_sfx(), Face_stats::load_config(), AudioOptions_gump::load_settings(), Game_window::lose_focus(), open_usecode_file(), process_ops(), Game_window::setup_game(), Shape_manager::Shape_manager(), test1(), Cheat::toggle_map_editor(), and value().

void Configuration::value ( const std::string &  key,
bool &  ret,
bool  defaultvalue = false 
) const

void Configuration::value ( const std::string &  key,
int &  ret,
int  defaultvalue = 0 
) const

void Configuration::value ( const char *  key,
std::string &  ret,
const char *  defaultvalue = "" 
) const [inline]

Definition at line 46 of file Configuration.h.

References value().

Here is the call graph for this function:

void Configuration::value ( const char *  key,
bool &  ret,
bool  defaultvalue = false 
) const [inline]

Definition at line 48 of file Configuration.h.

References value().

Here is the call graph for this function:

void Configuration::value ( const char *  key,
int &  ret,
int  defaultvalue = 0 
) const [inline]

Definition at line 50 of file Configuration.h.

References value().

Here is the call graph for this function:

void Configuration::set ( const std::string &  key,
const std::string &  value,
bool  write_to_file 
)

Referenced by Audio::Audio(), BuildGameMap(), change_gamma(), ExultStudio::create_new_game(), XMIDI::ExtractTracks(), exult_main(), ExultStudio::ExultStudio(), Game_window::Game_window(), get_game_paths(), Gump_manager::Gump_manager(), Init(), MyMidiPlayer::init_device(), Game_window::init_files(), AudioOptions_gump::load_settings(), CheatScreen::NormalActivate(), process_ops(), Face_stats::save_config(), ExultStudio::save_preferences(), VideoOptions_gump::save_settings(), GameplayOptions_gump::save_settings(), CombatOptions_gump::save_settings(), AudioOptions_gump::save_settings(), set(), MyMidiPlayer::set_effects_conversion(), Cheat::set_enabled(), MyMidiPlayer::set_music_conversion(), MyMidiPlayer::set_output_driver_type(), set_play_1st_scene(), set_play_intro(), set_resolution(), ExultMenu::setup(), Shape_manager::Shape_manager(), test1(), File_gump::toggle_option(), and ExultStudio::~ExultStudio().

void Configuration::set ( const char *  key,
const char *  value,
bool  write_to_file 
)

Definition at line 105 of file Configuration.cc.

References k, and set().

Here is the call graph for this function:

void Configuration::set ( const char *  key,
const std::string &  value,
bool  write_to_file 
)

void Configuration::set ( const char *  key,
int  ,
bool  write_to_file 
)

Definition at line 117 of file Configuration.cc.

References k, set(), and snprintf.

Here is the call graph for this function:

std::vector<std::string> Configuration::listkeys ( const std::string &  key,
bool  longformat = true 
)

Referenced by exult_main(), listkeys(), ucxtInit::opcodes(), and test1().

std::vector< string > Configuration::listkeys ( const char *  key,
bool  longformat = true 
)

Definition at line 271 of file Configuration.cc.

References listkeys(), and s.

Here is the call graph for this function:

string Configuration::dump ( void   ) 

Definition at line 227 of file Configuration.cc.

References XMLnode::dump(), and xmltree.

Referenced by test1(), test2(), and write_back().

Here is the call graph for this function:

std::ostream& Configuration::dump ( std::ostream &  o,
const std::string &  indentstr 
)

void Configuration::write_back ( void   ) 

Definition at line 238 of file Configuration.cc.

References dump(), filename, is_file, and U7open().

Referenced by main().

Here is the call graph for this function:

void Configuration::clear ( const std::string &  new_root = std::string()  ) 

Referenced by test1().

void Configuration::getsubkeys ( KeyTypeList ktl,
const std::string &  basekey 
)

Referenced by ucxtInit::misc(), and ucxtInit::opcodes().


Member Data Documentation

XMLnode* Configuration::xmltree [private]

Definition at line 75 of file Configuration.h.

Referenced by dump(), and ~Configuration().

std::string Configuration::rootname [private]

Definition at line 76 of file Configuration.h.

std::string Configuration::filename [private]

Definition at line 77 of file Configuration.h.

Referenced by write_back().

bool Configuration::is_file [private]

Definition at line 78 of file Configuration.h.

Referenced by write_back().


The documentation for this class was generated from the following files:
Generated on Mon Jul 9 14:49:15 2007 for ExultEngine by  doxygen 1.5.1