25#define MYGUI_RTTI_BASE(BaseType) \
27 typedef BaseType RTTIBase; \
28 MYGUI_DECLARE_TYPE_NAME(BaseType,) \
30 virtual bool isType(const std::type_info& _type) const { return typeid(BaseType) == _type; } \
32 template<typename Type> bool isType() const { return isType(typeid(Type)); } \
36 template<typename Type> Type* castType(bool _throw = true) \
38 if (this->isType<Type>()) return static_cast<Type*>(this); \
39 MYGUI_ASSERT(!_throw, "Error cast type '" << this->getTypeName() << "' to type '" << Type::getClassTypeName() << "' ."); \
45 template<typename Type> const Type* castType(bool _throw = true) const \