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