00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef SH_ARG_H
00022 #define SH_ARG_H
00023
00024 #include <list>
00025 #include <string>
00026
00027 #include "EncryptionAlgorithm.h"
00028 #include "EncryptionMode.h"
00029
00030
00031 #ifdef HAVE_CONFIG_H
00032 #include <config.h>
00033 #endif
00034
00035 template<class T> class Arg {
00036 public:
00037 Arg (void) : set(false) {} ;
00038 Arg (T v, bool setbyuser = true) ;
00039
00040 T getValue (void) const
00041 { return Value ; } ;
00042
00043 void setValue (T v, bool setbyuser = true) ;
00044
00045 bool is_set (void) const
00046 { return set ; } ;
00047
00048 private:
00049 T Value ;
00050 bool set ;
00051 } ;
00052
00053 enum COMMAND { EMBED, EXTRACT, INFO, ENCINFO, SHOWVERSION, SHOWLICENSE, SHOWHELP, PRINTFREQS } ;
00054 enum VERBOSITY { QUIET, NORMAL, VERBOSE, STATS } ;
00055 enum DEBUGCOMMAND { NONE, PRINTGRAPH, PRINTGMLGRAPH, PRINTGMLVERTEX } ;
00056
00057 typedef Arg<COMMAND> ArgCommand ;
00058 typedef Arg<VERBOSITY> ArgVerbosity ;
00059 typedef Arg<bool> ArgBool ;
00060 typedef Arg<std::string> ArgString ;
00061 typedef Arg<unsigned long> ArgULong ;
00062 typedef Arg<int> ArgInt ;
00063 typedef Arg<float> ArgFloat ;
00064 typedef Arg<EncryptionAlgorithm> ArgEncAlgo ;
00065 typedef Arg<EncryptionMode> ArgEncMode ;
00066 typedef Arg<unsigned int> ArgUInt ;
00067 typedef Arg<std::list<std::string> > ArgStringList ;
00068 typedef Arg<DEBUGCOMMAND> ArgDebugCommand ;
00069
00070 #endif // ndef SH_ARG_H