18 #include "dtoolbase.h"
90 MC_deleted_chain_active,
91 MC_deleted_chain_inactive,
98 INLINE TypeHandle(
const TypeHandle ©);
100 EXTENSION(
static TypeHandle make(PyTypeObject *classobj));
102 INLINE
bool operator == (
const TypeHandle &other)
const;
103 INLINE
bool operator != (
const TypeHandle &other)
const;
104 INLINE
bool operator < (
const TypeHandle &other)
const;
105 INLINE
bool operator <= (
const TypeHandle &other)
const;
106 INLINE
bool operator > (
const TypeHandle &other)
const;
107 INLINE
bool operator >= (
const TypeHandle &other)
const;
108 INLINE
int compare_to(
const TypeHandle &other)
const;
109 INLINE
size_t get_hash()
const;
112 INLINE
bool is_derived_from(TypeHandle parent,
116 INLINE TypeHandle get_parent_class(
int index)
const;
119 INLINE TypeHandle get_child_class(
int index)
const;
121 INLINE TypeHandle get_parent_towards(TypeHandle ancestor,
124 INLINE
int get_best_parent_from_Set(
const std::set< int > &legal_vals)
const;
126 #ifdef DO_MEMORY_USAGE
127 int get_memory_usage(MemoryClass memory_class)
const;
128 void inc_memory_usage(MemoryClass memory_class,
int size);
129 void dec_memory_usage(MemoryClass memory_class,
int size);
131 static CONSTEXPR
int get_memory_usage(MemoryClass) {
return 0; }
132 INLINE
void inc_memory_usage(MemoryClass,
int) { }
133 INLINE
void dec_memory_usage(MemoryClass,
int) { }
134 #endif // DO_MEMORY_USAGE
136 INLINE
int get_index()
const;
137 INLINE
void output(ostream &out)
const;
138 INLINE
static TypeHandle none();
139 INLINE
operator bool ()
const;
143 static TypeHandle _none;
151 INLINE ostream &operator << (ostream &out,
TypeHandle type) {
156 EXPCL_DTOOL ostream &operator << (ostream &out, TypeHandle::MemoryClass mem_class);
162 #include "typeRegistry.h"
164 #include "typeHandle.I"
This is an abstract class that all classes which use TypeHandle, and also provide virtual functions t...
An STL function object class, this is intended to be used on any ordered collection of class objects ...
The TypeRegistry class maintains all the assigned TypeHandles in a given system.
TypeHandle is the identifier used to differentiate C++ class types.