Panda3D
Loading...
Searching...
No Matches
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.
 
Threadget_current_thread () const
 Returns the currently-executing thread object, as passed to the DataGraphTraverser constructor.
 
void traverse (PandaNode *node)
 Starts the traversal of the data graph at the indicated root node.
 
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.
 

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.

Constructor & Destructor Documentation

◆ DataGraphTraverser()

DataGraphTraverser::DataGraphTraverser ( Thread * current_thread = Thread::get_current_thread())
explicit

Definition at line 40 of file dataGraphTraverser.cxx.

◆ ~DataGraphTraverser()

DataGraphTraverser::~DataGraphTraverser ( )

Definition at line 47 of file dataGraphTraverser.cxx.

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 125 of file dataGraphTraverser.cxx.

Referenced by DriveInterface::force_dgraph(), and traverse().

◆ 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 18 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 54 of file dataGraphTraverser.cxx.

References collect_leftovers(), PandaNode::get_num_parents, TypedObject::is_of_type(), and traverse_below().

Referenced by PandaFramework::task_data_loop().

◆ 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 75 of file dataGraphTraverser.cxx.

References PandaNode::find_parent(), PandaNode::Children::get_child(), PandaNode::get_children, PandaNode::Children::get_num_children(), PandaNode::get_num_parents, TypedObject::is_of_type(), and traverse_below().

Referenced by DriveInterface::force_dgraph(), traverse(), and traverse_below().


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