CMS 3D CMS Logo

IgPluginInfo Class Reference

Abstract base class for information on features provided by a module. More...

#include <Iguana/Framework/interface/IgPluginInfo.h>

Inheritance diagram for IgPluginInfo:

IgPluginFactoryImplTypes< R *(T1)>::Info IgPluginFactoryImplTypes< R *(T1, T2)>::Info IgPluginFactoryImplTypes< R *(T1, T2, T3)>::Info IgPluginFactoryImplTypes< R *(T1, T2, T3, T4)>::Info IgPluginFactoryImplTypes< R *(void)>::Info IgPluginFactoryImplTypes< void >::Info

List of all members.

Public Member Functions

virtual void cache (IgModuleDescriptor *to) const
const std::string & category (void) const
virtual void detach (void)
 IgPluginInfo (IgModule *module, const std::string &name, const std::string &category)
IgModulemodule (void) const
const std::string & name (void) const
virtual ~IgPluginInfo (void)

Protected Member Functions

void finish (bool needCache)
void noFactory (void) const

Private Attributes

const std::string & m_category
IgModulem_module
std::string m_name


Detailed Description

Abstract base class for information on features provided by a module.

The derived class should provide:

Definition at line 44 of file IgPluginInfo.h.


Constructor & Destructor Documentation

IgPluginInfo::IgPluginInfo ( IgModule module,
const std::string &  name,
const std::string &  category 
)

Definition at line 21 of file IgPluginInfo.cc.

References ASSERT, LFplugin_manager, LOG, m_category, m_module, m_name, and GsfMatrixTools::trace().

00024     : m_module (module),
00025       m_name (name),
00026       m_category (category)
00027 {
00028     ASSERT (m_module);
00029     ASSERT (! m_name.empty ());
00030     ASSERT (! m_category.empty ());
00031     LOG (0, trace, LFplugin_manager, "defining " << m_category
00032          << ' ' << m_name << '\n');
00033 }

IgPluginInfo::~IgPluginInfo ( void   )  [virtual]

Definition at line 35 of file IgPluginInfo.cc.

References ASSERT, IgModule::detachInfo(), m_category, m_module, and m_name.

00036 {
00037     ASSERT (m_module);
00038     ASSERT (! m_name.empty ());
00039     ASSERT (! m_category.empty ());
00040     m_module->detachInfo (this);
00041 }


Member Function Documentation

void IgPluginInfo::cache ( IgModuleDescriptor to  )  const [virtual]

Definition at line 84 of file IgPluginInfo.cc.

References ASSERT, m_category, m_module, and m_name.

Referenced by IgModule::addInfo().

00085 {
00086     ASSERT (m_module);
00087     ASSERT (! m_name.empty ());
00088     ASSERT (! m_category.empty ());
00089     ASSERT (to);
00090     new IgModuleDescriptor (to, m_category, m_name);
00091 }

const std::string & IgPluginInfo::category ( void   )  const

Definition at line 75 of file IgPluginInfo.cc.

References ASSERT, m_category, m_module, and m_name.

Referenced by IgPluginManager::addInfo(), and IgPluginManager::removeInfo().

00076 {
00077     ASSERT (m_module);
00078     ASSERT (! m_name.empty ());
00079     ASSERT (! m_category.empty ());
00080     return m_category;
00081 }

void IgPluginInfo::detach ( void   )  [virtual]

Reimplemented in IgPluginFactoryImplTypes< R *(void)>::Info, IgPluginFactoryImplTypes< R *(T1)>::Info, IgPluginFactoryImplTypes< R *(T1, T2)>::Info, IgPluginFactoryImplTypes< R *(T1, T2, T3)>::Info, and IgPluginFactoryImplTypes< R *(T1, T2, T3, T4)>::Info.

Definition at line 94 of file IgPluginInfo.cc.

References ASSERT, m_category, m_module, and m_name.

00095 {
00096     ASSERT (m_module);
00097     ASSERT (! m_name.empty ());
00098     ASSERT (! m_category.empty ());
00099 }

void IgPluginInfo::finish ( bool  needCache  )  [protected]

Definition at line 44 of file IgPluginInfo.cc.

References IgModule::addInfo(), and m_module.

00045 {
00046     // Derived constructor is complete, tell the module I exist.  This
00047     // adds myself to the module and propagates the notification to
00048     // the relevant factory.  Note that the factory must already exist, so
00049     // it will get notified immediately.  However it might still be in
00050     // the middle of construction, which is why we propagate the
00051     // notification through the base classes and not directly to the
00052     // factory from the derived class.
00053     m_module->addInfo (this, needCache);
00054 }

IgModule * IgPluginInfo::module ( void   )  const

Definition at line 57 of file IgPluginInfo.cc.

References ASSERT, m_category, m_module, and m_name.

00058 {
00059     ASSERT (m_module);
00060     ASSERT (! m_name.empty ());
00061     ASSERT (! m_category.empty ());
00062     return m_module;
00063 }

const std::string & IgPluginInfo::name ( void   )  const

Definition at line 66 of file IgPluginInfo.cc.

References ASSERT, m_category, m_module, and m_name.

Referenced by IgPluginFactoryImplBase< Types >::addInfo(), and IgPluginFactoryImplBase< Types >::removeInfo().

00067 {
00068     ASSERT (m_module);
00069     ASSERT (! m_name.empty ());
00070     ASSERT (! m_category.empty ());
00071     return m_name;
00072 }

void IgPluginInfo::noFactory ( void   )  const [protected]

Definition at line 102 of file IgPluginInfo.cc.

References ASSERT, IgPluginManager::ErrorNoFactory, IgPluginManager::feedback(), IgModule::libraryName(), m_module, m_name, IgModule::manager(), and lat::Filename::name().

00103 {
00104     m_module->manager ()->feedback
00105         (IgPluginManager::ErrorNoFactory,
00106          m_name + " (" + m_module->libraryName ().name () + ")");
00107     ASSERT (false);
00108 }


Member Data Documentation

const std::string& IgPluginInfo::m_category [private]

Definition at line 67 of file IgPluginInfo.h.

Referenced by cache(), category(), detach(), IgPluginInfo(), module(), name(), and ~IgPluginInfo().

IgModule* IgPluginInfo::m_module [private]

Definition at line 65 of file IgPluginInfo.h.

Referenced by cache(), category(), detach(), finish(), IgPluginInfo(), module(), name(), noFactory(), and ~IgPluginInfo().

std::string IgPluginInfo::m_name [private]

Definition at line 66 of file IgPluginInfo.h.

Referenced by cache(), category(), detach(), IgPluginInfo(), module(), name(), noFactory(), and ~IgPluginInfo().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:25:23 2009 for CMSSW by  doxygen 1.5.4