Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/chris/src/ini_parser.h @ 2065

Last change on this file since 2065 was 2065, checked in by chris, 20 years ago

orxnonox/branches/chris: Sichergestellt das der parser kompiliert und ne funktion zum direkten zugriff auf variablenwerte eingebaut

File size: 588 bytes
Line 
1/*!
2    \file ini_parser.h
3    \brief A small ini file parser
4   
5    Can be used to find a defined [Section] in an ini file and get the VarName=Value entries
6*/
7
8#ifndef INI_PARSER_H
9#define INI_PARSER_H
10
11#include "stdincl.h"
12
13#define PARSELINELENGHT 512
14
15class IniParser {
16 private:
17        FILE* stream;
18        bool bInSection;
19        char internbuf[PARSELINELENGHT];
20       
21 public:
22  IniParser (char* filename);
23  ~IniParser ();
24 
25  char* getVar( char* name, char* section, char* defvalue);
26        int openFile( char* name);
27  int getSection( char* section);
28  int nextVar( char* name, char* value);
29};
30
31#endif
Note: See TracBrowser for help on using the repository browser.