CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
bool tryToFind(const SharedLibrary &iLoadable)
Check to see if any capabilities are in the file, returns &#39;true&#39; if found.
std::map< std::string, std::filesystem::path > classToLoadable_
const std::string & category() const override
returns the name of the category to which this plugin factory belongs
bool tryToLoad(const std::string &iName)
const PluginCapabilities & operator=(const PluginCapabilities &)=delete
std::vector< PluginInfo > available() const override
return info about all plugins which are already available in the program
void load(const std::string &iName)