31#define MYGUI_RTTI_BASE(BaseType) \
33 typedef BaseType RTTIBase; \
34 MYGUI_DECLARE_TYPE_NAME(BaseType, ) \
36 virtual bool isType(const std::type_info& _type) const \
38 return typeid(BaseType) == _type; \
41 template<typename Type> \
44 return isType(typeid(Type)); \
49 template<typename Type> \
50 Type* castType(bool _throw = true) \
52 if (this->isType<Type>()) \
53 return static_cast<Type*>(this); \
56 "Error cast type '" << this->getTypeName() << "' to type '" << Type::getClassTypeName() << "' ."); \
62 template<typename Type> \
63 const Type* castType(bool _throw = true) const \
65 if (this->isType<Type>()) \
66 return static_cast<Type*>(this); \