Panda3D
Loading...
Searching...
No Matches
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.
 
void define_subtree ()
 Indicates that this TypeRegistryNode is the top of a subtree within the inheritance graph (typically, this indicates a multiple-inheritance node).
 
PyObject * get_python_type () const
 Returns the Python type object associated with this node.
 

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

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 Typedef Documentation

◆ Classes

typedef std::vector<TypeRegistryNode *> TypeRegistryNode::Classes

Definition at line 48 of file typeRegistryNode.h.

Constructor & Destructor Documentation

◆ TypeRegistryNode()

TypeRegistryNode::TypeRegistryNode ( TypeHandle handle,
const std::string & name,
TypeHandle & ref )

Definition at line 24 of file typeRegistryNode.cxx.

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 170 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 182 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 147 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 17 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 36 of file typeRegistryNode.cxx.

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

Member Data Documentation

◆ _child_classes

Classes TypeRegistryNode::_child_classes

Definition at line 50 of file typeRegistryNode.h.

◆ _handle

TypeHandle TypeRegistryNode::_handle

Definition at line 45 of file typeRegistryNode.h.

◆ _memory_usage

AtomicAdjust::Integer TypeRegistryNode::_memory_usage[TypeHandle::MC_limit]

Definition at line 53 of file typeRegistryNode.h.

◆ _name

std::string TypeRegistryNode::_name

Definition at line 46 of file typeRegistryNode.h.

◆ _paranoid_inheritance

bool TypeRegistryNode::_paranoid_inheritance = false
static

Definition at line 55 of file typeRegistryNode.h.

◆ _parent_classes

Classes TypeRegistryNode::_parent_classes

Definition at line 49 of file typeRegistryNode.h.

◆ _python_type

PyObject* TypeRegistryNode::_python_type = nullptr

Definition at line 51 of file typeRegistryNode.h.

◆ _ref

TypeHandle& TypeRegistryNode::_ref

Definition at line 47 of file typeRegistryNode.h.


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