Panda3D
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
TypeRegistryNode Class Reference

This is a single entry in the TypeRegistry. More...

#include "typeRegistryNode.h"

Public Types

typedef std::vector< TypeRegistryNode * > Classes
 

Public Member Functions

 TypeRegistryNode (TypeHandle handle, const std::string &name, TypeHandle &ref)
 
void clear_subtree ()
 Removes any subtree definition previously set up via define_subtree(), in preparation for rebuilding the subtree data. More...
 
void define_subtree ()
 Indicates that this TypeRegistryNode is the top of a subtree within the inheritance graph (typically, this indicates a multiple-inheritance node). More...
 
PyObject * get_python_type () const
 Returns the Python type object associated with this node. More...
 

Static Public Member Functions

static 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. More...
 
static 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. More...
 

Public Attributes

Classes _child_classes
 
TypeHandle _handle
 
AtomicAdjust::Integer _memory_usage [TypeHandle::MC_limit]
 
std::string _name
 
Classes _parent_classes
 
PyObject * _python_type = nullptr
 
TypeHandle_ref
 

Static Public Attributes

static bool _paranoid_inheritance = false
 

Detailed Description

This is a single entry in the TypeRegistry.

Normally, user code will never directly access this class; this class is hidden within the TypeRegistry accessors.

Definition at line 30 of file typeRegistryNode.h.

Member Function Documentation

◆ clear_subtree()

void TypeRegistryNode::clear_subtree ( )

Removes any subtree definition previously set up via define_subtree(), in preparation for rebuilding the subtree data.

Definition at line 171 of file typeRegistryNode.cxx.

◆ define_subtree()

void TypeRegistryNode::define_subtree ( )

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 183 of file typeRegistryNode.cxx.

◆ get_parent_towards()

TypeHandle TypeRegistryNode::get_parent_towards ( const TypeRegistryNode child,
const TypeRegistryNode base 
)
static

Returns the first parent class of child that is a descendant of the indicated base class.

Definition at line 148 of file typeRegistryNode.cxx.

References is_derived_from().

Referenced by TypeRegistry::get_parent_towards().

◆ get_python_type()

PyObject * TypeRegistryNode::get_python_type ( ) const
inline

Returns the Python type object associated with this node.

Definition at line 18 of file typeRegistryNode.I.

◆ is_derived_from()

bool TypeRegistryNode::is_derived_from ( const TypeRegistryNode child,
const TypeRegistryNode base 
)
static

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 37 of file typeRegistryNode.cxx.

Referenced by get_parent_towards(), and TypeRegistry::is_derived_from().


The documentation for this class was generated from the following files: