Project
Loading...
Searching...
No Matches
o2::utils::DLLoaderBase< DerivedType > Class Template Reference

#include <DLLoaderBase.h>

Classes

struct  filename_decorations
 
struct  HandleDeleter
 

Public Types

enum  Options {
  none = 0 , global = RTLD_GLOBAL , local = RTLD_LOCAL , no_delete = RTLD_NODELETE ,
  no_load = RTLD_NOLOAD , lazy = RTLD_LAZY
}
 
using handle_t = void
 
using handle_ptr_t = handle_t *
 
using library_t = std::unique_ptr< handle_t, HandleDeleter >
 

Public Member Functions

bool addLibrary (const std::string &library)
 
bool unloadLibrary (const std::string &library)
 
void reset ()
 
bool hasSymbol (const std::string &library, const std::string &symbol)
 
template<typename Ret , typename... Args>
std::optional< Ret > executeFunction (const std::string &library, const std::string &fname, Args... args)
 
template<typename Ret , typename... Args>
Ret executeFunctionAlias (const std::string &library, const std::string &fname, Args... args)
 
 DLLoaderBase (const DLLoaderBase &)=delete
 
DLLoaderBaseoperator= (const DLLoaderBase &)=delete
 
 DLLoaderBase (DLLoaderBase &&)=delete
 
DLLoaderBaseoperator= (DLLoaderBase &&)=delete
 

Static Public Member Functions

static DerivedType & Instance ()
 

Protected Member Functions

 DLLoaderBase ()=default
 
 ~DLLoaderBase ()=default
 

Detailed Description

template<typename DerivedType>
class o2::utils::DLLoaderBase< DerivedType >

Definition at line 42 of file DLLoaderBase.h.

Member Typedef Documentation

◆ handle_ptr_t

template<typename DerivedType >
using o2::utils::DLLoaderBase< DerivedType >::handle_ptr_t = handle_t*

Definition at line 58 of file DLLoaderBase.h.

◆ handle_t

template<typename DerivedType >
using o2::utils::DLLoaderBase< DerivedType >::handle_t = void

Definition at line 57 of file DLLoaderBase.h.

◆ library_t

template<typename DerivedType >
using o2::utils::DLLoaderBase< DerivedType >::library_t = std::unique_ptr<handle_t, HandleDeleter>

Definition at line 67 of file DLLoaderBase.h.

Member Enumeration Documentation

◆ Options

template<typename DerivedType >
enum o2::utils::DLLoaderBase::Options
Enumerator
none 
global 
local 
no_delete 
no_load 
lazy 

Definition at line 49 of file DLLoaderBase.h.

Constructor & Destructor Documentation

◆ DLLoaderBase() [1/3]

template<typename DerivedType >
o2::utils::DLLoaderBase< DerivedType >::DLLoaderBase ( const DLLoaderBase< DerivedType > &  )
delete

◆ DLLoaderBase() [2/3]

template<typename DerivedType >
o2::utils::DLLoaderBase< DerivedType >::DLLoaderBase ( DLLoaderBase< DerivedType > &&  )
delete

◆ DLLoaderBase() [3/3]

template<typename DerivedType >
o2::utils::DLLoaderBase< DerivedType >::DLLoaderBase ( )
protecteddefault

◆ ~DLLoaderBase()

template<typename DerivedType >
o2::utils::DLLoaderBase< DerivedType >::~DLLoaderBase ( )
protecteddefault

Member Function Documentation

◆ addLibrary()

template<typename DerivedType >
bool o2::utils::DLLoaderBase< DerivedType >::addLibrary ( const std::string &  library)
inline

Definition at line 80 of file DLLoaderBase.h.

◆ executeFunction()

template<typename DerivedType >
template<typename Ret , typename... Args>
std::optional< Ret > o2::utils::DLLoaderBase< DerivedType >::executeFunction ( const std::string &  library,
const std::string &  fname,
Args...  args 
)
inline

Definition at line 172 of file DLLoaderBase.h.

◆ executeFunctionAlias()

template<typename DerivedType >
template<typename Ret , typename... Args>
Ret o2::utils::DLLoaderBase< DerivedType >::executeFunctionAlias ( const std::string &  library,
const std::string &  fname,
Args...  args 
)
inline

Definition at line 215 of file DLLoaderBase.h.

◆ hasSymbol()

template<typename DerivedType >
bool o2::utils::DLLoaderBase< DerivedType >::hasSymbol ( const std::string &  library,
const std::string &  symbol 
)
inline

Definition at line 148 of file DLLoaderBase.h.

◆ Instance()

template<typename DerivedType >
static DerivedType & o2::utils::DLLoaderBase< DerivedType >::Instance ( )
inlinestatic

Definition at line 73 of file DLLoaderBase.h.

◆ operator=() [1/2]

template<typename DerivedType >
DLLoaderBase & o2::utils::DLLoaderBase< DerivedType >::operator= ( const DLLoaderBase< DerivedType > &  )
delete

◆ operator=() [2/2]

template<typename DerivedType >
DLLoaderBase & o2::utils::DLLoaderBase< DerivedType >::operator= ( DLLoaderBase< DerivedType > &&  )
delete

◆ reset()

template<typename DerivedType >
void o2::utils::DLLoaderBase< DerivedType >::reset ( )
inline

Definition at line 141 of file DLLoaderBase.h.

◆ unloadLibrary()

template<typename DerivedType >
bool o2::utils::DLLoaderBase< DerivedType >::unloadLibrary ( const std::string &  library)
inline

Definition at line 126 of file DLLoaderBase.h.


The documentation for this class was generated from the following file: