MyGUI_RTTI.h File Reference
`#include "MyGUI_Prerequest.h"`
`#include "MyGUI_Diagnostic.h"`
`#include <string>`
`#include <typeinfo>`

Go to the source code of this file.

## Namespaces

namespace | MyGUI

## Macros

#define | MYGUI_DECLARE_TYPE_NAME(Type, Override)
#define | MYGUI_RTTI_BASE(BaseType)
#define | MYGUI_RTTI_DERIVED(DerivedType)

## Macro Definition Documentation

## MYGUI_DECLARE_TYPE_NAME

#define MYGUI_DECLARE_TYPE_NAME | ( |  | Type,
|  |  | Override )

Value:
public: \
static std::string_view getClassTypeName() \
{ \
return #Type; \
} \ \
virtual std::string_view getTypeName() const Override \
{ \
return getClassTypeName(); \
}

Definition at line 19 of file MyGUI_RTTI.h.

## MYGUI_RTTI_BASE

#define MYGUI_RTTI_BASE | ( |  | BaseType | ) |

Definition at line 31 of file MyGUI_RTTI.h.

## MYGUI_RTTI_DERIVED

#define MYGUI_RTTI_DERIVED | ( |  | DerivedType | ) |

Value:
public: \
MYGUI_DECLARE_TYPE_NAME(DerivedType, override) \
typedef RTTIBase Base; \
typedef DerivedType RTTIBase; \ \
virtual bool isType(const std::type_info& _type) const override \
{ \
return typeid(DerivedType) == _type || Base::isType(_type); \
} \ \
template<typename Type> \
bool isType() const \
{ \
return isType(typeid(Type)); \
}

Definition at line 69 of file MyGUI_RTTI.h.