CGR Localization
 All Classes Namespaces Files Functions Variables Macros Pages
ConfigReader Class Reference
Collaboration diagram for ConfigReader:

Classes

class  FileHeader
 
class  SubTree
 

Public Types

enum  FileFlags { Optional = 1<<0 }
 

Public Member Functions

 ConfigReader (const char *_path)
 
void close ()
 
void clear ()
 
void reset ()
 
bool isOpen ()
 
void init ()
 
void init (WatchFiles &_watch_files)
 
void addFile (const char *filename, unsigned flags=0)
 
bool readInit ()
 
bool readFiles ()
 
bool isFileModified ()
 
int getGeneration () const
 get generation count in terms of # of readFiles() updates
 
bool needUpdate (int &client_generation) const
 
int getErrors ()
 
const char * getStr (const char *exp, const char *default_val=NULL)
 
bool getBool (const char *exp, bool &val)
 
bool getInt (const char *exp, int &val)
 
bool getUInt (const char *exp, unsigned int &val)
 
bool getReal (const char *exp, float &val)
 
bool getReal (const char *exp, double &val)
 
bool getPosReal (const char *exp, float &val)
 
bool getPosReal (const char *exp, double &val)
 
bool getInt (const char *exp, int &val, int _min, int _max)
 
bool getReal (const char *exp, float &val, float _min, float _max)
 
bool getReal (const char *exp, double &val, double _min, double _max)
 
bool set (const char *name, int val)
 
bool set (const char *name, double val)
 

Protected Member Functions

bool initLua ()
 
void closeLua ()
 
void clearWatches ()
 
void showError (int err_code, const char *filename)
 
bool readFile (const char *filename, unsigned flags)
 
void eval (const char *exp)
 
void eval (const char *exp_base, const char *exp_ext)
 
void addStandard ()
 

Protected Attributes

std::vector< FileHeaderfiles
 
lua_State * L
 
int errors
 
int num_readfiles_calls
 
WatchFileswatch_files
 
bool modified
 
char * path
 

Detailed Description

Definition at line 13 of file configreader.h.

Member Function Documentation

bool ConfigReader::needUpdate ( int &  client_generation) const

return true iff the client needs to get updated information (meaning it has been read since the last needUpdate call). This call updates client_generation.

Definition at line 294 of file configreader.cpp.

Here is the call graph for this function:


The documentation for this class was generated from the following files: