AGX Dynamics 2.42.3.1
Loading...
Searching...
No Matches
agxPowerLine::PowerLineCollector Class Reference

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

#include <PowerLineTraverser.h>

+ Inheritance diagram for agxPowerLine::PowerLineCollector:

Public Member Functions

 PowerLineCollector ()
 
 PowerLineCollector (agxPowerLine::GraphNodeTypes typesToCollect, agxPowerLine::Unit *source, TraversalMode mode)
 
 PowerLineCollector (agxPowerLine::PowerLine *source, TraversalMode mode)
 
 PowerLineCollector (agxPowerLine::Unit *source, TraversalMode mode)
 
const agxPowerLine::ConnectorRefVector & getConnectors ()
 
const agxPowerLine::PhysicalDimensionRefVector & getDimensions ()
 
const agxPowerLine::UnitRefVector & getUnits ()
 
- Public Member Functions inherited from agxPowerLine::AbstractPowerLineTraverser< agxPowerLine::Unit *, agxPowerLine::PhysicalDimension *, agxPowerLine::Connector *, agxPowerLine::SubGraph * >
 AbstractPowerLineTraverser ()
 
bool traverse (GraphNodeTypes typesToVisit, agxPowerLine::Unit * source, TraversalMode mode)
 Start a traversal that visits the types specified by the given GraphNodeTypes.
 
bool traverse (GraphNodeTypes typesToVisit, PowerLine *source, TraversalMode mode)
 Start a traversal from all the units in the powerline that visits the types specified by the given GraphNodeTypes.
 
bool traverseConnectors (agxPowerLine::Unit * source, TraversalMode mode)
 Start a traversal that only visits Connectors.
 
bool traverseDimensions (agxPowerLine::Unit * source, TraversalMode mode)
 Start a traversal that only visits PhysicalDimensions.
 
bool traverseUnits (agxPowerLine::Unit * source, TraversalMode mode)
 Start a traversal that only visits Units.
 

Protected Member Functions

virtual bool visit (agxPowerLine::Connector *connector) override
 Called when a Connector is encountered in the graph, if the GraphNodeTypes variable includes CONNECTORS.
 
virtual bool visit (agxPowerLine::PhysicalDimension *dimension) override
 Called when a PhysicalDimension is encountered in the graph, if the GraphNodeTypes variable includes DIMENSIONS.
 
virtual bool visit (agxPowerLine::Unit *unit) override
 Called when a Unit is encountered in the graph, if the GraphNodeTypes variable includes UNITS.
 
- Protected Member Functions inherited from agxPowerLine::AbstractPowerLineTraverser< agxPowerLine::Unit *, agxPowerLine::PhysicalDimension *, agxPowerLine::Connector *, agxPowerLine::SubGraph * >
virtual ~AbstractPowerLineTraverser ()
 
virtual bool shouldQueueChildren (agxPowerLine::Connector * connector)
 
virtual bool shouldQueueChildren (agxPowerLine::PhysicalDimension * dimension)
 
virtual bool shouldQueueChildren (agxPowerLine::Unit * unit)
 
virtual bool visit (agxPowerLine::Connector * connector)=0
 Called when a Connector is encountered in the graph, if the GraphNodeTypes variable includes CONNECTORS.
 
virtual bool visit (agxPowerLine::PhysicalDimension * dimension)=0
 Called when a PhysicalDimension is encountered in the graph, if the GraphNodeTypes variable includes DIMENSIONS.
 
virtual bool visit (agxPowerLine::Unit * unit)=0
 Called when a Unit is encountered in the graph, if the GraphNodeTypes variable includes UNITS.
 

Additional Inherited Members

- Public Types inherited from agxPowerLine::AbstractPowerLineTraverser< agxPowerLine::Unit *, agxPowerLine::PhysicalDimension *, agxPowerLine::Connector *, agxPowerLine::SubGraph * >
enum  TraversalMode
 Enumeration that controls how the traversal should behave when encountering compound GraphNodes. 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 184 of file PowerLineTraverser.h.

Constructor & Destructor Documentation

◆ PowerLineCollector() [1/4]

agxPowerLine::PowerLineCollector::PowerLineCollector ( )

◆ PowerLineCollector() [2/4]

agxPowerLine::PowerLineCollector::PowerLineCollector ( agxPowerLine::PowerLine *  source,
TraversalMode  mode 
)

◆ PowerLineCollector() [3/4]

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

◆ PowerLineCollector() [4/4]

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

Member Function Documentation

◆ getConnectors()

const agxPowerLine::ConnectorRefVector & agxPowerLine::PowerLineCollector::getConnectors ( )

◆ getDimensions()

const agxPowerLine::PhysicalDimensionRefVector & agxPowerLine::PowerLineCollector::getDimensions ( )

◆ getUnits()

const agxPowerLine::UnitRefVector & agxPowerLine::PowerLineCollector::getUnits ( )

◆ visit() [1/3]

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

◆ visit() [2/3]

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

◆ visit() [3/3]

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


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