00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef _QORE_PARSEOPTIONMAP_H
00025 #define _QORE_PARSEOPTIONMAP_H
00026
00027 #include <qore/Restrictions.h>
00028
00029 typedef std::map<const char *, int, ltstr> opt_map_t;
00030 typedef std::map<int, const char *> rev_opt_map_t;
00031
00033 class ParseOptionMap {
00034 private:
00035 DLLLOCAL static opt_map_t map;
00036 DLLLOCAL static rev_opt_map_t rmap;
00037
00038
00039 DLLLOCAL ParseOptionMap(const ParseOptionMap&);
00040 DLLLOCAL ParseOptionMap& operator=(const ParseOptionMap&);
00041
00042 public:
00043 DLLLOCAL ParseOptionMap();
00044 DLLLOCAL static void static_init();
00045
00047 DLLEXPORT static const char *find_name(int code);
00048
00050 DLLEXPORT static int find_code(const char *name);
00051
00053 DLLEXPORT static void list_options();
00054 };
00055
00056 #endif