00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00026 #ifndef OPTIONS_H
00027 #define OPTIONS_H
00028
00029 #include "defs.h"
00030 #include "xmldefs.h"
00031 #include "encodings.h"
00032
00033
00037 class ExaltOptions
00038 {
00039 public:
00041 enum OptionName
00042 {
00044 Verbose,
00045
00047 Model,
00048
00050 Encoding,
00051
00053 PrintGrammar,
00054
00056 PrintModels,
00057
00059 LastOption
00060 };
00061
00063 typedef int OptionValue;
00064
00066 enum
00067 {
00069 None = -1,
00070
00072 No,
00073
00075 Yes,
00076
00078 SimpleModel,
00079
00081 AdaptiveModel
00082 };
00083
00090 static void setOption(OptionName name, OptionValue value) { options[name] = value; }
00091
00099 static OptionValue getOption(OptionName name) { return options[name]; }
00100
00106 static void resetOptions(void)
00107 {
00108 for (int i = 0; i < LastOption; i++)
00109 options[(OptionName)i] = None;
00110 }
00111
00112 private:
00114 static OptionValue options[];
00115 };
00116
00117
00118 #endif //OPTIONS_H
00119
00120
00121