MyGUI 3.4.1
Public Member Functions | Protected Member Functions | Protected Attributes | Friends
MyGUI::DynLib Class Reference

Resource holding data about a dynamic library. More...

#include <MyGUI_DynLib.h>

Public Member Functions

bool load ()
 
void unload ()
 
std::string getName (void) const
 Get the name of the library. More...
 
void * getSymbol (const std::string &strName) const noexcept
 

Protected Member Functions

 DynLib (const std::string &name)
 
std::string dynlibError () const
 Gets the last loading error. More...
 

Protected Attributes

std::string mName
 Name of library. More...
 
void * mInstance
 Handle to the loaded library. More...
 

Friends

class DynLibManager
 

Detailed Description

Resource holding data about a dynamic library.

Remarks
This class holds the data required to get symbols from libraries loaded at run-time (i.e. from DLL's for so's)

Definition at line 34 of file MyGUI_DynLib.h.

Constructor & Destructor Documentation

◆ DynLib()

MyGUI::DynLib::DynLib ( const std::string &  name)
protected

Definition at line 30 of file MyGUI_DynLib.cpp.

Member Function Documentation

◆ dynlibError()

std::string MyGUI::DynLib::dynlibError ( ) const
protected

Gets the last loading error.

Definition at line 99 of file MyGUI_DynLib.cpp.

◆ getName()

std::string MyGUI::DynLib::getName ( void  ) const

Get the name of the library.

Definition at line 126 of file MyGUI_DynLib.cpp.

◆ getSymbol()

void * MyGUI::DynLib::getSymbol ( const std::string &  strName) const
noexcept

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

Parameters
strNameThe name of the symbol to search for
Returns
If the function succeeds, the returned value is a handle to the symbol. If the function fails, the returned value is nullptr.

Definition at line 85 of file MyGUI_DynLib.cpp.

◆ load()

bool MyGUI::DynLib::load ( )

Load the library

Definition at line 36 of file MyGUI_DynLib.cpp.

◆ unload()

void MyGUI::DynLib::unload ( )

Unload the library

Definition at line 67 of file MyGUI_DynLib.cpp.

Friends And Related Function Documentation

◆ DynLibManager

friend class DynLibManager
friend

Definition at line 36 of file MyGUI_DynLib.h.

Field Documentation

◆ mInstance

void* MyGUI::DynLib::mInstance
protected

Handle to the loaded library.

Definition at line 73 of file MyGUI_DynLib.h.

◆ mName

std::string MyGUI::DynLib::mName
protected

Name of library.

Definition at line 70 of file MyGUI_DynLib.h.


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