gramods
ImportLibrary.hh
1 
2 #ifndef GRAMODS_CORE_IMPORTLIBRARY
3 #define GRAMODS_CORE_IMPORTLIBRARY
4 
5 #include <gmCore/config.hh>
6 #include <gmCore/OFactory.hh>
7 #include <gmCore/Object.hh>
8 
9 #include <string>
10 #include <memory>
11 
12 #ifdef WIN32
13 # include <Windows.h>
14 #else
15 # include <dlfcn.h>
16 #endif
17 
18 BEGIN_NAMESPACE_GMCORE;
19 
24  : public Object {
25 
26 public:
27 
28  ImportLibrary();
29  ~ImportLibrary();
30 
34  bool isLoaded();
35 
39  void initialize() override;
40 
46  void setLibraryFile(std::filesystem::path path);
47 
54  void setLibrary(std::string file);
55 
60  void setPrefix(std::string str);
61 
67  void setSuffix(std::string str);
68 
74  void setDbgSuffix(std::string str);
75 
76  GM_OFI_DECLARE;
77 
78 private:
79 
80  struct Impl;
81  std::unique_ptr<Impl> _impl;
82 
83 };
84 
85 END_NAMESPACE_GMCORE;
86 
87 #endif
Loads a shared library and loads its nodes into the object factory.
Definition: ImportLibrary.hh:24
Base type for objects in the Gramods package for standardized handling of construction,...
Definition: Object.hh:42
Definition: ImportLibrary.cpp:16