1 #include "reflection.h"
2 #include <msp/debug/demangle.h>
9 ClassBase::ClassBase(Reflector &r, type_index t):
12 name(Debug::demangle(t.name()))
15 bool ClassBase::is_direct_base_of(const ClassBase &other) const
17 return ranges::find(other.bases, this)!=other.bases.end();
20 bool ClassBase::is_base_of(const ClassBase &other) const
22 if(is_direct_base_of(other))
24 return ranges::any_of(other.bases, [this](const ClassBase *b){ return is_base_of(*b); });
27 } // namespace Reflection
28 } // namespace Msp::Game