#include <typeRegistryNode.h>
Public Types | |
typedef pvector< TypeRegistryNode * > | Classes |
Public Member Functions | |
TypeRegistryNode (TypeHandle handle, const string &name, TypeHandle &ref) | |
void | clear_subtree () |
Removes any subtree definition previously set up via define_subtree(), in preparation for rebuilding the subtree data. | |
void | define_subtree () |
Indicates that this TypeRegistryNode is the top of a subtree within the inheritance graph (typically, this indicates a multiple-inheritance node). | |
Static Public Member Functions | |
bool | is_derived_from (const TypeRegistryNode *child, const TypeRegistryNode *base) |
Returns true if the child RegistryNode represents a class that inherits directly or indirectly from the class represented by the base RegistryNode. | |
TypeHandle | get_parent_towards (const TypeRegistryNode *child, const TypeRegistryNode *base) |
Returns the first parent class of child that is a descendant of the indicated base class. | |
Public Attributes | |
TypeHandle | _handle |
string | _name |
TypeHandle & | _ref |
Classes | _parent_classes |
Classes | _child_classes |
Static Public Attributes | |
bool | _paranoid_inheritance |
Private Types | |
typedef int | SubtreeMaskType |
typedef pvector< Inherit > | TopInheritance |
Private Member Functions | |
void | r_build_subtrees (TypeRegistryNode *top, int bit_count, SubtreeMaskType bits) |
Recursively builds up all the subtree cache information for this node and the ones below. | |
Static Private Member Functions | |
bool | check_derived_from (const TypeRegistryNode *child, const TypeRegistryNode *base) |
A recursive function to double-check the result of is_derived_from(). | |
Private Attributes | |
Inherit | _inherit |
TopInheritance | _top_inheritance |
int | _visit_count |
Normally, user code will never directly access this class; this class is hidden within the TypeRegistry accessors.
Definition at line 44 of file typeRegistryNode.h.
|
Definition at line 60 of file typeRegistryNode.h. |
|
Definition at line 67 of file typeRegistryNode.h. |
|
Definition at line 87 of file typeRegistryNode.h. |
|
Definition at line 36 of file typeRegistryNode.cxx. |
|
A recursive function to double-check the result of is_derived_from(). This is the slow, examine-the-whole-graph approach, as opposed to the clever and optimal algorithm of is_derived_from(); it's intended to be used only for debugging said clever algorithm. Definition at line 391 of file typeRegistryNode.cxx. Referenced by is_derived_from(). |
|
Removes any subtree definition previously set up via define_subtree(), in preparation for rebuilding the subtree data.
Definition at line 210 of file typeRegistryNode.cxx. |
|
Indicates that this TypeRegistryNode is the top of a subtree within the inheritance graph (typically, this indicates a multiple-inheritance node). Builds all the subtree_mask etc. flags for nodes at this level and below. Definition at line 233 of file typeRegistryNode.cxx. Referenced by r_build_subtrees(). |
|
Returns the first parent class of child that is a descendant of the indicated base class.
Definition at line 179 of file typeRegistryNode.cxx. Referenced by TypeRegistry::get_num_parent_classes(). |
|
Returns true if the child RegistryNode represents a class that inherits directly or indirectly from the class represented by the base RegistryNode.
Definition at line 55 of file typeRegistryNode.cxx. References TypeRegistryNode::Inherit::_bits, _inherit, TypeRegistryNode::Inherit::_mask, _name, TypeRegistryNode::Inherit::_top, check_derived_from(), nassertr, and NULL. Referenced by TypeRegistry::freshen_derivations(). |
|
Recursively builds up all the subtree cache information for this node and the ones below. This information is used to quickly determine class inheritance. Definition at line 263 of file typeRegistryNode.cxx. References _inherit, _parent_classes, TypeRegistryNode::Inherit::_top, _top_inheritance, _visit_count, define_subtree(), nassertv, and NULL. |
|
Definition at line 62 of file typeRegistryNode.h. Referenced by TypeRegistry::get_root_class(), and TypeRegistry::write(). |
|
Definition at line 57 of file typeRegistryNode.h. Referenced by TypeRegistry::get_parent_class(), and TypeRegistry::write(). |
|
Definition at line 95 of file typeRegistryNode.h. Referenced by is_derived_from(), and r_build_subtrees(). |
|
Definition at line 58 of file typeRegistryNode.h. Referenced by TypeRegistry::get_parent_class(), is_derived_from(), TypeRegistry::record_alternate_name(), TypeRegistry::record_derivation(), and TypeRegistry::write(). |
|
Definition at line 26 of file typeRegistryNode.cxx. Referenced by TypeRegistry::get_parent_towards(). |
|
Definition at line 61 of file typeRegistryNode.h. Referenced by TypeRegistry::get_name(), r_build_subtrees(), and TypeRegistry::write(). |
|
Definition at line 59 of file typeRegistryNode.h. Referenced by TypeRegistry::get_parent_class(). |
|
Definition at line 101 of file typeRegistryNode.h. Referenced by r_build_subtrees(). |
|
Definition at line 104 of file typeRegistryNode.h. Referenced by r_build_subtrees(). |