AGXDynamics  2.31.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
agxPowerLine::PowerLineCollector Class Reference

PowerLineTraverser that stores the nodes it visits. More...

#include <PowerLineTraverser.h>

+ Inheritance diagram for agxPowerLine::PowerLineCollector:

Public Types

enum  TraversalMode
 Enumeration that controls how the traversal should behave when encountering compound GraphNodes. More...
 

Public Member Functions

 PowerLineCollector ()
 
 PowerLineCollector (agxPowerLine::Unit *source, TraversalMode mode)
 
 PowerLineCollector (agxPowerLine::GraphNodeTypes typesToCollect, agxPowerLine::Unit *source, TraversalMode mode)
 
const
agxPowerLine::ConnectorRefVector & 
getConnectors ()
 
const
agxPowerLine::PhysicalDimensionRefVector & 
getDimensions ()
 
const agxPowerLine::UnitRefVector & getUnits ()
 
bool traverse (GraphNodeTypes typesToVisit, agxPowerLine::Unit *source, TraversalMode mode)
 Start a traversal that visits the types specified by the given GraphNodeTypes. More...
 
bool traverseConnectors (agxPowerLine::Unit *source, TraversalMode mode)
 Start a traversal that only visits Connectors. More...
 
bool traverseDimensions (agxPowerLine::Unit *source, TraversalMode mode)
 Start a traversal that only visits PhysicalDimensions. More...
 
bool traverseUnits (agxPowerLine::Unit *source, TraversalMode mode)
 Start a traversal that only visits Units. More...
 

Protected Member Functions

virtual bool shouldQueueChildren (agxPowerLine::Unit *unit)
 
virtual bool shouldQueueChildren (agxPowerLine::PhysicalDimension *dimension)
 
virtual bool shouldQueueChildren (agxPowerLine::Connector *connector)
 
virtual bool visit (agxPowerLine::Unit *unit) override
 Called when a Unit is encountered in the graph, if the GraphNodeTypes variable includes UNITS. More...
 
virtual bool visit (agxPowerLine::PhysicalDimension *dimension) override
 Called when a PhysicalDimension is encountered in the graph, if the GraphNodeTypes variable includes DIMENSIONS. More...
 
virtual bool visit (agxPowerLine::Connector *connector) override
 Called when a Connector is encountered in the graph, if the GraphNodeTypes variable includes CONNECTORS. More...
 

Detailed Description

PowerLineTraverser that stores the nodes it visits.

It can be seen as taking a snapshot of the graph contents so that the same nodes can be processed later even if the graph itself has been reconfigured.

The collector keeps references to the collected nodes so that they stay valid even if they are removed from the graph itself.

Definition at line 181 of file PowerLineTraverser.h.

Member Enumeration Documentation

Enumeration that controls how the traversal should behave when encountering compound GraphNodes.

Definition at line 76 of file PowerLineTraverser.h.

Constructor & Destructor Documentation

agxPowerLine::PowerLineCollector::PowerLineCollector ( )
agxPowerLine::PowerLineCollector::PowerLineCollector ( agxPowerLine::Unit *  source,
TraversalMode  mode 
)
agxPowerLine::PowerLineCollector::PowerLineCollector ( agxPowerLine::GraphNodeTypes  typesToCollect,
agxPowerLine::Unit *  source,
TraversalMode  mode 
)

Member Function Documentation

const agxPowerLine::ConnectorRefVector& agxPowerLine::PowerLineCollector::getConnectors ( )
const agxPowerLine::PhysicalDimensionRefVector& agxPowerLine::PowerLineCollector::getDimensions ( )
const agxPowerLine::UnitRefVector& agxPowerLine::PowerLineCollector::getUnits ( )

Start a traversal that visits the types specified by the given GraphNodeTypes.

Start a traversal that only visits Connectors.

Start a traversal that only visits PhysicalDimensions.

Start a traversal that only visits Units.

virtual bool agxPowerLine::PowerLineCollector::visit ( agxPowerLine::Unit *  unit)
overrideprotectedvirtual

Called when a Unit is encountered in the graph, if the GraphNodeTypes variable includes UNITS.

Implements agxPowerLine::AbstractPowerLineTraverser< agxPowerLine::Unit *, agxPowerLine::PhysicalDimension *, agxPowerLine::Connector *, agxPowerLine::SubGraph * >.

virtual bool agxPowerLine::PowerLineCollector::visit ( agxPowerLine::PhysicalDimension *  dimension)
overrideprotectedvirtual
virtual bool agxPowerLine::PowerLineCollector::visit ( agxPowerLine::Connector *  connector)
overrideprotectedvirtual

Called when a Connector is encountered in the graph, if the GraphNodeTypes variable includes CONNECTORS.

Implements agxPowerLine::AbstractPowerLineTraverser< agxPowerLine::Unit *, agxPowerLine::PhysicalDimension *, agxPowerLine::Connector *, agxPowerLine::SubGraph * >.


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