CONFIGFILE Class Reference

#include <configfile.h>

Collaboration diagram for CONFIGFILE:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 CONFIGFILE ()
 CONFIGFILE (string fname)
 ~CONFIGFILE ()
void Load (string fname)
void Clear ()
bool ClearParam (string param)
bool GetParam (string param, string &outvar)
bool GetParam (string param, int &outvar)
bool GetParam (string param, float &outvar)
bool GetParam (string param, float *outvar)
bool GetParam (string param, bool &outvar)
bool SetParam (string param, string invar)
bool SetParam (string param, int invar)
bool SetParam (string param, float invar)
bool SetParam (string param, float *invar)
bool SetParam (string param, bool invar)
void DebugPrint ()
bool Write ()
bool Write (bool with_brackets)
bool Write (bool with_brackets, string save_as)
void SuppressError (bool newse)
CONFIGVARIABLEGetHead ()

Private Member Functions

void Add (CONFIGVARIABLE *newvar)
string Trim (string instr)
void ProcessLine (string &cursection, string linestr)
string Strip (string instr, char stripchar)
string LCase (string instr)

Private Attributes

string filename
CONFIGVARIABLEvars
bool SUPPRESS_ERROR

Detailed Description

Definition at line 69 of file configfile.h.


Constructor & Destructor Documentation

CONFIGFILE::CONFIGFILE  ) 
 

Definition at line 29 of file configfile.cpp.

References filename, NULL, SUPPRESS_ERROR, and vars.

CONFIGFILE::CONFIGFILE string  fname  ) 
 

Definition at line 36 of file configfile.cpp.

References Load(), NULL, SUPPRESS_ERROR, and vars.

CONFIGFILE::~CONFIGFILE  ) 
 

Definition at line 45 of file configfile.cpp.

References Clear().


Member Function Documentation

void CONFIGFILE::Add CONFIGVARIABLE newvar  )  [private]
 

Definition at line 255 of file configfile.cpp.

References CONFIGVARIABLE::name, CONFIGVARIABLE::next, NULL, CONFIGVARIABLE::section, CONFIGVARIABLE::Set(), CONFIGVARIABLE::val_s, and vars.

void CONFIGFILE::Clear  ) 
 

Definition at line 233 of file configfile.cpp.

References CONFIGVARIABLE::next, NULL, and vars.

Referenced by Vamos_Body::Car::LoadCarDefinition(), SETTINGS::LoadCarPartsSettings(), ~CONFIGFILE(), VGUI::Page::~Page(), and SETTINGS::~SETTINGS().

bool CONFIGFILE::ClearParam string  param  ) 
 

Definition at line 710 of file configfile.cpp.

References CONFIGVARIABLE::name, CONFIGVARIABLE::next, NULL, CONFIGVARIABLE::section, and vars.

Referenced by SETTINGS::SaveCarPartsSettings().

void CONFIGFILE::DebugPrint  ) 
 

Definition at line 511 of file configfile.cpp.

References CONFIGVARIABLE::DebugPrint(), filename, CONFIGVARIABLE::next, NULL, and vars.

CONFIGVARIABLE* CONFIGFILE::GetHead  )  [inline]
 

Definition at line 114 of file configfile.h.

References vars.

Referenced by Vamos_Body::Car::LoadPart().

bool CONFIGFILE::GetParam string  param,
bool &  outvar
 

Definition at line 86 of file configfile.cpp.

References CONFIGVARIABLE::name, CONFIGVARIABLE::next, NULL, CONFIGVARIABLE::section, CONFIGVARIABLE::val_b, and vars.

bool CONFIGFILE::GetParam string  param,
float *  outvar
 

Definition at line 158 of file configfile.cpp.

References CONFIGVARIABLE::name, CONFIGVARIABLE::next, NULL, CONFIGVARIABLE::section, CONFIGVARIABLE::val_v, and vars.

bool CONFIGFILE::GetParam string  param,
float &  outvar
 

Definition at line 122 of file configfile.cpp.

References CONFIGVARIABLE::name, CONFIGVARIABLE::next, NULL, CONFIGVARIABLE::section, CONFIGVARIABLE::val_f, and vars.

bool CONFIGFILE::GetParam string  param,
int &  outvar
 

Definition at line 50 of file configfile.cpp.

References CONFIGVARIABLE::name, CONFIGVARIABLE::next, NULL, CONFIGVARIABLE::section, CONFIGVARIABLE::val_i, and vars.

bool CONFIGFILE::GetParam string  param,
string &  outvar
 

