CMS 3D CMS Logo

IgStateKey.h

Go to the documentation of this file.
00001 #ifndef IGUANA_FRAMEWORK_IG_STATE_KEY_H
00002 # define IGUANA_FRAMEWORK_IG_STATE_KEY_H
00003 
00004 //<<<<<< INCLUDES                                                       >>>>>>
00005 
00006 # include "Iguana/Framework/interface/config.h"
00007 # include <string>
00008 # include <map>
00009 
00010 //<<<<<< PUBLIC DEFINES                                                 >>>>>>
00011 //<<<<<< PUBLIC CONSTANTS                                               >>>>>>
00012 //<<<<<< PUBLIC TYPES                                                   >>>>>>
00013 //<<<<<< PUBLIC VARIABLES                                               >>>>>>
00014 //<<<<<< PUBLIC FUNCTIONS                                               >>>>>>
00015 //<<<<<< CLASS DECLARATIONS                                             >>>>>>
00016 
00017 class IGUANA_FRAMEWORK_API IgStateKey
00018 {
00019 public:
00020     // implicit copy constructor
00021     // implicit assignment operator
00022     // implicit destructor
00023 
00024                 operator unsigned (void) const;
00025     unsigned            value (void) const;
00026     std::string         label (void) const;
00027 
00028     static IgStateKey   index (const std::string &label);
00029 
00030 protected:
00031     IgStateKey (unsigned value);
00032 
00033     static unsigned     create (const std::string &label);
00034     static void         remove (const std::string &label);
00035 
00036 private:
00037     unsigned int        m_value;
00038 
00039     typedef std::map<std::string, unsigned> Map;
00040     static Map &        keymap (void);
00041     static unsigned     s_count;
00042 };
00043 
00044 class IGUANA_FRAMEWORK_API IgStateKeyDef : public IgStateKey
00045 {
00046 public:
00047     IgStateKeyDef (const std::string &label);
00048     ~IgStateKeyDef (void);
00049 
00050 private:
00051     std::string         m_label;
00052 };
00053 
00054 //<<<<<< INLINE PUBLIC FUNCTIONS                                        >>>>>>
00055 //<<<<<< INLINE MEMBER FUNCTIONS                                        >>>>>>
00056 
00058 inline
00059 IgStateKey::operator unsigned (void) const
00060 { return m_value; }
00061 
00063 inline unsigned
00064 IgStateKey::value (void) const
00065 { return m_value; }
00066 
00067 #endif // IGUANA_FRAMEWORK_IG_STATE_KEY_H

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