MDAL
Classes | Public Member Functions | Static Public Member Functions | List of all members
MDAL::Library Class Reference

Class to handle dynamic library. The loaded library is implicity shared when copying this object. More...

#include <mdal_utils.hpp>

Public Member Functions

 Library (std::string libraryFile)
 Creater a instance from a library file.
 
 Library (const Library &other)
 
Libraryoperator= (const Library &other)
 
bool isValid ()
 Returns whether the library is valid after loading the file if needed.
 
template<typename T , typename ... Ts>
std::function< T(Ts ... args)> getSymbol (const std::string &symbolName)
 Returns a function from a symbol name. More...
 

Static Public Member Functions

static std::vector< std::string > libraryFilesInDir (const std::string &dirPath)
 Returns a list of library file in the folder dirPath.
 

Detailed Description

Class to handle dynamic library. The loaded library is implicity shared when copying this object.

Member Function Documentation

◆ getSymbol()

template<typename T , typename ... Ts>
std::function<T( Ts ... args )> MDAL::Library::getSymbol ( const std::string &  symbolName)
inline

Returns a function from a symbol name.

Caller needs to define what are the types of the arguments and of the returned value : <Type of the returned Value, Type of arg1, Type of arg2, ...>


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