Go to the documentation of this file.00001 #ifndef wali_util_PARSE_ARG_V_GUARD
00002 #define wali_util_PARSE_ARG_V_GUARD 1
00003
00004 #include <iostream>
00005 #include <map>
00006 #include <string>
00007
00008 namespace wali
00009 {
00010 namespace util
00011 {
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 class ParseArgv
00023 {
00024
00025 public:
00026 ParseArgv( int argc,char **argv );
00027 virtual ~ParseArgv();
00028
00029 virtual bool get(
00030 const std::string &key,
00031 std::string &value ) const;
00032
00033 virtual bool geti( const std::string &key, int &i ) const;
00034
00035 virtual bool exists( const std::string &key ) const;
00036
00037
00038 protected:
00039 typedef std::map< std::string, std::string > pamap_t;
00040 virtual void parse();
00041
00042 protected:
00043 int argc;
00044 char ** argv;
00045 pamap_t m;
00046
00047 };
00048
00049 }
00050
00051 }
00052
00053 #endif // wali_util_PARSE_ARG_V_GUARD
00054