Set of macros and templates implementing a simple and portable RTTI system.
More...
Go to the source code of this file.
|
| vl |
| Visualization Library main namespace.
|
|
|
template<class B , class A > |
B * | vl::cast (A *obj) |
|
template<class B , class A > |
const B * | vl::cast_const (const A *obj) |
|
Set of macros and templates implementing a simple and portable RTTI system.
Definition in file TypeInfo.hpp.
◆ VL_GROUP
#define VL_GROUP |
( |
|
... | ) |
__VA_ARGS__ |
◆ VL_INSTRUMENT_ABSTRACT_BASE_CLASS
#define VL_INSTRUMENT_ABSTRACT_BASE_CLASS |
( |
|
ClassName | ) |
|
Value:public: \
\ \
static
const char* Name() {
return VL_TO_STR(ClassName); } \ \
static const ::vl::TypeInfo& Type() {
static const ::vl::TypeInfo class_type(
VL_TO_STR(ClassName));
return class_type; } \
\
\ \
virtual
const char* className()
const {
return VL_TO_STR(ClassName); } \ \
virtual const ::vl::TypeInfo& classType() const { return Type(); } \ \
virtual bool isOfType(const ::vl::TypeInfo& type) const \
{ \
return type == Type(); \
} \
\
private:
Definition at line 101 of file TypeInfo.hpp.
◆ VL_INSTRUMENT_ABSTRACT_CLASS
#define VL_INSTRUMENT_ABSTRACT_CLASS |
( |
|
ClassName, |
|
|
|
BaseClass |
|
) |
| |
Value:private: \
typedef BaseClass super; \
public: \
\ \
static
const char* Name() {
return VL_TO_STR(ClassName); } \ \
static const ::vl::TypeInfo& Type() {
static const ::vl::TypeInfo class_type(
VL_TO_STR(ClassName));
return class_type; } \
\
\ \
virtual
const char* className()
const {
return VL_TO_STR(ClassName); } \ \
virtual const ::vl::TypeInfo& classType() const { return Type(); } \ \
virtual bool isOfType(const ::vl::TypeInfo& type) const \
{ \
return type == Type() || super::isOfType(type); \
} \
\
private:
Definition at line 145 of file TypeInfo.hpp.
◆ VL_INSTRUMENT_ABSTRACT_CLASS_2
#define VL_INSTRUMENT_ABSTRACT_CLASS_2 |
( |
|
ClassName, |
|
|
|
BaseClass1, |
|
|
|
BaseClass2 |
|
) |
| |
Value:private: \
typedef BaseClass1 super1; \
typedef BaseClass2 super2; \
public: \
\ \
static
const char* Name() {
return VL_TO_STR(ClassName); } \ \
static const ::vl::TypeInfo& Type() {
static const ::vl::TypeInfo class_type(
VL_TO_STR(ClassName));
return class_type; } \
\
\ \
virtual
const char* className()
const {
return VL_TO_STR(ClassName); } \ \
virtual const ::vl::TypeInfo& classType() const { return Type(); } \ \
virtual bool isOfType(const ::vl::TypeInfo& type) const \
{ \
return type == Type() || super1::isOfType(type) || super2::isOfType(type); \
} \
\
private:
Definition at line 192 of file TypeInfo.hpp.
◆ VL_INSTRUMENT_BASE_CLASS
#define VL_INSTRUMENT_BASE_CLASS |
( |
|
ClassName | ) |
|
Value:public: \
\ \
static
const char* Name() {
return VL_TO_STR(ClassName); } \ \
static const ::vl::TypeInfo& Type() {
static const ::vl::TypeInfo class_type(
VL_TO_STR(ClassName));
return class_type; } \
\
\ \
virtual
const char* className()
const {
return VL_TO_STR(ClassName); } \ \
virtual const ::vl::TypeInfo& classType() const { return Type(); } \ \
virtual bool isOfType(const ::vl::TypeInfo& type) const \
{ \
return type == Type(); \
} \
\
private:
Definition at line 80 of file TypeInfo.hpp.
◆ VL_INSTRUMENT_CLASS
#define VL_INSTRUMENT_CLASS |
( |
|
ClassName, |
|
|
|
BaseClass |
|
) |
| |
Value:private: \
typedef BaseClass super; \
public: \
\ \
static
const char* Name() {
return VL_TO_STR(ClassName); } \ \
static const ::vl::TypeInfo& Type() {
static const ::vl::TypeInfo class_type(
VL_TO_STR(ClassName));
return class_type; } \
\
\ \
virtual
const char* className()
const {
return VL_TO_STR(ClassName); } \ \
virtual const ::vl::TypeInfo& classType() const { return Type(); } \ \
virtual bool isOfType(const ::vl::TypeInfo& type) const \
{ \
return type == Type() || super::isOfType(type); \
} \
\
private:
Definition at line 122 of file TypeInfo.hpp.
◆ VL_INSTRUMENT_CLASS_2
#define VL_INSTRUMENT_CLASS_2 |
( |
|
ClassName, |
|
|
|
BaseClass1, |
|
|
|
BaseClass2 |
|
) |
| |
Value:private: \
typedef BaseClass1 super1; \
typedef BaseClass2 super2; \
public: \
\ \
static
const char* Name() {
return VL_TO_STR(ClassName); } \ \
static const ::vl::TypeInfo& Type() {
static const ::vl::TypeInfo class_type(
VL_TO_STR(ClassName));
return class_type; } \
\
\ \
virtual
const char* className()
const {
return VL_TO_STR(ClassName); } \ \
virtual const ::vl::TypeInfo& classType() const { return Type(); } \ \
virtual bool isOfType(const ::vl::TypeInfo& type) const \
{ \
return type == Type() || super1::isOfType(type) || super2::isOfType(type); \
} \
\
private:
Definition at line 168 of file TypeInfo.hpp.
◆ VL_TO_STR
#define VL_TO_STR |
( |
|
... | ) |
#__VA_ARGS__ |