Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/FICN/src/orxonox/core/ArgReader.h @ 564

Last change on this file since 564 was 543, checked in by bknecht, 17 years ago

files added

File size: 699 bytes
Line 
1/**
2 @file  Argreader.h
3 @brief reads arguments
4 @author Benjamin Knecht <beni_at_orxonox.net>
5 */
6
7#ifndef __ARGREADER_CLASS__
8#define __ARGREADER_CLASS__
9
10#include <string>
11
12namespace orxonox {
13
14  class ArgReader
15  {
16    public:
17      ArgReader(int argc, char **argv);
18      void checkArgument(std::string option, std::string& string, bool must);
19      void checkArgument(std::string option, int& integer, bool must);
20      void checkArgument(std::string option, float& floating, bool must);
21      bool errorHandling();
22    private:
23      int checkOption(std::string option);
24
25    private:
26      int counter_;
27      char **arguments_;
28      bool fail_;
29      std::string errorStr_;
30  };
31
32}
33#endif
Note: See TracBrowser for help on using the repository browser.