PLCnext API Documentation  20.0.0.24462
Public Member Functions | List of all members
Arp::System::Commons::Runtime::SharedLibrary Class Reference

High level API to enable work with dynamically loadable shared libraries. More...

#include <SharedLibrary.hpp>

Public Member Functions

 SharedLibrary (void)
 Constructs an SharedLibrary instance. More...
 
 SharedLibrary (const SharedLibrary &arg)=delete
 Copy contructor. More...
 
SharedLibrary & operator= (const SharedLibrary &arg)=delete
 Assignment operator. More...
 
virtual ~SharedLibrary (void)
 Destructs this instance and frees all resouces. More...
 
void Load (const String &path)
 Loads the specified shared library. More...
 
void Unload (void)
 Unloads the shared library. More...
 
void * GetFunctionAddress (const String &symbolName)
 Returns the address where specified symbol is located in the memory. More...
 

Detailed Description

High level API to enable work with dynamically loadable shared libraries.

Constructor & Destructor Documentation

◆ SharedLibrary() [1/2]

Arp::System::Commons::Runtime::SharedLibrary::SharedLibrary ( void  )

Constructs an SharedLibrary instance.

◆ SharedLibrary() [2/2]

Arp::System::Commons::Runtime::SharedLibrary::SharedLibrary ( const SharedLibrary &  arg)
delete

Copy contructor.

◆ ~SharedLibrary()

virtual Arp::System::Commons::Runtime::SharedLibrary::~SharedLibrary ( void  )
virtual

Destructs this instance and frees all resouces.

Member Function Documentation

◆ GetFunctionAddress()

void* Arp::System::Commons::Runtime::SharedLibrary::GetFunctionAddress ( const String &  symbolName)

Returns the address where specified symbol is located in the memory.

Parameters
symbolNameName of queried symbol.
Returns
Valid memory address on success, NULL if symbol could not be found.

◆ Load()

void Arp::System::Commons::Runtime::SharedLibrary::Load ( const String &  path)

Loads the specified shared library.

Symbols exposed by the shared library are globally available after a successfull load.

Parameters
pathThe complete path to the library to load.
Exceptions
Arp::Exceptionif the library could not be loaded.

◆ operator=()

SharedLibrary& Arp::System::Commons::Runtime::SharedLibrary::operator= ( const SharedLibrary &  arg)
delete

Assignment operator.

◆ Unload()

void Arp::System::Commons::Runtime::SharedLibrary::Unload ( void  )

Unloads the shared library.

Exceptions
Arp::Exceptionin case the unload fails.

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