OpenWalnut  1.3.1
Public Member Functions | Public Attributes | List of all members
WSharedLib::data Struct Reference

Simple class holding an opened library. More...

Public Member Functions

 ~data ()
 Destructor.
 data (const std::string &path)
 Constructor.
func_ptr_type findFunction (const std::string &name)
 Searches the lib for the specified function symbol and returns it.
void * findVariable (const std::string &name)
 Searches the lib for the specified symbol and returns it.

Public Attributes

const std::string m_path
 Path of lib.
void * m_dl
 Handle describing the loaded lib.

Detailed Description

Simple class holding an opened library.

Definition at line 158 of file WSharedLib.cpp.

Constructor & Destructor Documentation

WSharedLib::data::~data ( )
inline

Destructor.

Closes the previously opened library handle.

Definition at line 173 of file WSharedLib.cpp.

References m_dl.

WSharedLib::data::data ( const std::string &  path)
inlineexplicit

Constructor.

Opens and loads the library.

See Also
WSharedLib::WSharedLib for details.
Parameters
paththe lib to open

Definition at line 185 of file WSharedLib.cpp.

References m_dl, and m_path.

Member Function Documentation

func_ptr_type WSharedLib::data::findFunction ( const std::string &  name)
inline

Searches the lib for the specified function symbol and returns it.

Parameters
namethe name of the function
Returns
the pointer to the requested function
Exceptions
WLibraryFetchFailedthrown if the symbol could not be found.

Definition at line 205 of file WSharedLib.cpp.

References findVariable().

Referenced by WSharedLib::findFunction().

void* WSharedLib::data::findVariable ( const std::string &  name)
inline

Searches the lib for the specified symbol and returns it.

Parameters
namethe name of the symbol to search.
Returns
pointer to the symbol.
Exceptions
WLibraryFetchFailedthrown if the symbol could not be found.

Definition at line 226 of file WSharedLib.cpp.

References m_dl.

Referenced by findFunction(), and WSharedLib::findVariable().

Member Data Documentation

void* WSharedLib::data::m_dl

Handle describing the loaded lib.

Definition at line 168 of file WSharedLib.cpp.

Referenced by data(), findVariable(), and ~data().

const std::string WSharedLib::data::m_path

Path of lib.

Definition at line 163 of file WSharedLib.cpp.

Referenced by data().


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