NebulaStream  0.6.213
NebulaStream is a data and application management framework for the internet of things
NES::Compiler::SharedLibrary Class Reference

Represents a @DynamicObject, which relies on a shared library. More...

#include <SharedLibrary.hpp>

Collaboration diagram for NES::Compiler::SharedLibrary:
[legend]

Public Member Functions

 SharedLibrary (void *shareLib, std::string soAbsolutePath)
 Creates a new @SharedLibrary Object. More...
 
 ~SharedLibrary () override
 Destructor for the shared library. Automatically unloads the shared library from memory. More...
 
- Public Member Functions inherited from NES::Compiler::DynamicObject
template<typename Function >
Function getInvocableMember (const std::string &member)
 Returns an invocable member of the shared object and cast its to the provided template. More...
 
virtual ~DynamicObject ()=default
 Destructor. More...
 

Static Public Member Functions

static SharedLibraryPtr load (const std::string &absoluteFilePath)
 Loads a shared library from a specific path. More...
 

Protected Member Functions

void * getInvocableFunctionPtr (const std::string &member) override
 Returns a untyped function pointer to a specific symbol. More...
 

Detailed Description

Represents a @DynamicObject, which relies on a shared library.

Constructor & Destructor Documentation

◆ SharedLibrary()

NES::Compiler::SharedLibrary::SharedLibrary ( void *  shareLib,
std::string  soAbsolutePath 
)
explicit

Creates a new @SharedLibrary Object.

Parameters
shareLib
soAbsolutePathabsolute path where so file is stored

References NES_ASSERT.

◆ ~SharedLibrary()

NES::Compiler::SharedLibrary::~SharedLibrary ( )
override

Destructor for the shared library. Automatically unloads the shared library from memory.

References NES_ERROR.

Member Function Documentation

◆ getInvocableFunctionPtr()

void * NES::Compiler::SharedLibrary::getInvocableFunctionPtr ( const std::string &  member)
overrideprotectedvirtual

Returns a untyped function pointer to a specific symbol.

Parameters
memberon the dynamic object, currently provided as a MangledName.
Returns
function ptr

Implements NES::Compiler::DynamicObject.

References NES_ERROR.

◆ load()

SharedLibraryPtr NES::Compiler::SharedLibrary::load ( const std::string &  absoluteFilePath)
static

Loads a shared library from a specific path.

Parameters
absoluteFilePathabsolute path where so file is stored
Returns
SharedLibraryPtr

References NES_ERROR.

Referenced by NES::Compiler::CPPCompiler::compile(), and TEST_F().

Here is the caller graph for this function:

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