29 #ifndef PT_SYSTEM_LIBRARY_H
30 #define PT_SYSTEM_LIBRARY_H
32 #include <Pt/System/Api.h>
33 #include <Pt/System/SystemError.h>
34 #include <Pt/System/Path.h>
153 {
return this->resolve(symbol); }
158 void* resolve(
const char* symbol)
const;
162 operator const void*()
const;
168 Symbol getSymbol(
const char* symbol)
const;
172 bool operator!()
const;
176 const Path& path()
const;
182 static const char* suffix();
188 static const char* prefix();
196 class LibraryImpl* _impl;
216 : _lib(lib), _sym(sym)
231 operator void*()
const
243 #endif // PT_SYSTEM_LIBRARY_H
Symbol()
Default constructor.
Definition: Library.h:209
Symbol resolved from a shared library.
Definition: Library.h:204
Represents a path in the file-system.
Definition: Path.h:47
const std::string & symbol() const
Returns the symbol, which was not found.
Definition: Library.h:61
Thrown, when a symbol is not found in a library.
Definition: Library.h:45
Exception class indication a system error.
Definition: SystemError.h:42
~SymbolNotFound()
Destructor.
Definition: Library.h:57
Shared library loader.
Definition: Library.h:106
void * operator[](const char *symbol) const
Resolves the symbol symbol from the shared library Returns the address of the symbol or 0 if it was n...
Definition: Library.h:152
void * sym() const
Returns the symbol address.
Definition: Library.h:221
Symbol(const Library &lib, void *sym)
Construct with library and symbol address.
Definition: Library.h:215
const Library & library() const
Returns the library where the symbol was resolved.
Definition: Library.h:226