IQRF Gateway Daemon
Public Member Functions | Static Public Member Functions | List of all members
StaticBuildFunctionMap Class Reference

Holds pointers to component loader functions. More...

#include <LaunchUtils.h>

Public Member Functions

virtual ~StaticBuildFunctionMap ()
 
void * getFunction (const std::string &fceName) const
 Get pointer to function. More...
 
void setFunction (const std::string &fceName, void *fcePtr)
 Set pointer to function. More...
 

Static Public Member Functions

static StaticBuildFunctionMapget ()
 StaticBuildFunctionMap singleton getter. More...
 

Detailed Description

Holds pointers to component loader functions.

Constructor & Destructor Documentation

◆ ~StaticBuildFunctionMap()

virtual StaticBuildFunctionMap::~StaticBuildFunctionMap ( )
inlinevirtual

Member Function Documentation

◆ get()

static StaticBuildFunctionMap& StaticBuildFunctionMap::get ( )
inlinestatic

StaticBuildFunctionMap singleton getter.

◆ getFunction()

void* StaticBuildFunctionMap::getFunction ( const std::string &  fceName) const
inline

Get pointer to function.

Parameters
[in]fceNamefunction name
Returns
pointer to function if exists else nullptr

Searches the map and returns pointer to function with passed nameFile. If the name doesn't exist it return nullptr

◆ setFunction()

void StaticBuildFunctionMap::setFunction ( const std::string &  fceName,
void *  fcePtr 
)
inline

Set pointer to function.

Parameters
[in]fceNamefunction name
[in]fcePtrfunction pointer
Exceptions
std::logic_errorin case the name is already stored

Insert pair [name, pointer] to the map. If the map already contains name it throws std::logic_error


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