CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 // $Id: PluginCapabilities.h,v 1.3 2007/07/03 19:19:47 chrjones Exp $
20 //
21 
22 // system include files
23 #include <map>
24 #include <string>
25 
26 // user include files
28 // forward declarations
29 
30 namespace edmplugin {
31  class SharedLibrary;
32  class DummyFriend;
34 {
35  friend class DummyFriend;
36  public:
37  virtual ~PluginCapabilities();
38 
39  // ---------- const member functions ---------------------
40  virtual std::vector<PluginInfo> available() const;
41  virtual const std::string& category() const;
42 
43  // ---------- static member functions --------------------
44  static PluginCapabilities* get();
45 
46  // ---------- member functions ---------------------------
47  void load(const std::string& iName);
48 
49  //returns false if loading fails because iName is unknown
50  bool tryToLoad(const std::string& iName);
51 
53  bool tryToFind(const SharedLibrary& iLoadable);
54 
55  private:
57  PluginCapabilities(const PluginCapabilities&); // stop default
58 
59  const PluginCapabilities& operator=(const PluginCapabilities&); // stop default
60 
61  // ---------- member data --------------------------------
62  std::map<std::string, boost::filesystem::path> classToLoadable_;
63 };
64 
65 }
66 #endif
bool tryToFind(const SharedLibrary &iLoadable)
Check to see if any capabilities are in the file, returns &#39;true&#39; if found.
virtual const std::string & category() const
returns the name of the category to which this plugin factory belongs
const PluginCapabilities & operator=(const PluginCapabilities &)
virtual std::vector< PluginInfo > available() const
return info about all plugins which are already available in the program
bool tryToLoad(const std::string &iName)
std::map< std::string, boost::filesystem::path > classToLoadable_
void load(const std::string &iName)