/*! \file ini_parser.h \brief A small ini file parser Can be used to find a defined [Section] in an ini file and get the VarName=Value entries */ #ifndef _INI_PARSER_H #define _INI_PARSER_H #include #include #include #define PARSELINELENGHT 512 //! ini-file parser /** This class can be used to load an initializer file and parse it's contents for variablename=value pairs. */ class IniParser { private: FILE* stream; bool bInSection; char internbuf[PARSELINELENGHT]; public: IniParser (char* filename); ~IniParser (); char* get_var( char* name, char* section, char* defvalue); int open_file( char* name); int get_section( char* section); int next_var( char* name, char* value); }; #endif /* _INI_PARSER_H */