SOFA API  9d9100aa
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 core::ExecParams *) const
 Returns true if the DDGNode needs to be updated. More...
 
bool isDirty () const
 
virtual void setDirtyValue (const core::ExecParams *) final
 Indicate the value needs to be updated. More...
 
virtual void setDirtyValue ()
 
virtual void setDirtyOutputs (const core::ExecParams *) final
 Indicate the outputs needs to be updated. This method must be called after changing the value of this node. More...
 
virtual void setDirtyOutputs ()
 
void cleanDirty (const core::ExecParams *)
 Set dirty flag to false. More...
 
void cleanDirty ()
 
virtual void notifyEndEdit (const core::ExecParams *) final
 Notify links that the DGNode has been modified. More...
 
virtual void notifyEndEdit ()
 
void updateIfDirty (const core::ExecParams *) const
 Utility method to call update if necessary. This method should be called before reading of writing the value of this node. More...
 
void updateIfDirty () const
 

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 (const core::ExecParams *)
 the dirtyOutputs flags of all the inputs will be set to false More...
 
void cleanDirtyOutputsOfInputs ()
 

Attribute details

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

Constructor details

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

Constructor.

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

Destructor. Automatically remove remaining links.

Function details

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

Add a new input to this node.

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

Add a new output to this node.

void sofa::core::objectmodel::DDGNode::cleanDirty ( const core::ExecParams )
inline

Set dirty flag to false.

void sofa::core::objectmodel::DDGNode::cleanDirty ( )
void sofa::core::objectmodel::DDGNode::cleanDirtyOutputsOfInputs ( const core::ExecParams )
inlineprotected

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

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

Remove an input from this node.

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

Remove an output from this node.

void sofa::core::objectmodel::DDGNode::doAddInput ( DDGNode n)
protectedvirtual
void sofa::core::objectmodel::DDGNode::doAddOutput ( DDGNode n)
protectedvirtual
void sofa::core::objectmodel::DDGNode::doDelInput ( DDGNode n)
protectedvirtual
void sofa::core::objectmodel::DDGNode::doDelOutput ( DDGNode n)
protectedvirtual
const DDGNode::DDGLinkContainer & sofa::core::objectmodel::DDGNode::getInputs ( )

Get the list of inputs for this DDGNode.

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

Get the list of outputs for this DDGNode.

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

Returns true if the DDGNode needs to be updated.

bool sofa::core::objectmodel::DDGNode::isDirty ( ) const
inline
virtual void sofa::core::objectmodel::DDGNode::notifyEndEdit ( const core::ExecParams )
inlinefinalvirtual

Notify links that the DGNode has been modified.

void sofa::core::objectmodel::DDGNode::notifyEndEdit ( )
virtual
virtual void sofa::core::objectmodel::DDGNode::setDirtyOutputs ( const core::ExecParams )
inlinefinalvirtual

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

void sofa::core::objectmodel::DDGNode::setDirtyOutputs ( )
virtual
virtual void sofa::core::objectmodel::DDGNode::setDirtyValue ( const core::ExecParams )
inlinefinalvirtual

Indicate the value needs to be updated.

void sofa::core::objectmodel::DDGNode::setDirtyValue ( )
virtual
void sofa::core::objectmodel::DDGNode::updateIfDirty ( const core::ExecParams ) const
inline

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

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