--- /dev/null
+#include "reflection.h"
+#include <msp/debug/demangle.h>
+
+using namespace std;
+
+namespace Msp::Game {
+namespace Reflection {
+
+ClassBase::ClassBase(Reflector &r, type_index t):
+ reflector(r),
+ type(t),
+ name(Debug::demangle(t.name()))
+{ }
+
+bool ClassBase::is_direct_base_of(const ClassBase &other) const
+{
+ return ranges::find(other.bases, this)!=other.bases.end();
+}
+
+bool ClassBase::is_base_of(const ClassBase &other) const
+{
+ if(is_direct_base_of(other))
+ return true;
+ return ranges::any_of(other.bases, [this](const ClassBase *b){ return is_base_of(*b); });
+}
+
+} // namespace Reflection
+} // namespace Msp::Game