SOFA API  4006d812
Open source framework for multi-physics simuation
sofa::simulation::BaseMappingGraphNode Class Referenceabstract

#include <BaseMappingGraphNode.h>

Abstract base class for nodes in the mapping graph. More...

Inheritance diagram for sofa::simulation::BaseMappingGraphNode:

Detailed Description

Abstract base class for nodes in the mapping graph.

Provides common functionality for tracking prerequisites (parents) and dependencies (children), forming a Directed Acyclic Graph (DAG). It implements the Visitor pattern.

Public Member Functions

virtual ~BaseMappingGraphNode ()=default
 
virtual void accept (MappingGraphVisitor &visitor) const =0
 Accepts a visitor, allowing the graph to be processed by an external algorithm. More...
 
virtual std::string getName () const
 Gets the name of the component represented by this node. More...
 
virtual NodeType getType () const =0
 
bool isMapped () const
 
const sofa::type::vector< SPtr > & getParents () const
 
const sofa::type::vector< SPtr > & getChildren () const
 

Friends

class MappingGraph
 
struct MappingGraphAlgorithms
 

Constructor details

◆ ~BaseMappingGraphNode()

virtual sofa::simulation::BaseMappingGraphNode::~BaseMappingGraphNode ( )
virtualdefault

Function details

◆ accept()

virtual void sofa::simulation::BaseMappingGraphNode::accept ( MappingGraphVisitor visitor) const
pure virtual

Accepts a visitor, allowing the graph to be processed by an external algorithm.

Parameters
visitorThe concrete visitor implementation.

Implemented in sofa::simulation::MappingGraphNode< TComponent >, and sofa::simulation::ComponentGroupMappingGraphNode.

◆ getChildren()

const sofa::type::vector<SPtr>& sofa::simulation::BaseMappingGraphNode::getChildren ( ) const
inline

◆ getName()

virtual std::string sofa::simulation::BaseMappingGraphNode::getName ( ) const
inlinevirtual

Gets the name of the component represented by this node.

Returns
The name string.

Reimplemented in sofa::simulation::MappingGraphNode< TComponent >, and sofa::simulation::ComponentGroupMappingGraphNode.

◆ getParents()

const sofa::type::vector<SPtr>& sofa::simulation::BaseMappingGraphNode::getParents ( ) const
inline

◆ getType()

virtual NodeType sofa::simulation::BaseMappingGraphNode::getType ( ) const
pure virtual

◆ isMapped()

bool sofa::simulation::BaseMappingGraphNode::isMapped ( ) const
Returns
True if the node has an ancestor which is a mapping node

Enum details

◆ NodeType

Enumerator
MechanicalState 
Mapping 
Component 
Group 

Related details

◆ MappingGraph

friend class MappingGraph
friend

◆ MappingGraphAlgorithms

friend struct MappingGraphAlgorithms
friend