bactria
0.0.1
The bactria library is a header-only C++14 library for profiling and tracing.
|
Typedefs | |
using | bactria::system::plugin_handle_t = void * |
The POSIX-specific handle type. More... | |
using | bactria::plugin_handle_t = system::plugin_handle_t |
The platform-specific plugin handle type. More... | |
Functions | |
auto | bactria::is_active () -> bool |
Checks whether the bactria library has been deactivated by the user. More... | |
auto | bactria::system::open_plugin (const char *path) |
The POSIX-specific plugin loader. More... | |
template<typename Sig > | |
auto | bactria::system::load_func (plugin_handle_t handle, Sig &ptr, const char *name) |
The POSIX-specific function loader. More... | |
auto | bactria::system::close_plugin (plugin_handle_t handle) noexcept |
The POSIX-specific plugin unloader. More... | |
auto | bactria::unload_plugin (plugin_handle_t handle) noexcept |
Unloads the plugin. More... | |
using bactria::plugin_handle_t = typedef system::plugin_handle_t |
The platform-specific plugin handle type.
A system-specific typedef for a plugin handle. This typedef is an abstraction for the various native handles, e.g. the handles returned by POSIX' dlopen()
and Windows' LoadLibrary()
.
using bactria::system::plugin_handle_t = typedef void* |
The POSIX-specific handle type.
Plugin handle type for POSIX systems.
|
inlinenoexcept |
The POSIX-specific plugin unloader.
This function closes a plugin loaded by open_plugin().
handle | The POSIX-specific plugin handle to close. |
|
inline |
Checks whether the bactria library has been deactivated by the user.
Checks whether bactria was deactivated by using the environment variable BACTRIA_DEACTIVATE
. This function should never be called by the user.
BACTRIA_DEACTIVATE
is not set). BACTRIA_DEACTIVATE
is set).
|
inline |
The POSIX-specific function loader.
Loads a function from the plugin specified by the user through environment variables.
Sig | The signature of the function to load from the plugin. |
handle | The POSIX-specific plugin handle. |
ptr | The function pointer to bind the plugin function to. |
name | The name of the function to load from the plugin. |
std::runtime_error | If loading of the function failed. |
|
inline |
The POSIX-specific plugin loader.
Opens the plugin specified by the user through the corresponding environment variable.
[in] | path | The file path to the plugin library. |
std::runtime_error | If loading of the plugin failed. |
|
inlinenoexcept |
Unloads the plugin.
Forwards an open library handle to the native functions for closing shared libraries.
handle | The handle to the plugin in question. |