Visualization LibraryA lightweight C++ OpenGL middleware for 2D/3D graphics |
[Home] [Tutorials] [All Classes] [Grouped Classes] |
Set of macros and templates implementing a simple and portable RTTI system. More...
#include <vlCore/MurmurHash3.hpp>Go to the source code of this file.
Classes | |
| struct | vl::TypeInfo |
| Represents a class type. More... | |
Namespaces | |
| namespace | vl |
Visualization Library namespace. | |
Defines | |
| #define | VL_GROUP(...) __VA_ARGS__ |
| #define | VL_TO_STR(...) #__VA_ARGS__ |
| #define | VL_INSTRUMENT_BASE_CLASS(ClassName) |
| #define | VL_INSTRUMENT_ABSTRACT_BASE_CLASS(ClassName) |
| #define | VL_INSTRUMENT_CLASS(ClassName, BaseClass) |
| #define | VL_INSTRUMENT_ABSTRACT_CLASS(ClassName, BaseClass) |
| #define | VL_INSTRUMENT_CLASS_2(ClassName, BaseClass1, BaseClass2) |
| #define | VL_INSTRUMENT_ABSTRACT_CLASS_2(ClassName, BaseClass1, BaseClass2) |
Functions | |
| 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.
| #define VL_GROUP | ( | ... | ) | __VA_ARGS__ |
Definition at line 77 of file TypeInfo.hpp.
| #define VL_TO_STR | ( | ... | ) | #__VA_ARGS__ |
Definition at line 78 of file TypeInfo.hpp.
| #define VL_INSTRUMENT_BASE_CLASS | ( | ClassName | ) |
public: \ /* static functions */ \ \ 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 functions */ \ \ 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(); \ } \ /* virtual Object* createThisType() const { return new ClassName; } */ \ private:
Definition at line 80 of file TypeInfo.hpp.
| #define VL_INSTRUMENT_ABSTRACT_BASE_CLASS | ( | ClassName | ) |
public: \ /* static functions */ \ \ 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 functions */ \ \ 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(); \ } \ /* virtual Object* createThisType() const = 0; */ \ private:
Definition at line 101 of file TypeInfo.hpp.
| #define VL_INSTRUMENT_CLASS | ( | ClassName, | |
| BaseClass | |||
| ) |
private: \ typedef BaseClass super; \ public: \ /* static functions */ \ \ 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 functions */ \ \ 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); \ } \ /* virtual Object* createThisType() const { return new ClassName; } */ \ private:
Definition at line 122 of file TypeInfo.hpp.
| #define VL_INSTRUMENT_ABSTRACT_CLASS | ( | ClassName, | |
| BaseClass | |||
| ) |
private: \ typedef BaseClass super; \ public: \ /* static functions */ \ \ 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 functions */ \ \ 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); \ } \ /* virtual Object* createThisType() const = 0; */ \ private:
Definition at line 145 of file TypeInfo.hpp.
| #define VL_INSTRUMENT_CLASS_2 | ( | ClassName, | |
| BaseClass1, | |||
| BaseClass2 | |||
| ) |
private: \ typedef BaseClass1 super1; \ typedef BaseClass2 super2; \ public: \ /* static functions */ \ \ 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 functions */ \ \ 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); \ } \ /* virtual Object* createThisType() const { return new ClassName; } */ \ private:
Definition at line 168 of file TypeInfo.hpp.
| #define VL_INSTRUMENT_ABSTRACT_CLASS_2 | ( | ClassName, | |
| BaseClass1, | |||
| BaseClass2 | |||
| ) |
private: \ typedef BaseClass1 super1; \ typedef BaseClass2 super2; \ public: \ /* static functions */ \ \ 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 functions */ \ \ 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); \ } \ /* virtual Object* createThisType() const = 0; */ \ private:
Definition at line 192 of file TypeInfo.hpp.