SOFA API  1df67014
Open source framework for multi-physics simuation
sofa::core::DataTrackerDDGNode Class Reference

#include <DataTrackerCallback.h>

A DDGNode with trackable input Data (containing a DataTracker) More...

Inheritance diagram for sofa::core::DataTrackerDDGNode:

Detailed Description

A DDGNode with trackable input Data (containing a DataTracker)

Protected Attributes

Tracking Data mechanism

each Data added to the DataTracker is tracked to be able to check if its value changed since their last clean, called by default in DataEngine::cleanDirty().

DataTracker m_dataTracker
 
- Protected Attributes inherited from sofa::core::objectmodel::DDGNode
DDGLinkContainer inputs
 
DDGLinkContainer outputs
 

Public Member Functions

 DataTrackerDDGNode ()
 
void addInputs (std::initializer_list< sofa::core::objectmodel::BaseData * > datas)
 Create a DataCallback object associated with multiple Data fields. More...
 
void addOutputs (std::initializer_list< sofa::core::objectmodel::BaseData * > datas)
 
virtual void cleanDirty (const core::ExecParams *params=nullptr)
 
void updateAllInputsIfDirty ()
 
- Public Member Functions inherited from sofa::core::objectmodel::DDGNode
 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...
 

Additional Inherited Members

- Protected Member Functions inherited from sofa::core::objectmodel::DDGNode
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

◆ m_dataTracker

DataTracker sofa::core::DataTrackerDDGNode::m_dataTracker
protected

Constructor details

◆ DataTrackerDDGNode()

sofa::core::DataTrackerDDGNode::DataTrackerDDGNode ( )
inline

Function details

◆ addInputs()

void sofa::core::DataTrackerDDGNode::addInputs ( std::initializer_list< sofa::core::objectmodel::BaseData * >  datas)

Create a DataCallback object associated with multiple Data fields.

◆ addOutputs()

void sofa::core::DataTrackerDDGNode::addOutputs ( std::initializer_list< sofa::core::objectmodel::BaseData * >  datas)

◆ cleanDirty()

void sofa::core::DataTrackerDDGNode::cleanDirty ( const core::ExecParams params = nullptr)
virtual

Set dirty flag to false for the DDGNode and for all the tracked Data

◆ updateAllInputsIfDirty()

void sofa::core::DataTrackerDDGNode::updateAllInputsIfDirty ( )

utility function to ensure all inputs are up-to-date can be useful for particulary complex DDGNode with a lot input/output imbricated access