SOFA API  4006d812
Open source framework for multi-physics simuation
sofa::simulation::MappingGraphNode< TComponent > Class Template Reference

#include <MappingGraphNode.h>

Template class representing a graph node associated with any SOFA component. More...

Inheritance diagram for sofa::simulation::MappingGraphNode< TComponent >:

Detailed Description

template<class TComponent>
class sofa::simulation::MappingGraphNode< TComponent >

Template class representing a graph node associated with any SOFA component.

This wrapper allows the MappingGraph to manage nodes for various types of components (e.g., MechanicalState, ForceField) polymorphically while maintaining type safety and providing standard graph node interfaces.

Template Parameters
TComponentThe actual SOFA component class pointer type.

Public Member Functions

 MappingGraphNode (typename TComponent::SPtr s)
 Constructs a node wrapper for the given component. More...
 
void accept (MappingGraphVisitor &visitor) const override
 Implements accept by calling visit on the wrapped component. More...
 
std::string getName () const override
 Returns the name of the wrapped component. More...
 
NodeType getType () const override
 
- Public Member Functions inherited from sofa::simulation::BaseMappingGraphNode
virtual ~BaseMappingGraphNode ()=default
 
bool isMapped () const
 
const sofa::type::vector< SPtr > & getParents () const
 
const sofa::type::vector< SPtr > & getChildren () const
 

Friends

class MappingGraph
 

Constructor details

◆ MappingGraphNode()

template<class TComponent >
sofa::simulation::MappingGraphNode< TComponent >::MappingGraphNode ( typename TComponent::SPtr  s)
inlineexplicit

Constructs a node wrapper for the given component.

Parameters
sA shared pointer to the component instance.

Function details

◆ accept()

template<class TComponent >
void sofa::simulation::MappingGraphNode< TComponent >::accept ( MappingGraphVisitor visitor) const
inlineoverridevirtual

Implements accept by calling visit on the wrapped component.

Parameters
visitorThe concrete visitor implementation.

Implements sofa::simulation::BaseMappingGraphNode.

◆ getName()

template<class TComponent >
std::string sofa::simulation::MappingGraphNode< TComponent >::getName ( ) const
inlineoverridevirtual

Returns the name of the wrapped component.

Returns
The name string from the component.

Reimplemented from sofa::simulation::BaseMappingGraphNode.

◆ getType()

template<class TComponent >
NodeType sofa::simulation::MappingGraphNode< TComponent >::getType ( ) const
inlineoverridevirtual

Related details

◆ MappingGraph

template<class TComponent >
friend class MappingGraph
friend