BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
Public Member Functions | Static Public Member Functions
BeeeOn::DIWMethodHelper Struct Referenceabstract

#include <DIWrapper.h>

Inheritance diagram for BeeeOn::DIWMethodHelper:
BeeeOn::DIWHook BeeeOn::DIWListSetter BeeeOn::DIWMapSetter BeeeOn::DIWNumberSetter BeeeOn::DIWRefSetter BeeeOn::DIWTextSetter BeeeOn::DIWTimeSetter BeeeOn::DIWHookHandler< T, B > BeeeOn::DIWStringListSetter< T, B > BeeeOn::DIWStringStringMapSetter< T, B > BeeeOn::DIWBoolSetter< T, B > BeeeOn::DIWDoubleSetter< T, B > BeeeOn::DIWIntSetter< T, B > BeeeOn::DIWRawPtrSetter< T, B, I > BeeeOn::DIWSharedPtrSetter< T, B, I > BeeeOn::DIWCharSetter< T, B > BeeeOn::DIWStringSetter< T, B > BeeeOn::DIWTimespanSetter< T, B >

Public Member Functions

virtual std::string id () const =0
 

Static Public Member Functions

template<typename T , typename B >
static B & extractInstance (DIWrapper &w)
 

Detailed Description

Common class to be inherited by all setters helpers. The purpose is to be able to have all setters in a single map.

Member Function Documentation

template<typename T , typename B >
B & BeeeOn::DIWMethodHelper::extractInstance ( DIWrapper w)
static

Get instance of the given wrapper.

Extract instance of the given wrapper. We expect that the underlying wrapper holds an instance of T which is derived from B or T == B. If the wrapper is not AbstractDIWrapper<T>, then std::bad_cast is thrown.

Usually, the method is called with *this as the DIWrapper argument and thus we are sure it really is AbstractDIWrapper<T>. Also, the B must be castable from T. This should be assured by compile-time check during setter registration.


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