/[PAMELA software]/FCUtils/CmdLineParser/inc/CmdLineParser.h
ViewVC logotype

Contents of /FCUtils/CmdLineParser/inc/CmdLineParser.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (show annotations) (download) (vendor branch)
Wed May 7 10:33:14 2008 UTC (16 years, 7 months ago) by nikolas
Branch: MAIN, first
CVS Tags: v1r00, HEAD
Changes since 1.1: +0 -0 lines
File MIME type: text/plain
Error occurred while calculating annotation data.
 An usefull command line parser

1 #ifndef CMDLINEPARSER_H
2 #define CMDLINEPARSER_H
3
4 #include <string>
5 #include <map>
6
7 #include "Options.h"
8
9 using std::string;
10 using std::map;
11
12 namespace FCUtils {
13
14 typedef map<string,string> ArgMap;
15
16 enum optmode {UPDATE,DEFINE};
17
18 class CmdLineParser {
19 public:
20
21 CmdLineParser(): optmode_(DEFINE) {};
22 CmdLineParser(int argc, char ** argv, optmode om=DEFINE): optmode_(om)
23 { ParseCmdLine(argc,argv);
24 // MoveToOptions();
25 }
26
27 void ParseCmdLine(int argc, char ** argv);
28 void ParseCmdLineArg( string const &arg);
29 void SetOptMode(optmode om){ optmode_=om; }
30 optmode GetOptMode() const { return optmode_; }
31 void MoveToOptions();
32 void Print() const;
33
34 private:
35 ArgMap args_;
36 optmode optmode_;
37
38 }; // class CmdLineParser
39
40 }; // namespace FCUtils
41
42 #endif //CMDLINEPARSER_H

  ViewVC Help
Powered by ViewVC 1.1.23