Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 680 was 673, checked in by rgrieder, 18 years ago
  • deleted obsolete classes: BaseEntity, Entity, Light and SceneNode (please complain if not agreed)
  • improved include guard naming consistency
File size: 728 bytes
Line 
1/**
2 @file  Argreader.h
3 @brief reads arguments
4 @author Benjamin Knecht <beni_at_orxonox.net>
5 */
6
7#ifndef _ArgReader_H__
8#define _ArgReader_H__
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=false);
19      void checkArgument(std::string option, int& integer, bool must=false);
20      void checkArgument(std::string option, float& floating, bool must=false);
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 /* _ArgReader_H__ */
Note: See TracBrowser for help on using the repository browser.