Go to the documentation of this file. 1 #ifndef CNOID_UTIL_HIERARCHICAL_CLASS_REGISTRY_H
2 #define CNOID_UTIL_HIERARCHICAL_CLASS_REGISTRY_H
5 #include "exportdecl.h"
16 int registerClassAsTypeInfo(
const std::type_info& type,
const std::type_info& superType);
18 int superClassId(
int classId)
const;
19 int numRegisteredClasses()
const;
22 int getClassId(
const std::type_info& type,
int unknownClassId = -1)
const;
29 template<
class BaseClass>
39 template<
class TargetClass,
class SuperClass = BaseClass>
45 template<
class Object>
50 template<
class Object>
51 int classId(
int unknownClassId = -1)
const {
52 return getClassId(
typeid(Object), unknownClassId);
55 int classId(
const std::type_info& type,
int unknownClassId = -1)
const {
59 int classId(
const BaseClass*
object,
int unknownClassId = -1)
const {
60 return getClassId(
typeid(*
object), unknownClassId);
Definition: HierarchicalClassRegistry.h:30
int classId(const std::type_info &type, int unknownClassId=-1) const
Definition: HierarchicalClassRegistry.h:55
int classId(int unknownClassId=-1) const
Definition: HierarchicalClassRegistry.h:51
HierarchicalClassRegistry< BaseClass > & registerClass()
Definition: HierarchicalClassRegistry.h:40
int classId(const BaseClass *object, int unknownClassId=-1) const
Definition: HierarchicalClassRegistry.h:59
int getClassId(const std::type_info &type, int unknownClassId=-1) const
Definition: HierarchicalClassRegistry.cpp:76
Definition: AbstractSceneLoader.h:11
HierarchicalClassRegistry()
Definition: HierarchicalClassRegistry.h:33
bool hasRegistration() const
Definition: HierarchicalClassRegistry.h:46
Definition: HierarchicalClassRegistry.h:9
int registerClassAsTypeInfo(const std::type_info &type, const std::type_info &superType)
Definition: HierarchicalClassRegistry.cpp:38