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(const PluginCapabilities&) = delete; // stop default
37  const PluginCapabilities& operator=(const PluginCapabilities&) = delete; // stop default
38  ~PluginCapabilities() override;
39 
40  // ---------- const member functions ---------------------
41  std::vector<PluginInfo> available() const override;
42  const std::string& category() const override;
43 
44  // ---------- static member functions --------------------
45  static PluginCapabilities* get();
46 
47  // ---------- member functions ---------------------------
48  void load(const std::string& iName);
49 
50  //returns false if loading fails because iName is unknown
51  bool tryToLoad(const std::string& iName);
52 
54  bool tryToFind(const SharedLibrary& iLoadable);
55 
56  private:
58 
59  // ---------- member data --------------------------------
60  std::map<std::string, std::filesystem::path> classToLoadable_;
61  };
62 
63 } // namespace edmplugin
64 #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
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:60
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
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
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