CMS 3D CMS Logo

PluginCapabilities.h
Go to the documentation of this file.
1 #ifndef FWCore_PluginManager_PluginCapabilities_h
2 #define FWCore_PluginManager_PluginCapabilities_h
3 // -*- C++ -*-
4 //
5 // Package: PluginManager
6 // Class : PluginCapabilities
7 //
16 //
17 // Original Author: Chris Jones
18 // Created: Fri Apr 6 12:36:19 EDT 2007
19 //
20 
21 // system include files
22 #include <map>
23 #include <string>
24 
25 // user include files
27 // forward declarations
28 
29 namespace edmplugin {
30  class SharedLibrary;
31  class DummyFriend;
33  friend class DummyFriend;
34 
35  public:
36  ~PluginCapabilities() override;
37 
38  // ---------- const member functions ---------------------
39  std::vector<PluginInfo> available() const override;
40  const std::string& category() const override;
41 
42  // ---------- static member functions --------------------
43  static PluginCapabilities* get();
44 
45  // ---------- member functions ---------------------------
46  void load(const std::string& iName);
47 
48  //returns false if loading fails because iName is unknown
49  bool tryToLoad(const std::string& iName);
50 
52  bool tryToFind(const SharedLibrary& iLoadable);
53 
54  private:
56  PluginCapabilities(const PluginCapabilities&) = delete; // stop default
57 
58  const PluginCapabilities& operator=(const PluginCapabilities&) = delete; // stop default
59 
60  // ---------- member data --------------------------------
61  std::map<std::string, std::filesystem::path> classToLoadable_;
62  };
63 
64 } // namespace edmplugin
65 #endif
edmplugin
Definition: AlignmentAlgorithmPluginFactory.cc:9
edmplugin::PluginCapabilities::get
static PluginCapabilities * get()
Definition: PluginCapabilities.cc:156
edmplugin::PluginCapabilities::~PluginCapabilities
~PluginCapabilities() override
Definition: PluginCapabilities.cc:41
edmplugin::PluginCapabilities::PluginCapabilities
PluginCapabilities()
Definition: PluginCapabilities.cc:34
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edmplugin::PluginCapabilities::category
const std::string & category() const override
returns the name of the category to which this plugin factory belongs
Definition: PluginCapabilities.cc:148
edmplugin::PluginCapabilities::classToLoadable_
std::map< std::string, std::filesystem::path > classToLoadable_
Definition: PluginCapabilities.h:61
edmplugin::PluginCapabilities::available
std::vector< PluginInfo > available() const override
return info about all plugins which are already available in the program
Definition: PluginCapabilities.cc:133
edmplugin::PluginCapabilities::DummyFriend
friend class DummyFriend
Definition: PluginCapabilities.h:33
edmplugin::PluginCapabilities
Definition: PluginCapabilities.h:32
edmplugin::PluginCapabilities::tryToLoad
bool tryToLoad(const std::string &iName)
Definition: PluginCapabilities.cc:105
edmplugin::PluginFactoryBase
Definition: PluginFactoryBase.h:37
PluginFactoryBase.h
SharedLibrary
edmplugin::PluginCapabilities::tryToFind
bool tryToFind(const SharedLibrary &iLoadable)
Check to see if any capabilities are in the file, returns 'true' if found.
Definition: PluginCapabilities.cc:58
edmplugin::SharedLibrary
Definition: SharedLibrary.h:29
edmplugin::PluginCapabilities::operator=
const PluginCapabilities & operator=(const PluginCapabilities &)=delete
edmplugin::PluginCapabilities::load
void load(const std::string &iName)
Definition: PluginCapabilities.cc:83