00001 #ifndef VIS_FRAMEWORK_BASE_VIS_TWIG_FACTROY_SERVICE_H
00002 # define VIS_FRAMEWORK_BASE_VIS_TWIG_FACTROY_SERVICE_H
00003
00004
00005
00006 # include "Iguana/Framework/interface/IgStateElement.h"
00007
00008
00009
00010
00011
00012 class VisQueuedTwig;
00013 class IgTwig;
00014
00015
00016
00017
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
00033
00034
00035
00036
00037 bool registerTwig (const std::string &name, CreateTwigCallback createFn);
00038
00039
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
00056
00057
00058 #endif // VIS_FRAMEWORK_BASE_VIS_TWIG_FACTROY_SERVICE_H