Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

Arg.h

Go to the documentation of this file.
00001 /* 00002 * steghide 0.5.1 - a steganography program 00003 * Copyright (C) 1999-2003 Stefan Hetzl <shetzl@chello.at> 00004 * 00005 * This program is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU General Public License 00007 * as published by the Free Software Foundation; either version 2 00008 * of the License, or (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 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 // to include DEBUG if defined 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

Generated on Fri Jul 16 19:41:20 2004 for steghide by doxygen 1.3.7