sead
Loading...
Searching...
No Matches
seadRuntimeTypeInfo.h File Reference

Go to the source code of this file.

Classes

struct  sead::RuntimeTypeInfo::Interface
struct  sead::RuntimeTypeInfo::Root
struct  sead::RuntimeTypeInfo::Derive< Super >

Namespaces

namespace  sead
namespace  sead::RuntimeTypeInfo

Macros

#define SEAD_RTTI_BASE(CLASS)
#define SEAD_RTTI_OVERRIDE(CLASS, BASE)
#define SEAD_RTTI_OVERRIDE_INLINE(CLASS, BASE)
#define SEAD_RTTI_BASE_IMPL(CLASS)
#define SEAD_RTTI_OVERRIDE_IMPL(CLASS, BASE)

Functions

template<typename DerivedType, typename Type>
bool sead::IsDerivedTypes (const Type *ptr)
template<typename DerivedType, typename Type>
DerivedType * sead::DynamicCast (Type *ptr)
template<typename DerivedType, typename Type>
const DerivedType * sead::DynamicCast (const Type *ptr)

Macro Definition Documentation

◆ SEAD_RTTI_BASE

#define SEAD_RTTI_BASE ( CLASS)
Value:
private: \
static const sead::RuntimeTypeInfo::Root sTypeInfo; \
\
public: \
static const sead::RuntimeTypeInfo::Interface* getRuntimeTypeInfoStatic() \
{ \
return &sTypeInfo; \
} \
\
virtual bool checkDerivedRuntimeTypeInfo(const sead::RuntimeTypeInfo::Interface* type) const \
{ \
const sead::RuntimeTypeInfo::Interface* clsTypeInfo = CLASS::getRuntimeTypeInfoStatic(); \
return type == clsTypeInfo; \
} \
\
virtual const sead::RuntimeTypeInfo::Interface* getRuntimeTypeInfo() const \
{ \
return getRuntimeTypeInfoStatic(); \
}
Definition seadRuntimeTypeInfo.h:9
Definition seadRuntimeTypeInfo.h:19

◆ SEAD_RTTI_OVERRIDE

#define SEAD_RTTI_OVERRIDE ( CLASS,
BASE )
Value:
private: \
static const sead::RuntimeTypeInfo::Derive<BASE> sTypeInfo; \
\
public: \
static const sead::RuntimeTypeInfo::Interface* getRuntimeTypeInfoStatic() \
{ \
return &sTypeInfo; \
} \
\
bool checkDerivedRuntimeTypeInfo(const sead::RuntimeTypeInfo::Interface* type) const override \
{ \
const sead::RuntimeTypeInfo::Interface* clsTypeInfo = CLASS::getRuntimeTypeInfoStatic(); \
if (type == clsTypeInfo) \
return true; \
\
return BASE::checkDerivedRuntimeTypeInfo(type); \
} \
\
const sead::RuntimeTypeInfo::Interface* getRuntimeTypeInfo() const override \
{ \
return getRuntimeTypeInfoStatic(); \
}
Definition seadRuntimeTypeInfo.h:30

◆ SEAD_RTTI_OVERRIDE_INLINE

#define SEAD_RTTI_OVERRIDE_INLINE ( CLASS,
BASE )
Value:
private: \
static inline const sead::RuntimeTypeInfo::Derive<BASE> sTypeInfo{}; \
\
public: \
static const sead::RuntimeTypeInfo::Interface* getRuntimeTypeInfoStatic() \
{ \
return &sTypeInfo; \
} \
\
bool checkDerivedRuntimeTypeInfo(const sead::RuntimeTypeInfo::Interface* type) const override \
{ \
const sead::RuntimeTypeInfo::Interface* clsTypeInfo = CLASS::getRuntimeTypeInfoStatic(); \
if (type == clsTypeInfo) \
return true; \
\
return BASE::checkDerivedRuntimeTypeInfo(type); \
} \
\
const sead::RuntimeTypeInfo::Interface* getRuntimeTypeInfo() const override \
{ \
return getRuntimeTypeInfoStatic(); \
}

◆ SEAD_RTTI_BASE_IMPL

#define SEAD_RTTI_BASE_IMPL ( CLASS)
Value:
const sead::RuntimeTypeInfo::Root CLASS::sTypeInfo;

◆ SEAD_RTTI_OVERRIDE_IMPL

#define SEAD_RTTI_OVERRIDE_IMPL ( CLASS,
BASE )
Value:
const sead::RuntimeTypeInfo::Derive<BASE> CLASS::sTypeInfo;