00001 #ifndef IGUANA_FRAMEWORK_IG_ARGS_ELEMENT_H
00002 # define IGUANA_FRAMEWORK_IG_ARGS_ELEMENT_H
00003
00004
00005
00006 # include "Iguana/Framework/interface/IgStateElement.h"
00007 # include <vector>
00008 # include <string>
00009
00010
00011
00012
00013
00014 class IgState;
00015
00016
00017
00018
00019
00020 class IGUANA_FRAMEWORK_API IgArgsElement : public IgStateElement
00021 {
00022 IG_DECLARE_STATE_ELEMENT (IgArgsElement);
00023 public:
00024 IgArgsElement (IgState *in, int argc, char **argv);
00025
00026
00027
00028
00029 virtual int & args (void);
00030 virtual char * arg (int arg);
00031 virtual char ** argv (void);
00032 virtual bool find (const std::vector<std::string> &arg,
00033 std::string &value,
00034 bool remove = false);
00035 virtual bool find (const std::string &arg,
00036 std::string &value,
00037 bool remove = false);
00038 virtual bool find (const std::string &arg,
00039 int &value,
00040 bool remove = false);
00041 virtual bool exists (const std::vector<std::string> &arg,
00042 bool hasvalue = false);
00043 virtual bool exists (const std::string &arg,
00044 bool hasvalue = false);
00045 virtual void remove (const std::vector<std::string> &arg,
00046 bool hasvalue = false);
00047 virtual void remove (const std::string &arg,
00048 bool hasvalue = false);
00049
00050 private:
00051 IgState *m_state;
00052 int m_argc;
00053 char **m_argv;
00054 };
00055
00056
00057
00058
00059 #endif // IGUANA_FRAMEWORK_IG_ARGS_ELEMENT_H