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, boost::filesystem::path> classToLoadable_;
62  };
63 
64 } // namespace edmplugin
65 #endif
bool tryToFind(const SharedLibrary &iLoadable)
Check to see if any capabilities are in the file, returns &#39;true&#39; if found.
std::vector< PluginInfo > available() const override
return info about all plugins which are already available in the program
bool tryToLoad(const std::string &iName)
const PluginCapabilities & operator=(const PluginCapabilities &)=delete
std::map< std::string, boost::filesystem::path > classToLoadable_
const std::string & category() const override
returns the name of the category to which this plugin factory belongs
void load(const std::string &iName)