00001 #ifndef FWCore_PluginManager_PluginCapabilities_h 00002 #define FWCore_PluginManager_PluginCapabilities_h 00003 // -*- C++ -*- 00004 // 00005 // Package: PluginManager 00006 // Class : PluginCapabilities 00007 // 00016 // 00017 // Original Author: Chris Jones 00018 // Created: Fri Apr 6 12:36:19 EDT 2007 00019 // $Id: PluginCapabilities.h,v 1.3 2007/07/03 19:19:47 chrjones Exp $ 00020 // 00021 00022 // system include files 00023 #include <map> 00024 #include <string> 00025 00026 // user include files 00027 #include "FWCore/PluginManager/interface/PluginFactoryBase.h" 00028 // forward declarations 00029 00030 namespace edmplugin { 00031 class SharedLibrary; 00032 class DummyFriend; 00033 class PluginCapabilities : public PluginFactoryBase 00034 { 00035 friend class DummyFriend; 00036 public: 00037 virtual ~PluginCapabilities(); 00038 00039 // ---------- const member functions --------------------- 00040 virtual std::vector<PluginInfo> available() const; 00041 virtual const std::string& category() const; 00042 00043 // ---------- static member functions -------------------- 00044 static PluginCapabilities* get(); 00045 00046 // ---------- member functions --------------------------- 00047 void load(const std::string& iName); 00048 00049 //returns false if loading fails because iName is unknown 00050 bool tryToLoad(const std::string& iName); 00051 00053 bool tryToFind(const SharedLibrary& iLoadable); 00054 00055 private: 00056 PluginCapabilities(); 00057 PluginCapabilities(const PluginCapabilities&); // stop default 00058 00059 const PluginCapabilities& operator=(const PluginCapabilities&); // stop default 00060 00061 // ---------- member data -------------------------------- 00062 std::map<std::string, boost::filesystem::path> classToLoadable_; 00063 }; 00064 00065 } 00066 #endif