CMS 3D CMS Logo

IgState.h

Go to the documentation of this file.
00001 #ifndef IGUANA_FRAMEWORK_IG_STATE_H
00002 # define IGUANA_FRAMEWORK_IG_STATE_H
00003 
00004 //<<<<<< INCLUDES                                                       >>>>>>
00005 
00006 # include "Iguana/Framework/interface/config.h"
00007 # include <vector>
00008 
00009 //<<<<<< PUBLIC DEFINES                                                 >>>>>>
00010 //<<<<<< PUBLIC CONSTANTS                                               >>>>>>
00011 //<<<<<< PUBLIC TYPES                                                   >>>>>>
00012 
00013 class IgStateElement;
00014 class IgStateKey;
00015 
00016 //<<<<<< PUBLIC VARIABLES                                               >>>>>>
00017 //<<<<<< PUBLIC FUNCTIONS                                               >>>>>>
00018 //<<<<<< CLASS DECLARATIONS                                             >>>>>>
00019 
00039 class IGUANA_FRAMEWORK_API IgState
00040 {
00041 public:
00042     IgState (IgState *parent = 0);
00043     ~IgState (void);
00044 
00045     IgStateElement *    get (IgStateKey index, IgState **context = 0) const;
00046     void                put (IgStateKey index, IgStateElement *element);
00047     void                erase (IgStateKey index);
00048     void                detach (IgStateKey index);
00049 
00050     IgState *           root (void) const;
00051     IgState *           parent (void) const;
00052     unsigned            children (void) const;
00053     IgState *           child (unsigned index) const;
00054     unsigned            elements (void) const;
00055     IgStateElement *    element (unsigned index) const;
00056 
00057 private:
00058     typedef std::vector<IgState *>        Children;
00059     typedef std::vector<IgStateElement *> Elements;
00060 
00061     void                addChild (IgState *child);
00062     void                detachChild (IgState *child);
00063 
00064     IgState             *m_parent;      //< Parent state, null if this is root
00065     Children            m_children;     //< Sub-states.
00066     Elements            m_elements;     //< Presently recorded elements.
00067 
00068     // undefined, no semantics
00069     IgState (const IgState &x);
00070     IgState &operator= (const IgState &x);
00071 };
00072 
00073 //<<<<<< INLINE PUBLIC FUNCTIONS                                        >>>>>>
00074 //<<<<<< INLINE MEMBER FUNCTIONS                                        >>>>>>
00075 
00076 #endif // IGUANA_FRAMEWORK_IG_SESSION_H

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