Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:12:59

0001 #ifndef FWCore_PluginManager_SharedLibrary_h
0002 #define FWCore_PluginManager_SharedLibrary_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     PluginManager
0006 // Class  :     SharedLibrary
0007 //
0008 /**\class SharedLibrary SharedLibrary.h FWCore/PluginManager/interface/SharedLibrary.h
0009 
0010  Description: Handles the loading of a SharedLibrary
0011 
0012  Usage:
0013     <usage>
0014 
0015 */
0016 //
0017 // Original Author:  Chris Jones
0018 //         Created:  Thu Apr  5 15:30:08 EDT 2007
0019 //
0020 
0021 // system include files
0022 #include <filesystem>
0023 
0024 // user include files
0025 
0026 // forward declarations
0027 
0028 namespace edmplugin {
0029   class SharedLibrary {
0030   public:
0031     SharedLibrary(const std::filesystem::path& iName);
0032     SharedLibrary(const SharedLibrary&) = delete;                   // stop default
0033     const SharedLibrary& operator=(const SharedLibrary&) = delete;  // stop default
0034     ~SharedLibrary();
0035 
0036     // ---------- const member functions ---------------------
0037     bool symbol(const std::string& iSymbolName, void*& iSymbol) const;
0038     const std::filesystem::path& path() const { return path_; }
0039 
0040     // ---------- static member functions --------------------
0041 
0042     // ---------- member functions ---------------------------
0043 
0044   private:
0045     // ---------- member data --------------------------------
0046     void* libraryHandle_;
0047     std::filesystem::path path_;
0048   };
0049 
0050 }  // namespace edmplugin
0051 #endif