Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-07-30 02:33:06

0001 #ifndef FWCore_PluginManager_PluginFactoryManager_h
0002 #define FWCore_PluginManager_PluginFactoryManager_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     PluginManager
0006 // Class  :     PluginFactoryManager
0007 //
0008 /**\class PluginFactoryManager PluginFactoryManager.h FWCore/PluginManager/interface/PluginFactoryManager.h
0009 
0010  Description: <one line class summary>
0011 
0012  Usage:
0013     <usage>
0014 
0015 */
0016 //
0017 // Original Author:  Chris Jones
0018 //         Created:  Wed Apr  4 12:49:41 EDT 2007
0019 //
0020 
0021 // system include files
0022 #include <string>
0023 #include <vector>
0024 #include "FWCore/Utilities/interface/Signal.h"
0025 
0026 // user include files
0027 
0028 // forward declarations
0029 namespace edmplugin {
0030   class PluginFactoryBase;
0031   class DummyFriend;
0032   class PluginFactoryManager {
0033   public:
0034     friend class DummyFriend;
0035 
0036     PluginFactoryManager(const PluginFactoryManager&) = delete;                   // stop default
0037     const PluginFactoryManager& operator=(const PluginFactoryManager&) = delete;  // stop default
0038     ~PluginFactoryManager();
0039 
0040     typedef std::vector<const PluginFactoryBase*>::const_iterator const_iterator;
0041     // ---------- const member functions ---------------------
0042     const_iterator begin() const;
0043     const_iterator end() const;
0044 
0045     // ---------- static member functions --------------------
0046     static PluginFactoryManager* get();
0047 
0048     // ---------- member functions ---------------------------
0049     void addFactory(const PluginFactoryBase*);
0050     edm::signalslot::Signal<void(const PluginFactoryBase*)> newFactory_;
0051 
0052   private:
0053     PluginFactoryManager();
0054 
0055     // ---------- member data --------------------------------
0056     std::vector<const PluginFactoryBase*> factories_;
0057   };
0058 
0059 }  // namespace edmplugin
0060 #endif