CMS 3D CMS Logo

IgArgsElement.h

Go to the documentation of this file.
00001 #ifndef IGUANA_FRAMEWORK_IG_ARGS_ELEMENT_H
00002 # define IGUANA_FRAMEWORK_IG_ARGS_ELEMENT_H
00003 
00004 //<<<<<< INCLUDES                                                       >>>>>>
00005 
00006 # include "Iguana/Framework/interface/IgStateElement.h"
00007 # include <vector>
00008 # include <string>
00009 
00010 //<<<<<< PUBLIC DEFINES                                                 >>>>>>
00011 //<<<<<< PUBLIC CONSTANTS                                               >>>>>>
00012 //<<<<<< PUBLIC TYPES                                                   >>>>>>
00013 
00014 class IgState;
00015 
00016 //<<<<<< PUBLIC VARIABLES                                               >>>>>>
00017 //<<<<<< PUBLIC FUNCTIONS                                               >>>>>>
00018 //<<<<<< CLASS DECLARATIONS                                             >>>>>>
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     // implicit copy constructor
00026     // implicit assignment operator
00027     // implicit destructor
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;       //< State object.
00052     int                         m_argc;         //< Program arguments.
00053     char                        **m_argv;       //< Program arguments.
00054 };
00055 
00056 //<<<<<< INLINE PUBLIC FUNCTIONS                                        >>>>>>
00057 //<<<<<< INLINE MEMBER FUNCTIONS                                        >>>>>>
00058 
00059 #endif // IGUANA_FRAMEWORK_IG_ARGS_ELEMENT_H

Generated on Tue Jun 9 17:38:12 2009 for CMSSW by  doxygen 1.5.4