Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/preferences/src/lib/parser/preferences/cmd_line_prefs_reader.h @ 7250

Last change on this file since 7250 was 7250, checked in by rennerc, 19 years ago

implemented -h/—help argument

File size: 826 bytes
Line 
1/*!
2 * @file proto_class.h
3 * @brief Definition of CmdLinePrefsReader
4*/
5
6#ifndef _CMD_LINE_PREFS_READER_H
7#define _CMD_LINE_PREFS_READER_H
8
9#include "stdincl.h"
10#include "debug.h"
11
12#include "src/lib/parser/cmdline_parser/cmdline_parser.h"
13
14struct IniEntry
15{
16  std::string section;
17  std::string key;
18  std::string value;
19};
20
21struct CallbackData
22{
23  std::list<IniEntry> iniEntries;
24  CmdLineParser * parser;
25};
26
27enum
28{
29  ID_SET_INI = 1,
30  ID_HELP
31};
32
33//! A class for reading commandline arguments into Preferences
34class CmdLinePrefsReader
35{
36
37 public:
38   CmdLinePrefsReader();
39   virtual ~CmdLinePrefsReader();
40
41    bool parse(int argc, char** argv);
42   
43  private:
44    static bool callBack( ArgTableEntry entry, void* data, const std::string & arg, const std::vector<MultiType> & argArgs );
45
46};
47
48#endif /* _PROTO_CLASS_H */
Note: See TracBrowser for help on using the repository browser.