CMS 3D CMS Logo

IgModuleDef.cc

Go to the documentation of this file.
00001 //<<<<<< INCLUDES                                                       >>>>>>
00002 
00003 #include "Iguana/Framework/interface/IgModuleDef.h"
00004 #include "Iguana/Framework/interface/IgModule.h"
00005 #include "debug.h"
00006 #include "classlib/utils/DebugAids.h"
00007 #include <algorithm>
00008 #include <functional>
00009 
00010 //<<<<<< PRIVATE DEFINES                                                >>>>>>
00011 //<<<<<< PRIVATE CONSTANTS                                              >>>>>>
00012 //<<<<<< PRIVATE TYPES                                                  >>>>>>
00013 //<<<<<< PRIVATE VARIABLE DEFINITIONS                                   >>>>>>
00014 //<<<<<< PUBLIC VARIABLE DEFINITIONS                                    >>>>>>
00015 //<<<<<< CLASS STRUCTURE INITIALIZATION                                 >>>>>>
00016 //<<<<<< PRIVATE FUNCTION DEFINITIONS                                   >>>>>>
00017 //<<<<<< PUBLIC FUNCTION DEFINITIONS                                    >>>>>>
00018 //<<<<<< MEMBER FUNCTION DEFINITIONS                                    >>>>>>
00019 
00020 IgModuleDef::IgModuleDef (void)
00021     : m_module (0)
00022 {}
00023 
00024 IgModuleDef::~IgModuleDef (void)
00025 {
00026     if (m_module)
00027         LOG (0, warning, LFplugin_manager, "Attached IgModuleDef destroyed\n");
00028 }
00029 
00030 void
00031 IgModuleDef::attach (void)
00032 {}
00033 
00034 void
00035 IgModuleDef::detach (void)
00036 {}
00037 
00038 void
00039 IgModuleDef::query (void)
00040 {}
00041 
00042 void
00043 IgModuleDef::bind (IgModule *module)
00044 {
00045     ASSERT (! m_module);
00046     ASSERT (module);
00047     m_module = module;
00048 }
00049 
00050 void
00051 IgModuleDef::release (void)
00052 {
00053     ASSERT (m_module);
00054     m_module = 0;
00055 }
00056 
00057 IgModule *
00058 IgModuleDef::module (void) const
00059 {
00060     ASSERT (m_module);
00061     return m_module;
00062 }
00063 
00067 void
00068 IgSimpleModuleDef::query (void)
00069 {
00070     std::for_each (onQueryMD.begin (), onQueryMD.end (),
00071                    std::bind2nd (std::mem_fun_ref (&MDAction::operator()), this));
00072     std::for_each (onQuery.begin (), onQuery.end (),
00073                    std::mem_fun_ref (&Action::operator()));
00074 }
00075 
00076 void
00077 IgSimpleModuleDef::attach (void)
00078 {
00079     std::for_each (onAttachMD.begin (), onAttachMD.end (),
00080                    std::bind2nd (std::mem_fun_ref (&MDAction::operator()), this));
00081     std::for_each (onAttach.begin (), onAttach.end (),
00082                    std::mem_fun_ref (&Action::operator()));
00083 }
00084 
00085 void
00086 IgSimpleModuleDef::detach (void)
00087 {
00088     std::for_each (onDetachMD.begin (), onDetachMD.end (),
00089                    std::bind2nd (std::mem_fun_ref (&MDAction::operator()), this));
00090     std::for_each (onDetach.begin (), onDetach.end (),
00091                    std::mem_fun_ref (&Action::operator()));
00092 }

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