Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:29:02

0001 // -*- C++ -*-
0002 //
0003 // Package:     PluginManager
0004 // Class  :     PluginFactoryManager
0005 //
0006 // Implementation:
0007 //     <Notes on implementation>
0008 //
0009 // Original Author:  Chris Jones
0010 //         Created:  Wed Apr  4 13:09:31 EDT 2007
0011 //
0012 
0013 // system include files
0014 
0015 // user include files
0016 #include "FWCore/PluginManager/interface/PluginFactoryManager.h"
0017 #include "FWCore/Utilities/interface/thread_safety_macros.h"
0018 
0019 namespace edmplugin {
0020   //
0021   // constants, enums and typedefs
0022   //
0023 
0024   //
0025   // static data member definitions
0026   //
0027 
0028   //
0029   // constructors and destructor
0030   //
0031   PluginFactoryManager::PluginFactoryManager() {}
0032 
0033   // PluginFactoryManager::PluginFactoryManager(const PluginFactoryManager& rhs)
0034   // {
0035   //    // do actual copying here;
0036   // }
0037 
0038   PluginFactoryManager::~PluginFactoryManager() {}
0039 
0040   //
0041   // assignment operators
0042   //
0043   // const PluginFactoryManager& PluginFactoryManager::operator=(const PluginFactoryManager& rhs)
0044   // {
0045   //   //An exception safe implementation is
0046   //   PluginFactoryManager temp(rhs);
0047   //   swap(rhs);
0048   //
0049   //   return *this;
0050   // }
0051 
0052   //
0053   // member functions
0054   //
0055   void PluginFactoryManager::addFactory(const PluginFactoryBase* iFactory) {
0056     factories_.push_back(iFactory);
0057     newFactory_(iFactory);
0058   }
0059 
0060   //
0061   // const member functions
0062   //
0063   PluginFactoryManager::const_iterator PluginFactoryManager::begin() const { return factories_.begin(); }
0064 
0065   PluginFactoryManager::const_iterator PluginFactoryManager::end() const { return factories_.end(); }
0066 
0067   //
0068   // static member functions
0069   //
0070   PluginFactoryManager* PluginFactoryManager::get() {
0071     CMS_THREAD_SAFE static PluginFactoryManager s_instance;
0072     return &s_instance;
0073   }
0074 }  // namespace edmplugin