Go to the source code of this file.
Defines |
#define | inlib_cast |
#define | INLIB_CAST(a__obj, a__cls) dynamic_cast<a__cls*>(&a__obj) |
#define | INLIB_CONST_CAST(a__obj, a__cls) dynamic_cast<const a__cls*>(&a__obj) |
#define | INLIB_SAFE_CAST(a__obj, a__cls) (a__cls*)(a__obj).cast(#a__cls) |
#define | INLIB_SCAST(a__cls) (void*)static_cast<const a__cls*>(this) |
#define | INLIB_IF_CAST(a__cls) if(a_class==#a__cls) {return (void*)static_cast<const a__cls*>(this);} |
#define | INLIB_SELF(a__cls) a__cls& self = const_cast<a__cls&>(*this) |
Define Documentation
Definition at line 5 of file cast.
#define INLIB_CAST |
( |
|
a__obj, |
|
|
|
a__cls |
|
) |
| dynamic_cast<a__cls*>(&a__obj) |
Definition at line 13 of file cast.
#define INLIB_CONST_CAST |
( |
|
a__obj, |
|
|
|
a__cls |
|
) |
| dynamic_cast<const a__cls*>(&a__obj) |
Definition at line 14 of file cast.
#define INLIB_IF_CAST |
( |
|
a__cls | ) |
if(a_class==#a__cls) {return (void*)static_cast<const a__cls*>(this);} |
Definition at line 22 of file cast.
#define INLIB_SAFE_CAST |
( |
|
a__obj, |
|
|
|
a__cls |
|
) |
| (a__cls*)(a__obj).cast(#a__cls) |
Definition at line 17 of file cast.
#define INLIB_SCAST |
( |
|
a__cls | ) |
(void*)static_cast<const a__cls*>(this) |
Definition at line 20 of file cast.
#define INLIB_SELF |
( |
|
a__cls | ) |
a__cls& self = const_cast<a__cls&>(*this) |
Definition at line 26 of file cast.