gramods
Loading...
Searching...
No Matches
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
12BEGIN_NAMESPACE_GMCORE;
13
17class ImportLibrary
18 : public Object {
19
20public:
21
22 ImportLibrary();
23 ~ImportLibrary();
24
28 bool isLoaded();
29
33 void initialize() override;
34
40 void setLibraryFile(std::filesystem::path path);
41
48 void setLibrary(std::string file);
49
54 void setPrefix(std::string str);
55
61 void setSuffix(std::string str);
62
68 void setDbgSuffix(std::string str);
69
73 void *getSymbol(std::string name);
74
75 GM_OFI_DECLARE;
76
77private:
78
79 struct Impl;
80 std::unique_ptr<Impl> _impl;
81
82};
83
84END_NAMESPACE_GMCORE;
85
86#endif
void setDbgSuffix(std::string str)
Set a string to append to the library name, before the file suffix.
Definition ImportLibrary.cpp:151
void initialize() override
Called to initialize the Object.
Definition ImportLibrary.cpp:90
void setSuffix(std::string str)
Set a string to append to the library name.
Definition ImportLibrary.cpp:147
void setLibrary(std::string file)
Set name of library, used to create the name of the file.
Definition ImportLibrary.cpp:82
void setPrefix(std::string str)
Set a string to prepend to the library name.
Definition ImportLibrary.cpp:143
void * getSymbol(std::string name)
Retrieves the symbol/procedure address from the loaded library.
Definition ImportLibrary.cpp:135
bool isLoaded()
Check if the library has been successfully loaded.
Definition ImportLibrary.cpp:86
void setLibraryFile(std::filesystem::path path)
Set full path to library file.
Definition ImportLibrary.cpp:78
Object()
Initializes internal data.
Definition Object.hh:49
Definition ImportLibrary.cpp:22