Panda3D
Classes | Public Member Functions

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"

List of all members.

Classes

class  CollectedData

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 35 of file dataGraphTraverser.h.


Member Function Documentation

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

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

Thread * DataGraphTraverser::get_current_thread ( ) const [inline]

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

Definition at line 23 of file dataGraphTraverser.I.

Referenced by Transform2SG::do_transmit_data(), MouseWatcher::do_transmit_data(), and RocketInputHandler::do_transmit_data().

void DataGraphTraverser::traverse ( PandaNode node)

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

Definition at line 65 of file dataGraphTraverser.cxx.

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

Referenced by PandaFramework::task_data_loop().

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

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

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


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations