CMS 3D CMS Logo

VisTwigFactroyService.h

Go to the documentation of this file.
00001 #ifndef VIS_FRAMEWORK_BASE_VIS_TWIG_FACTROY_SERVICE_H
00002 # define VIS_FRAMEWORK_BASE_VIS_TWIG_FACTROY_SERVICE_H
00003 
00004 //<<<<<< INCLUDES                                                       >>>>>>
00005 
00006 # include "Iguana/Framework/interface/IgStateElement.h"
00007 
00008 //<<<<<< PUBLIC DEFINES                                                 >>>>>>
00009 //<<<<<< PUBLIC CONSTANTS                                               >>>>>>
00010 //<<<<<< PUBLIC TYPES                                                   >>>>>>
00011 
00012 class VisQueuedTwig;
00013 class IgTwig;
00014 
00015 //<<<<<< PUBLIC VARIABLES                                               >>>>>>
00016 //<<<<<< PUBLIC FUNCTIONS                                               >>>>>>
00017 //<<<<<< CLASS DECLARATIONS                                             >>>>>>
00018 
00019 class VisTwigFactroyService : public IgStateElement
00020 {
00021     IG_DECLARE_STATE_ELEMENT (VisTwigFactroyService);
00022 public:
00023     typedef VisQueuedTwig * (*CreateTwigCallback)(IgState *state, IgTwig *parent,
00024                                                   const std::string &name,
00025                                                   const std::string &friendlyName,
00026                                                   const std::string &moduleLabel,
00027                                                   const std::string &instanceName,
00028                                                   const std::string &processName);    
00029 
00030     VisTwigFactroyService (IgState *state);
00031     ~VisTwigFactroyService (void);
00032     // implicit copy constructor
00033     // implicit assignment operator
00034     // implicit destructor
00035 
00036     // Returns 'true' if registration was successful
00037     bool                registerTwig (const std::string &name, CreateTwigCallback createFn);
00038     
00039     // Returns 'true' if the Twig name was registered before
00040     bool                unregisterTwig (const std::string &name);
00041     VisQueuedTwig *     createTwig (const std::string &name, 
00042                                     IgState *state, IgTwig *parent,
00043                                     const std::string &friendlyName,
00044                                     const std::string &moduleLabel,
00045                                     const std::string &instanceName,
00046                                     const std::string &processName);
00047     
00048 private:
00049     typedef std::map<const std::string, CreateTwigCallback> CallbackMap;
00050 
00051     IgState                     *m_state;
00052     CallbackMap                 m_callback;
00053 };
00054 
00055 //<<<<<< INLINE PUBLIC FUNCTIONS                                        >>>>>>
00056 //<<<<<< INLINE MEMBER FUNCTIONS                                        >>>>>>
00057 
00058 #endif // VIS_FRAMEWORK_BASE_VIS_TWIG_FACTROY_SERVICE_H

Generated on Tue Jun 9 17:49:55 2009 for CMSSW by  doxygen 1.5.4