#include <CeresEngine/Foundation/DynamicLibrary.hpp>
◆ NameSequence
A sequence of library name variants.
◆ NameVariant
A variant type that holds either a library name or a path to a DLL/.so/.dylib file.
◆ NativeHandle
A type that represents the native dynamic library handle.
◆ Binding
| Enumerator |
|---|
| Lazy | Perform lazy binding.
Only resolve symbols as the code that references them is executed. If the symbol is never referenced, then it is never normalize. (Lazy binding is only performed for function references; references to variables are always immediately bound when the library is loaded.)
|
| Immediate | All undefined symbols in the library are normalize before the constructor returns.
If this cannot be done, an error is returned.
|
◆ Sharing
| Enumerator |
|---|
| Global | The symbols defined by this library will be made available for symbol resolution of subsequently loaded libraries.
|
| Local | This is the converse of global.
Symbols defined in this library are not made available to resolve references in subsequently loaded libraries.
|
◆ DynamicLibrary() [1/5]
| CeresEngine::DynamicLibrary::DynamicLibrary |
( |
| ) |
|
◆ DynamicLibrary() [2/5]
Creates a new DynamicLibrary by loading the library at the given path.
- Parameters
-
| path | The library path |
| binding | The whether symbols should be bound immediately or lazily. |
| sharing | Whether symbols can be shared with subsequently loaded libraries |
◆ DynamicLibrary() [3/5]
Creates a new DynamicLibrary by loading the library by it's name.
- Parameters
-
| name | The library name |
| binding | The whether symbols should be bound immediately or lazily. |
| sharing | Whether symbols can be shared with subsequently loaded libraries |
◆ DynamicLibrary() [4/5]
◆ DynamicLibrary() [5/5]
| CeresEngine::DynamicLibrary::DynamicLibrary |
( |
DynamicLibrary && |
other | ) |
|
|
noexcept |
Creates a new DynamicLibrary by moving the contents of another.
- Parameters
-
| other | The instance to move from |
◆ ~DynamicLibrary()
| CeresEngine::DynamicLibrary::~DynamicLibrary |
( |
| ) |
|
|
noexcept |
Unloads the dynamic library (if loaded) and destroy the DynamicLibrary object.
◆ available() [1/4]
Checks if a DynamicLibrary can be loaded with the given path.
If this method returns true, it is safe to assume that you can construct a DynamicLibrary using DynamicLibrary(path).
- Parameters
-
◆ available() [2/4]
Checks if a DynamicLibrary can be loaded with the given name.
If this method returns true, it is safe to assume that you can construct a DynamicLibrary using tryOpen(names).
- Parameters
-
◆ available() [3/4]
Checks if a DynamicLibrary can be loaded with the given name.
If this method returns true, it is safe to assume that you can construct a DynamicLibrary using DynamicLibrary(name).
- Parameters
-
◆ available() [4/4]
template<typename... Ts>
| static bool CeresEngine::DynamicLibrary::available |
( |
Ts &&... |
names | ) |
|
|
inlinestatic |
Checks if a DynamicLibrary can be loaded with the given name.
If this method returns true, it is safe to assume that you can construct a DynamicLibrary using tryOpen(names).
- Parameters
-
◆ loaded()
| bool CeresEngine::DynamicLibrary::loaded |
( |
| ) |
const |
|
noexcept |
Checks if the library is loaded.
- Returns
true if the library is loaded.
◆ operator bool()
| CeresEngine::DynamicLibrary::operator bool |
( |
| ) |
const |
|
explicitnoexcept |
Checks if the library is loaded.
- Returns
true if the library is loaded.
◆ operator=() [1/2]
◆ operator=() [2/2]
Assigns the DynamicLibrary by moving the contents of another.
- Parameters
-
| other | The instance to move from |
- Returns
*this
◆ operator[]()
Resolves a symbol by it's name.
- Parameters
-
| symbolName | The symbol name to be normalize |
- Returns
- A pointer to the normalize symbol
◆ resolve() [1/2]
Resolves a symbol by it's name.
- Parameters
-
| symbolName | The symbol name to be normalize |
- Returns
- A pointer to the normalize symbol
◆ resolve() [2/2]
| T CeresEngine::DynamicLibrary::resolve |
( |
StringView |
symbolName | ) |
const |
|
noexcept |
Resolves a symbol by it's name.
- Parameters
-
| symbolName | The symbol name to be normalize |
- Template Parameters
-
- Returns
- A pointer to the normalize symbol
◆ tryOpen() [1/2]
Tries to open a DynamicLibrary from a sequence of names and paths.
- Parameters
-
| names | The library name sequence to attempt to load with |
- Returns
- The loaded library (if any).
◆ tryOpen() [2/2]
Tries to open a DynamicLibrary from a sequence of names and paths.
- Parameters
-
| names | The library name sequence to attempt to load with |
- Returns
- The loaded library (if any).
◆ unload()
| void CeresEngine::DynamicLibrary::unload |
( |
| ) |
|
|
noexcept |
◆ operator!= [1/2]
Checks if two DynamicLibrary instances do not point to the same loaded library.
- Parameters
-
| a | The first operand |
| b | The second operand |
- Returns
true if the libraries do not point to the same shared library object.
◆ operator!= [2/2]
Checks if a DynamicLibrary is loaded by comparing it to nullptr.
- Parameters
-
| library | The library to be checked |
- Returns
true if the library is loaded.
◆ operator== [1/2]
Checks if two DynamicLibrary instances point to the same loaded library.
- Parameters
-
| a | The first operand |
| b | The second operand |
- Returns
true if both libraries point to the same shared library object.
◆ operator== [2/2]
Checks if a DynamicLibrary is loaded by comparing it to nullptr.
- Parameters
-
| library | The library to be checked |
- Returns
true if the library is unloaded.
◆ mHandle
The native handle used to load the dynamic library.
◆ prefix
A prefix added to the library name.
This value is platform dependent.
◆ suffix
A suffix added to the library name.
This value is platform dependent.
The documentation for this class was generated from the following file:
- /Users/Rogiel/Developer/CeresEngine/Engine/Sources/CeresEngine/Foundation/DynamicLibrary.hpp