Panda3D
Classes | Public Member Functions | List of all members
DataGraphTraverser Class Reference

This object supervises the traversal of the data graph and the moving of data from one DataNode to its children. More...

#include "dataGraphTraverser.h"

Public Member Functions

 DataGraphTraverser (Thread *current_thread=Thread::get_current_thread())
 
void collect_leftovers ()
 Pick up any nodes that didn't get completely traversed. More...
 
Threadget_current_thread () const
 Returns the currently-executing thread object, as passed to the DataGraphTraverser constructor. More...
 
void traverse (PandaNode *node)
 Starts the traversal of the data graph at the indicated root node. More...
 
void traverse_below (PandaNode *node, const DataNodeTransmit &output)
 Continues the traversal to all the children of the indicated node, passing in the given data, without actually calling transmit_data() on the given node. More...
 

Detailed Description

This object supervises the traversal of the data graph and the moving of data from one DataNode to its children.

The data graph is used to manage data from input devices, etc. See the overview of the data graph in dataNode.h.

Definition at line 32 of file dataGraphTraverser.h.

Member Function Documentation

◆ collect_leftovers()

void DataGraphTraverser::collect_leftovers ( )

Pick up any nodes that didn't get completely traversed.

These must be nodes that have multiple parents, with at least one parent completely outside of the data graph.

Definition at line 126 of file dataGraphTraverser.cxx.

Referenced by DriveInterface::force_dgraph().

◆ get_current_thread()

Thread * DataGraphTraverser::get_current_thread ( ) const
inline

Returns the currently-executing thread object, as passed to the DataGraphTraverser constructor.

Definition at line 19 of file dataGraphTraverser.I.

◆ traverse()

void DataGraphTraverser::traverse ( PandaNode node)

Starts the traversal of the data graph at the indicated root node.

Definition at line 55 of file dataGraphTraverser.cxx.

References TypedObject::is_of_type().

◆ traverse_below()

void DataGraphTraverser::traverse_below ( PandaNode node,
const DataNodeTransmit output 
)

Continues the traversal to all the children of the indicated node, passing in the given data, without actually calling transmit_data() on the given node.

Definition at line 76 of file dataGraphTraverser.cxx.

References PandaNode::get_children, and PandaNode::Children::get_num_children().

Referenced by DriveInterface::force_dgraph().


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