14 #ifndef TYPEREGISTRY_H
15 #define TYPEREGISTRY_H
47 void record_alternate_name(
TypeHandle type,
const std::string &name);
49 void record_python_type(
TypeHandle type, PyObject *python_type);
52 TypeHandle find_type(
const std::string &name)
const;
59 int get_num_typehandles();
61 MAKE_SEQ(get_typehandles, get_num_typehandles, get_typehandle);
63 int get_num_root_classes();
65 MAKE_SEQ(get_root_classes, get_num_root_classes, get_root_class);
78 static void reregister_types();
80 void write(std::ostream &out)
const;
85 MAKE_SEQ_PROPERTY(typehandles, get_num_typehandles, get_typehandle);
86 MAKE_SEQ_PROPERTY(root_classes, get_num_root_classes, get_root_class);
93 static void init_global_pointer();
97 INLINE
void freshen_derivations();
98 void rebuild_derivations();
100 void do_write(std::ostream &out)
const;
101 void write_node(std::ostream &out,
int indent_level,
104 static INLINE
void init_lock();
106 typedef std::vector<TypeRegistryNode *> HandleRegistry;
107 HandleRegistry _handle_registry;
109 typedef std::map<std::string, TypeRegistryNode *> NameRegistry;
110 NameRegistry _name_registry;
112 typedef std::vector<TypeRegistryNode *> RootClasses;
113 RootClasses _root_classes;
115 bool _derivations_fresh;