SOFA API  8c57778a
Open source framework for multi-physics simuation
sofa::core::objectmodel::DDGNode Class Referenceabstract

#include <DDGNode.h>

A DDGNode is a vertex in the data dependencies graph. The data dependency graph is used to update the data when some of other changes and it is at the root of the implementation of the data update mecanisme as well as DataEngines. More...

Inheritance diagram for sofa::core::objectmodel::DDGNode:

Detailed Description

A DDGNode is a vertex in the data dependencies graph. The data dependency graph is used to update the data when some of other changes and it is at the root of the implementation of the data update mecanisme as well as DataEngines.

Protected Attributes

DDGLinkContainer inputs
 
DDGLinkContainer outputs
 

Public Member Functions

 DDGNode ()
 Constructor. More...
 
virtual ~DDGNode ()
 Destructor. Automatically remove remaining links. More...
 
void addInput (DDGNode *n)
 Add a new input to this node. More...
 
void delInput (DDGNode *n)
 Remove an input from this node. More...
 
void addOutput (DDGNode *n)
 Add a new output to this node. More...
 
void delOutput (DDGNode *n)
 Remove an output from this node. More...
 
const DDGLinkContainergetInputs ()
 Get the list of inputs for this DDGNode. More...
 
const DDGLinkContainergetOutputs ()
 Get the list of outputs for this DDGNode. More...
 
virtual void update ()=0
 Update this value. More...
 
bool isDirty () const
 Returns true if the DDGNode needs to be updated. More...
 
virtual void setDirtyValue ()
 Indicate the value needs to be updated. More...
 
virtual void setDirtyOutputs ()
 Indicate the outputs needs to be updated. This method must be called after changing the value of this node. More...
 
void cleanDirty ()
 Set dirty flag to false. More...
 
virtual void notifyEndEdit ()
 Notify links that the DGNode has been modified. More...
 
void updateIfDirty () const
 Utility method to call update if necessary. This method should be called before reading of writing the value of this node. More...
 

Protected Member Functions

virtual void doAddInput (DDGNode *n)
 
virtual void doDelInput (DDGNode *n)
 
virtual void doAddOutput (DDGNode *n)
 
virtual void doDelOutput (DDGNode *n)
 
void cleanDirtyOutputsOfInputs ()
 the dirtyOutputs flags of all the inputs will be set to false More...
 

Attribute details

◆ inputs

DDGLinkContainer sofa::core::objectmodel::DDGNode::inputs
protected

◆ outputs

DDGLinkContainer sofa::core::objectmodel::DDGNode::outputs
protected

Constructor details

◆ DDGNode()

sofa::core::objectmodel::DDGNode::DDGNode ( )

Constructor.

◆ ~DDGNode()

sofa::core::objectmodel::DDGNode::~DDGNode ( )
virtual

Destructor. Automatically remove remaining links.

Function details

◆ addInput()

void sofa::core::objectmodel::DDGNode::addInput ( DDGNode n)

Add a new input to this node.

◆ addOutput()

void sofa::core::objectmodel::DDGNode::addOutput ( DDGNode n)

Add a new output to this node.

◆ cleanDirty()

void sofa::core::objectmodel::DDGNode::cleanDirty ( )

Set dirty flag to false.

◆ cleanDirtyOutputsOfInputs()

void sofa::core::objectmodel::DDGNode::cleanDirtyOutputsOfInputs ( )
protected

the dirtyOutputs flags of all the inputs will be set to false

◆ delInput()

void sofa::core::objectmodel::DDGNode::delInput ( DDGNode n)

Remove an input from this node.

◆ delOutput()

void sofa::core::objectmodel::DDGNode::delOutput ( DDGNode n)

Remove an output from this node.

◆ doAddInput()

void sofa::core::objectmodel::DDGNode::doAddInput ( DDGNode n)
protectedvirtual

◆ doAddOutput()

void sofa::core::objectmodel::DDGNode::doAddOutput ( DDGNode n)
protectedvirtual

◆ doDelInput()

void sofa::core::objectmodel::DDGNode::doDelInput ( DDGNode n)
protectedvirtual

◆ doDelOutput()

void sofa::core::objectmodel::DDGNode::doDelOutput ( DDGNode n)
protectedvirtual

◆ getInputs()

const DDGNode::DDGLinkContainer & sofa::core::objectmodel::DDGNode::getInputs ( )

Get the list of inputs for this DDGNode.

◆ getOutputs()

const DDGNode::DDGLinkContainer & sofa::core::objectmodel::DDGNode::getOutputs ( )

Get the list of outputs for this DDGNode.

◆ isDirty()

bool sofa::core::objectmodel::DDGNode::isDirty ( ) const
inline

Returns true if the DDGNode needs to be updated.

◆ notifyEndEdit()

void sofa::core::objectmodel::DDGNode::notifyEndEdit ( )
virtual

Notify links that the DGNode has been modified.

Reimplemented in sofa::gui::qt::ObjectStateListener.

◆ setDirtyOutputs()

void sofa::core::objectmodel::DDGNode::setDirtyOutputs ( )
virtual

Indicate the outputs needs to be updated. This method must be called after changing the value of this node.

◆ setDirtyValue()

void sofa::core::objectmodel::DDGNode::setDirtyValue ( )
virtual

Indicate the value needs to be updated.

Reimplemented in sofa::core::DataTrackerFunctor< FunctorType >.

◆ update()

◆ updateIfDirty()

void sofa::core::objectmodel::DDGNode::updateIfDirty ( ) const

Utility method to call update if necessary. This method should be called before reading of writing the value of this node.