BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
Public Member Functions
BeeeOn::DIWCastImpl< From, To > Struct Template Referencefinal
Inheritance diagram for BeeeOn::DIWCastImpl< From, To >:
BeeeOn::DIWCast

Public Member Functions

bool wouldCast (const std::type_info &info) override
 
bool isSame (const DIWrapper &wrapper) override
 
void cast (void *raw, void *dest) override
 

Additional Inherited Members

- Static Public Member Functions inherited from BeeeOn::DIWCast
static void add (DIWCast *cast)
 
static DIWCastfind (const std::type_info &info, const DIWrapper &wrapper)
 

Member Function Documentation

template<typename From , typename To >
void BeeeOn::DIWCastImpl< From, To >::cast ( void *  raw,
void *  dest 
)
overridevirtual

This is he most magical thing in the universe. We get two pointers we know they point to Poco::SharedPtr<From> and to Poco::SharedPtr<To> and do the cast by assigning them.

This code can be executed only when wouldCast() and isSame() return true.

Implements BeeeOn::DIWCast.

template<typename From , typename To >
bool BeeeOn::DIWCastImpl< From, To >::isSame ( const DIWrapper wrapper)
overridevirtual

Test this cast works with the same base type as the given wrapper.

Implements BeeeOn::DIWCast.

template<typename From , typename To >
bool BeeeOn::DIWCastImpl< From, To >::wouldCast ( const std::type_info &  info)
overridevirtual

Test this cast can cast to the given type.

Implements BeeeOn::DIWCast.


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