Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

options.h

Go to the documentation of this file.
00001 /***************************************************************************
00002     options.h  -  Definitions of ExaltOptions class.
00003                              -------------------
00004     begin                : June 21 2002
00005     copyright            : (C) 2003 by Vojtìch Toman
00006     email                : vtoman@lit.cz
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
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          //keep this option at the end of the enum!
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 

Generated on Wed Feb 5 10:43:02 2003 for Exalt by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002