1 #ifndef SIPLASPLAS_UTILITY_DYNAMICLIBRARY_HPP 2 #define SIPLASPLAS_UTILITY_DYNAMICLIBRARY_HPP 5 #include <unordered_map> 6 #include <siplasplas/utility/export.hpp> 71 class SIPLASPLAS_UTILITY_EXPORT
Symbol 82 const std::string& name()
const;
96 const void* handle()
const;
108 return reinterpret_cast<T
>(handle());
162 std::string _symbolName;
182 Symbol& getSymbol(
const std::string& name);
190 void* handle()
const;
197 const std::string& path()
const;
200 std::shared_ptr<void> _libraryHandle;
201 std::string _libraryPath;
203 std::unordered_map<std::string, Symbol> _loadedSymbols;
205 DynamicLibrary(
void* libraryHandle,
const std::string& libraryPath);
210 #endif // SIPLASPLAS_UTILITY_DYNAMICLIBRARY_HPP Represents a symbol loaded from a dynamic library.
Definition: dynamiclibrary.hpp:71
Definition: canary_allocator.hpp:7
const T & getObject() const
Returns the symbol interpreted as a const reference to an object.
Definition: dynamiclibrary.hpp:156
Provides a cross-platform interface to load symbols from shared libraries at runtime.
Definition: dynamiclibrary.hpp:27
T & getObject()
Returns the symbol interpreted as a reference to an object.
Definition: dynamiclibrary.hpp:131