Definition at line 197 of file configfile.cpp.

References CONFIGVARIABLE::name, CONFIGVARIABLE::next, NULL, CONFIGVARIABLE::section, CONFIGVARIABLE::val_s, and vars.

Referenced by SETTINGS::Get(), SETTINGS::GetCarPartName(), VGUI::Page::Init(), TRACK::Load(), Vamos_Body::Car::LoadCarDefinition(), SETTINGS::LoadCarPartsSettings(), Vamos_Body::Car::LoadPart(), Vamos_Body::Car::LoadParts(), SETTINGS::ParseOptionFile(), and SETTINGS::ParseSettings().

string CONFIGFILE::LCase string  instr  )  [private]
 

Definition at line 547 of file configfile.cpp.

References CONFIGVARIABLE::strLCase().

void CONFIGFILE::Load string  fname  ) 
 

Definition at line 406 of file configfile.cpp.

References filename, ProcessLine(), and SUPPRESS_ERROR.

Referenced by CONFIGFILE(), SETTINGS::GetCarPartName(), TRACK::Load(), Vamos_Body::Car::LoadCarDefinition(), SETTINGS::LoadCarPartsSettings(), VGUI::Page::Page(), and SETTINGS::SETTINGS().

void CONFIGFILE::ProcessLine string &  cursection,
string  linestr
[private]
 

Definition at line 443 of file configfile.cpp.

References Strip(), and Trim().

Referenced by Load().

bool CONFIGFILE::SetParam string  param,
bool  invar
 

Definition at line 565 of file configfile.cpp.

References SetParam().

bool CONFIGFILE::SetParam string  param,
float *  invar
 

Definition at line 590 of file configfile.cpp.

References SetParam().

bool CONFIGFILE::SetParam string  param,
float  invar
 

Definition at line 579 of file configfile.cpp.

References SetParam().

bool CONFIGFILE::SetParam string  param,
int  invar
 

Definition at line 554 of file configfile.cpp.

References SetParam().

bool CONFIGFILE::SetParam string  param,
string  invar
 

Definition at line 601 of file configfile.cpp.

References CONFIGVARIABLE::name, and CONFIGVARIABLE::section.

Referenced by SETTINGS::Get(), Vamos_Body::Car::LoadPart(), SETTINGS::SaveSettings(), SETTINGS::Set(), and SetParam().

string CONFIGFILE::Strip string  instr,
char  stripchar
[private]
 

Definition at line 495 of file configfile.cpp.

Referenced by ProcessLine().

void CONFIGFILE::SuppressError bool  newse  )  [inline]
 

Definition at line 112 of file configfile.h.

References SUPPRESS_ERROR.

Referenced by Vamos_Body::Car::LoadCarDefinition(), SETTINGS::LoadCarPartsSettings(), Vamos_Body::Car::LoadParts(), and VGUI::Page::Page().

string CONFIGFILE::Trim string  instr  )  [private]
 

Definition at line 436 of file configfile.cpp.

References CONFIGVARIABLE::strTrim().

Referenced by ProcessLine().

bool CONFIGFILE::Write bool  with_brackets,
string  save_as
 

Definition at line 630 of file configfile.cpp.

References CONFIGVARIABLE::name, CONFIGVARIABLE::next, NULL, CONFIGVARIABLE::section, CONFIGVARIABLE::val_s, vars, and CONFIGVARIABLE::written.

bool CONFIGFILE::Write bool  with_brackets  ) 
 

Definition at line 625 of file configfile.cpp.

References filename, and Write().

bool CONFIGFILE::Write  ) 
 

Definition at line 704 of file configfile.cpp.

Referenced by SETTINGS::Init(), Write(), and SETTINGS::~SETTINGS().


Member Data Documentation

string CONFIGFILE::filename [private]
 

Definition at line 72 of file configfile.h.

Referenced by CONFIGFILE(), DebugPrint(), Load(), and Write().

bool CONFIGFILE::SUPPRESS_ERROR [private]
 

Definition at line 79 of file configfile.h.

Referenced by CONFIGFILE(), Load(), and SuppressError().

CONFIGVARIABLE* CONFIGFILE::vars [private]
 

Definition at line 73 of file configfile.h.

Referenced by Add(), Clear(), ClearParam(), CONFIGFILE(), DebugPrint(), GetHead(), GetParam(), and Write().


The documentation for this class was generated from the following files:
Generated on Thu Oct 19 04:11:48 2006 by  doxygen 1.4.6