CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_4/src/FWCore/PluginManager/src/PluginFactoryManager.cc

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // Package:     PluginManager
00004 // Class  :     PluginFactoryManager
00005 // 
00006 // Implementation:
00007 //     <Notes on implementation>
00008 //
00009 // Original Author:  Chris Jones
00010 //         Created:  Wed Apr  4 13:09:31 EDT 2007
00011 // $Id: PluginFactoryManager.cc,v 1.2 2007/04/12 12:51:12 wmtan Exp $
00012 //
00013 
00014 // system include files
00015 
00016 // user include files
00017 #include "FWCore/PluginManager/interface/PluginFactoryManager.h"
00018 
00019 namespace edmplugin{
00020 //
00021 // constants, enums and typedefs
00022 //
00023 
00024 //
00025 // static data member definitions
00026 //
00027 
00028 //
00029 // constructors and destructor
00030 //
00031 PluginFactoryManager::PluginFactoryManager()
00032 {
00033 }
00034 
00035 // PluginFactoryManager::PluginFactoryManager(const PluginFactoryManager& rhs)
00036 // {
00037 //    // do actual copying here;
00038 // }
00039 
00040 PluginFactoryManager::~PluginFactoryManager()
00041 {
00042 }
00043 
00044 //
00045 // assignment operators
00046 //
00047 // const PluginFactoryManager& PluginFactoryManager::operator=(const PluginFactoryManager& rhs)
00048 // {
00049 //   //An exception safe implementation is
00050 //   PluginFactoryManager temp(rhs);
00051 //   swap(rhs);
00052 //
00053 //   return *this;
00054 // }
00055 
00056 //
00057 // member functions
00058 //
00059 void
00060 PluginFactoryManager::addFactory(const PluginFactoryBase* iFactory)
00061 {
00062    factories_.push_back(iFactory);
00063    newFactory_(iFactory);
00064 }
00065 
00066 //
00067 // const member functions
00068 //
00069 PluginFactoryManager::const_iterator
00070 PluginFactoryManager::begin() const
00071 {
00072    return factories_.begin();
00073 }
00074 
00075 PluginFactoryManager::const_iterator
00076 PluginFactoryManager::end() const
00077 {
00078    return factories_.end();
00079 }
00080 
00081 //
00082 // static member functions
00083 //
00084 PluginFactoryManager*
00085 PluginFactoryManager::get()
00086 {
00087    static PluginFactoryManager s_instance;
00088    return &s_instance;
00089 }
00090 }