#include <iostream>
#include <typeinfo>
#include <memory>
Go to the source code of this file.
|
| datatools |
| The Bayeux/datatools library top-level namespace.
|
|
◆ DATATOOLS_CASTER_DECLARATION
#define DATATOOLS_CASTER_DECLARATION |
( |
|
From, |
|
|
|
ToBase, |
|
|
|
ToDaughter, |
|
|
|
CasterId, |
|
|
|
CasterGetter |
|
) |
| |
Value:private: \
static std::unique_ptr<datatools::caster<From,ToBase,ToDaughter> > CasterId; \
public: \
Macro to declare a caster class.
◆ DATATOOLS_CASTER_IMPLEMENTATION
#define DATATOOLS_CASTER_IMPLEMENTATION |
( |
|
From, |
|
|
|
ToBase, |
|
|
|
ToDaughter, |
|
|
|
CasterId, |
|
|
|
CasterGetter |
|
) |
| |
Value:std::unique_ptr<datatools::caster<From,ToBase,ToDaughter> > ToDaughter::CasterId; \
datatools::i_caster<From,ToBase>* ToDaughter::CasterGetter() const { \
if (ToDaughter::CasterId.get() == 0) { \
} \
return ToDaughter::CasterId.get(); \
} \
Macro to implement a caster class.
◆ cast()
virtual ToBase* caster::cast |
( |
From * |
| ) |
|
|
pure virtual |