Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
36 lines (29 sloc) 568 Bytes
#include "FluxEngine.h"
#include "TypeInfo.h"
TypeInfo::TypeInfo(const char* typeName, const TypeInfo* baseTypeInfo)
: m_TypeName(typeName),
m_Type(typeName),
m_pBaseTypeInfo(baseTypeInfo)
{
}
TypeInfo::~TypeInfo()
{
}
bool TypeInfo::IsTypeOf(const TypeInfo* typeInfo) const
{
check(typeInfo);
return IsTypeOf(typeInfo->GetType());
}
bool TypeInfo::IsTypeOf(const StringHash& type) const
{
const TypeInfo* pInfo = this;
while (pInfo != nullptr)
{
if (type == pInfo->m_Type)
{
return true;
}
pInfo = pInfo->m_pBaseTypeInfo;
}
return false;
}
You can’t perform that action at this time.