Thea
Public Member Functions | Protected Member Functions | List of all members
DynLib Class Reference

A dynamically loaded library. More...

#include <DynLib.hpp>

Inheritance diagram for DynLib:
NamedObject INamedObject

Public Member Functions

char const * getName () const
 Get the name of the object. More...
 
void * getSymbol (std::string const &sym_name) const
 Returns the address of the given symbol from the loaded library. More...
 
int8 setName (char const *s)
 Set the name of the object from a C-style string. More...
 
virtual int8 setName (std::string const &s)
 Set the name of the object from a std::string. More...
 

Protected Member Functions

std::string const & getNameStr () const
 Access the name string directly, for efficiency. More...
 

Detailed Description

A dynamically loaded library.

Definition at line 61 of file DynLib.hpp.

Member Function Documentation

char const* getName ( ) const
virtualinherited

Get the name of the object.

Implements INamedObject.

Definition at line 78 of file NamedObject.hpp.

std::string const& getNameStr ( ) const
protectedinherited

Access the name string directly, for efficiency.

Definition at line 98 of file NamedObject.hpp.

void * getSymbol ( std::string const &  sym_name) const

Returns the address of the given symbol from the loaded library.

Parameters
sym_nameThe name of the symbol to search for
Returns
A handle to the symbol on success, nullptr on failure.

Definition at line 158 of file DynLib.cpp.

int8 setName ( char const *  s)
virtualinherited

Set the name of the object from a C-style string.

Returns
True if the name was successfully set, else false (e.g. if the name is read-only). In the default implementation, the function always returns true.

Implements INamedObject.

Definition at line 86 of file NamedObject.hpp.

virtual int8 setName ( std::string const &  s)
virtualinherited

Set the name of the object from a std::string.

Returns
True if the name was successfully set, else false (e.g. if the name is read-only). In the default implementation, the function always returns true.

Definition at line 94 of file NamedObject.hpp.


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