21 #ifndef __EDELIB_CONFIG_H__ 
   22 #define __EDELIB_CONFIG_H__ 
   48 typedef list<ConfigEntry*> EntryList;
 
   49 typedef list<ConfigEntry*>::iterator EntryListIter;
 
   51 typedef list<ConfigSection*> SectionList;
 
   52 typedef list<ConfigSection*>::iterator SectionListIter;
 
  114         unsigned int errcode;
 
  115         unsigned int linenum;
 
  116         unsigned int sectnum;
 
  117         ConfigSection* cached;
 
  119         SectionList section_list;
 
  121         ConfigSection* add_section(
const char* section);
 
  122         ConfigSection* find_section(
const char* section);
 
  138         bool load(
const char* fname);
 
  148         bool save(
const char* fname);
 
  163         operator bool(
void)
 const   { 
return ((errcode == 
CONF_SUCCESS) ? 1 : 0); }
 
  179         bool get(
const char* section, 
const char* key, 
char* ret, 
unsigned int size);
 
  203         bool get_localized(
const char* section, 
const char* key, 
char* ret, 
unsigned int size);
 
  216         bool get_allocated(
const char* section, 
const char* key, 
char** ret, 
unsigned int& retsize);
 
  227         bool get(
const char* section, 
const char* key, 
bool& ret, 
bool dfl = 
false);
 
  238         bool get(
const char* section, 
const char* key, 
int& ret, 
int dfl = 0);
 
  249         bool get(
const char* section, 
const char* key, 
float& ret, 
float dfl = 0);
 
  260         bool get(
const char* section, 
const char* key, 
long& ret, 
long dfl = 0);
 
  271         bool get(
const char* section, 
const char* key, 
double& ret, 
double dfl = 0);
 
  282         bool get(
const char* section, 
const char* key, 
char& ret, 
char dfl = 0);
 
  292         void set(
const char* section, 
const char* key, 
char* val);
 
  302         void set(
const char* section, 
const char* key, 
const char* val);
 
  312         void set_localized(
const char* section, 
const char* key, 
char* val);
 
  322         void set_localized(
const char* section, 
const char* key, 
const char* val);
 
  332         void set(
const char* section, 
const char* key, 
bool val);
 
  342         void set(
const char* section, 
const char* key, 
int val);
 
  352         void set(
const char* section, 
const char* key, 
long val);
 
  362         void set(
const char* section, 
const char* key, 
float val);
 
  372         void set(
const char* section, 
const char* key, 
double val);
 
  379         bool exist(
const char* section);
 
  386         bool key_exist(
const char* section, 
const char* key);
 
  393         unsigned int num_sections(
void);
 
  401         unsigned int line(
void);
 
  415         const char* strerror(
void);
 
  422         const char* strerror(
int code);
 
  427 EDELIB_API 
int config_getline(
char** buff, 
int* len, FILE* f);
 
requested section was not found 
Definition: Config.h:37
 
A config file reader. 
Definition: Config.h:112
 
malformed file 
Definition: Config.h:36
 
trouble accessing config file or directory 
Definition: Config.h:35
 
memory allocation error 
Definition: Config.h:39
 
key found, but invalid value associated with it 
Definition: Config.h:40
 
#define E_DISABLE_CLASS_COPY(klass)
Definition: edelib-global.h:161
 
ConfigErrors
Error codes from Config class. 
Definition: Config.h:33
 
~Config()
Definition: Config.h:130
 
successful operation 
Definition: Config.h:34
 
requested key was not found 
Definition: Config.h:38