CMS 3D CMS Logo

IgPluginDef.h

Go to the documentation of this file.
00001 #ifndef IGUANA_FRAMEWORK_IG_PLUGIN_DEF_H
00002 # define IGUANA_FRAMEWORK_IG_PLUGIN_DEF_H
00003 
00004 //<<<<<< INCLUDES                                                       >>>>>>
00005 
00006 # include "Iguana/Framework/interface/config.h"
00007 # include <string>
00008 
00009 //<<<<<< PUBLIC DEFINES                                                 >>>>>>
00010 //<<<<<< PUBLIC CONSTANTS                                               >>>>>>
00011 //<<<<<< PUBLIC TYPES                                                   >>>>>>
00012 
00013 class IgModuleDef;
00014 
00015 //<<<<<< PUBLIC VARIABLES                                               >>>>>>
00016 //<<<<<< PUBLIC FUNCTIONS                                               >>>>>>
00017 //<<<<<< CLASS DECLARATIONS                                             >>>>>>
00018 
00020 template <class Factory, class Type>
00021 struct IgPluginDef
00022 {
00023     static void declare (IgModuleDef *def);
00024     static void declareName (IgModuleDef *def, std::string name);
00025     static void installFactory (IgModuleDef *def);
00026     static void installFactoryName (IgModuleDef *def, std::string name);
00027 };
00028 
00029 //<<<<<< INLINE PUBLIC FUNCTIONS                                        >>>>>>
00030 //<<<<<< INLINE MEMBER FUNCTIONS                                        >>>>>>
00031 
00034 template <class Factory, class Type>
00035 inline void
00036 IgPluginDef<Factory,Type>::declare (IgModuleDef *def)
00037 { Factory::get ()->declare (def, Type::catalogLabel ()); }
00038 
00041 template <class Factory, class Type>
00042 inline void
00043 IgPluginDef<Factory,Type>::declareName (IgModuleDef *def, std::string name)
00044 { Factory::get ()->declare (def, name); }
00045 
00049 template <class Factory, class Type>
00050 inline void
00051 IgPluginDef<Factory,Type>::installFactory (IgModuleDef *def)
00052 {
00053     typedef typename Factory::Types::template AutoFactory<Type> AutoFactory;
00054     Factory::get ()->installFactory (def, Type::catalogLabel (), new AutoFactory);
00055 }
00056 
00060 template <class Factory, class Type>
00061 inline void
00062 IgPluginDef<Factory,Type>::installFactoryName (IgModuleDef *def, std::string name)
00063 {
00064     typedef typename Factory::Types::template AutoFactory<Type> AutoFactory;
00065     Factory::get ()->installFactory (def, name, new AutoFactory);
00066 }
00067 
00068 #endif // IGUANA_FRAMEWORK_IG_PLUGIN_DEF_H

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