SOFA API  1c8b807d
Open source framework for multi-physics simuation
sofa::simulation::Visitor Class Reference

#include <Visitor.h>

Base class for visitors propagated recursively through the scenegraph. More...

Inheritance diagram for sofa::simulation::Visitor:

Detailed Description

Base class for visitors propagated recursively through the scenegraph.

Classes

class  VisitorContext
 

Public Attributes

TagSet subsetsToManage
 list of the subsets More...
 
bool canAccessSleepingNode
 Can the visitor access sleeping nodes? More...
 

Protected Attributes

const sofa::core::ExecParamsparams
 

Public Member Functions

 Visitor (const sofa::core::ExecParams *params)
 
virtual ~Visitor ()
 
const sofa::core::ExecParamsexecParams () const
 
virtual Result processNodeTopDown (simulation::Node *)
 Callback method called when descending to a new node. Recursion will stop if this method returns RESULT_PRUNE. More...
 
virtual void processNodeBottomUp (simulation::Node *)
 Callback method called after child node have been processed and before going back to the parent node. More...
 
virtual bool childOrderReversed (simulation::Node *)
 Return true to reverse the order of traversal of child nodes. More...
 
virtual bool treeTraversal (TreeTraversalRepetition &repeat)
 
virtual const chargetCategoryName () const
 
virtual const chargetClassName () const
 
virtual std::string getInfos () const
 
bool testTags (sofa::core::objectmodel::BaseObject *obj)
 
virtual void execute (sofa::core::objectmodel::BaseContext *node, bool precomputedOrder=false)
 Alias for context->executeVisitor(this) More...
 
virtual ctime_t begin (simulation::Node *node, sofa::core::objectmodel::BaseObject *obj, const std::string &typeInfo=std::string("type"))
 
virtual void end (simulation::Node *node, sofa::core::objectmodel::BaseObject *obj, ctime_t t0)
 
virtual ctime_t begin (simulation::Visitor::VisitorContext *node, sofa::core::objectmodel::BaseObject *obj, const std::string &typeInfo=std::string("type"))
 
virtual void end (simulation::Visitor::VisitorContext *node, sofa::core::objectmodel::BaseObject *obj, ctime_t t0)
 
virtual bool isThreadSafe () const
 Specify whether this visitor can be parallelized. More...
 
virtual Result processNodeTopDown (simulation::Node *node, LocalStorage *)=delete
 
virtual void processNodeBottomUp (simulation::Node *node, LocalStorage *)=delete
 
VisitorsetTags (const TagSet &t)
 
VisitoraddTag (Tag t)
 
VisitorremoveTag (Tag t)
 
template<class VisitorType , class VContext , class Container , typename PointedType >
void for_each (VisitorType *visitor, VContext *ctx, const Container &list, void(VisitorType::*task)(VContext *, PointedType *), const std::string &typeInfo)
 
template<class VisitorType , class VContext , class Container , typename PointedType >
Visitor::Result for_each (VisitorType *visitor, VContext *ctx, const Container &list, Visitor::Result(VisitorType::*task)(VContext *, PointedType *), const std::string &typeInfo)
 

Protected Member Functions

void debug_write_state_before (sofa::core::objectmodel::BaseObject *obj)
 
void debug_write_state_after (sofa::core::objectmodel::BaseObject *obj)
 
template<class VisitorType , class VContext , class ObjectType >
void runVisitorTask (VisitorType *visitor, VContext *ctx, void(VisitorType::*task)(VContext *, ObjectType *), ObjectType *ptr, const std::string &typeInfo=std::string("type"))
 
template<class VisitorType , class VContext , class ObjectType >
Result runVisitorTask (VisitorType *visitor, VContext *ctx, Result(VisitorType::*task)(VContext *, ObjectType *), ObjectType *ptr, const std::string &typeInfo=std::string("type"))
 
template<class Visit , class VContext , class Container , typename PointedType = typename Container::pointed_type>
void for_each (Visit *visitor, VContext *ctx, const Container &list, void(Visit::*task)(VContext *, PointedType *), const std::string &typeInfo=std::string("type"))
 
template<class Visit , class VContext , class Container , typename PointedType = typename Container::pointed_type>
Visitor::Result for_each (Visit *visitor, VContext *ctx, const Container &list, Visitor::Result(Visit::*task)(VContext *, PointedType *), const std::string &typeInfo=std::string("type"))
 

Attribute details

◆ canAccessSleepingNode

bool sofa::simulation::Visitor::canAccessSleepingNode

Can the visitor access sleeping nodes?

◆ params

const sofa::core::ExecParams* sofa::simulation::Visitor::params
protected

◆ subsetsToManage

TagSet sofa::simulation::Visitor::subsetsToManage

list of the subsets

Constructor details

◆ Visitor()

sofa::simulation::Visitor::Visitor ( const sofa::core::ExecParams params)
explicit

◆ ~Visitor()

sofa::simulation::Visitor::~Visitor ( )
virtualdefault

Function details

◆ addTag()

Visitor& sofa::simulation::Visitor::addTag ( Tag  t)
inline

◆ begin() [1/2]

simulation::Visitor::ctime_t sofa::simulation::Visitor::begin ( simulation::Node node,
sofa::core::objectmodel::BaseObject obj,
const std::string &  typeInfo = std::string("type") 
)
virtual

Optional helper method to call before handling an object if not using the for_each method. It currently takes care of time logging, but could be extended (step-by-step execution for instance)

◆ begin() [2/2]

simulation::Visitor::ctime_t sofa::simulation::Visitor::begin ( simulation::Visitor::VisitorContext node,
sofa::core::objectmodel::BaseObject obj,
const std::string &  typeInfo = std::string("type") 
)
virtual

Optional helper method to call before handling an object if not using the for_each method. It currently takes care of time logging, but could be extended (step-by-step execution for instance)

◆ childOrderReversed()

virtual bool sofa::simulation::Visitor::childOrderReversed ( simulation::Node )
inlinevirtual

Return true to reverse the order of traversal of child nodes.

Reimplemented in sofa::simulation::mechanicalvisitor::MechanicalAccumulateMatrixDeriv.

◆ debug_write_state_after()

void sofa::simulation::Visitor::debug_write_state_after ( sofa::core::objectmodel::BaseObject obj)
protected

◆ debug_write_state_before()

void sofa::simulation::Visitor::debug_write_state_before ( sofa::core::objectmodel::BaseObject obj)
protected

◆ end() [1/2]

void sofa::simulation::Visitor::end ( simulation::Node node,
sofa::core::objectmodel::BaseObject obj,
ctime_t  t0 
)
virtual

Optional helper method to call after handling an object if not using the for_each method. It currently takes care of time logging, but could be extended (step-by-step execution for instance)

◆ end() [2/2]

void sofa::simulation::Visitor::end ( simulation::Visitor::VisitorContext node,
sofa::core::objectmodel::BaseObject obj,
ctime_t  t0 
)
virtual

Optional helper method to call after handling an object if not using the for_each method. It currently takes care of time logging, but could be extended (step-by-step execution for instance)

◆ execParams()

const sofa::core::ExecParams* sofa::simulation::Visitor::execParams ( ) const
inline

◆ execute()

void sofa::simulation::Visitor::execute ( sofa::core::objectmodel::BaseContext node,
bool  precomputedOrder = false 
)
virtual

◆ for_each() [1/4]

template<class Visit , class VContext , class Container , typename PointedType = typename Container::pointed_type>
Visitor::Result sofa::simulation::Visitor::for_each ( Visit *  visitor,
VContext *  ctx,
const Container &  list,
Visitor::Result(Visit::*)(VContext *, PointedType *)  task,
const std::string &  typeInfo = std::string("type") 
)
protected

◆ for_each() [2/4]

template<class Visit , class VContext , class Container , typename PointedType = typename Container::pointed_type>
void sofa::simulation::Visitor::for_each ( Visit *  visitor,
VContext *  ctx,
const Container &  list,
void(Visit::*)(VContext *, PointedType *)  task,
const std::string &  typeInfo = std::string("type") 
)
protected

◆ for_each() [3/4]

template<class VisitorType , class VContext , class Container , typename PointedType >
Visitor::Result sofa::simulation::Visitor::for_each ( VisitorType *  visitor,
VContext *  ctx,
const Container &  list,
Visitor::Result(VisitorType::*)(VContext *, PointedType *)  task,
const std::string &  typeInfo 
)

◆ for_each() [4/4]

template<class VisitorType , class VContext , class Container , typename PointedType >
void sofa::simulation::Visitor::for_each ( VisitorType *  visitor,
VContext *  ctx,
const Container &  list,
void(VisitorType::*)(VContext *, PointedType *)  task,
const std::string &  typeInfo 
)

◆ getCategoryName()

◆ getClassName()

virtual const char* sofa::simulation::Visitor::getClassName ( ) const
inlinevirtual

Return a class name for this visitor Only used for debugging / profiling purposes

Reimplemented in sofa::gui::common::ColourPickingVisitor, sofa::simulation::graph::GetUpObjectsVisitor, sofa::simulation::graph::GetDownObjectsVisitor, sofa::simulation::XMLPrintVisitor, sofa::simulation::WriteStateVisitor, sofa::simulation::VisualClearVisitor, sofa::simulation::VisualComputeBBoxVisitor, sofa::simulation::VisualInitVisitor, sofa::simulation::VisualUpdateVisitor, sofa::simulation::VisualDrawVisitor, sofa::simulation::VisualVisitor, sofa::simulation::VelocityThresholdVisitor, sofa::simulation::UpdateMappingVisitor, sofa::simulation::UpdateLinksVisitor, sofa::simulation::UpdateInternalDataVisitor, sofa::simulation::UpdateVisualContextVisitor, sofa::simulation::UpdateSimulationContextVisitor, sofa::simulation::UpdateContextVisitor, sofa::simulation::TopologyChangeVisitor, sofa::simulation::StateChangeVisitor, sofa::simulation::SolveVisitor, sofa::simulation::StoreResetStateVisitor, sofa::simulation::ResetVisitor, sofa::simulation::PropagateEventVisitor, sofa::simulation::PrintVisitor, sofa::simulation::DofPrintVisitor, sofa::simulation::MechanicalVPrintWithElapsedTimeVisitor, sofa::simulation::MechanicalVPrintVisitor, sofa::simulation::mechanicalvisitor::MechanicalVSizeVisitor, sofa::simulation::mechanicalvisitor::MechanicalVReallocVisitor< vtype >, sofa::simulation::mechanicalvisitor::MechanicalVOpVisitor, sofa::simulation::mechanicalvisitor::MechanicalVNormVisitor, sofa::simulation::mechanicalvisitor::MechanicalVMultiOpVisitor, sofa::simulation::mechanicalvisitor::MechanicalVInitVisitor< vtype >, sofa::simulation::mechanicalvisitor::MechanicalVFreeVisitor< vtype >, sofa::simulation::mechanicalvisitor::MechanicalVDotVisitor, sofa::simulation::mechanicalvisitor::MechanicalVAvailVisitor< vtype >, sofa::simulation::mechanicalvisitor::MechanicalVAllocVisitor< vtype >, sofa::simulation::mechanicalvisitor::MechanicalSetPositionAndVelocityVisitor, sofa::simulation::mechanicalvisitor::MechanicalResetForceVisitor, sofa::simulation::mechanicalvisitor::MechanicalResetConstraintVisitor, sofa::simulation::mechanicalvisitor::MechanicalPropagateOnlyVelocityVisitor, sofa::simulation::mechanicalvisitor::MechanicalPropagateOnlyPositionVisitor, sofa::simulation::mechanicalvisitor::MechanicalPropagateOnlyPositionAndVelocityVisitor, sofa::simulation::mechanicalvisitor::MechanicalPropagateOnlyPositionAndResetForceVisitor, sofa::simulation::mechanicalvisitor::MechanicalPropagateDxVisitor, sofa::simulation::mechanicalvisitor::MechanicalPropagateDxAndResetForceVisitor, sofa::simulation::mechanicalvisitor::MechanicalProjectVelocityVisitor, sofa::simulation::mechanicalvisitor::MechanicalProjectPositionVisitor, sofa::simulation::mechanicalvisitor::MechanicalProjectPositionAndVelocityVisitor, sofa::simulation::mechanicalvisitor::MechanicalProjectJacobianMatrixVisitor, sofa::simulation::mechanicalvisitor::MechanicalPickParticlesWithTagsVisitor, sofa::simulation::mechanicalvisitor::MechanicalPickParticlesVisitor, sofa::simulation::mechanicalvisitor::MechanicalMultiVectorToBaseVectorVisitor, sofa::simulation::mechanicalvisitor::MechanicalMultiVectorPeqBaseVectorVisitor, sofa::simulation::mechanicalvisitor::MechanicalMultiVectorFromBaseVectorVisitor, sofa::simulation::mechanicalvisitor::MechanicalIntegrationVisitor, sofa::simulation::mechanicalvisitor::MechanicalIntegrateConstraintsVisitor, sofa::simulation::mechanicalvisitor::MechanicalIdentityBlocksInJacobianVisitor, sofa::simulation::mechanicalvisitor::MechanicalGetNonDiagonalMassesCountVisitor, sofa::simulation::mechanicalvisitor::MechanicalGetMatrixDimensionVisitor, sofa::simulation::mechanicalvisitor::MechanicalGetConstraintJacobianVisitor, sofa::simulation::mechanicalvisitor::MechanicalGetConstraintInfoVisitor, sofa::simulation::mechanicalvisitor::MechanicalEndIntegrationVisitor, sofa::simulation::mechanicalvisitor::MechanicalComputeGeometricStiffness, sofa::simulation::mechanicalvisitor::MechanicalComputeForceVisitor, sofa::simulation::mechanicalvisitor::MechanicalComputeEnergyVisitor, sofa::simulation::mechanicalvisitor::MechanicalComputeDfVisitor, sofa::simulation::mechanicalvisitor::MechanicalComputeContactForceVisitor, sofa::simulation::mechanicalvisitor::MechanicalBuildConstraintMatrix, sofa::simulation::mechanicalvisitor::MechanicalBeginIntegrationVisitor, sofa::simulation::mechanicalvisitor::MechanicalApplyProjectiveConstraint_ToMatrixVisitor, sofa::simulation::mechanicalvisitor::MechanicalApplyConstraintsVisitor, sofa::simulation::mechanicalvisitor::MechanicalAddSeparateGravityVisitor, sofa::simulation::mechanicalvisitor::MechanicalAddMDxVisitor, sofa::simulation::mechanicalvisitor::MechanicalAddMBKdxVisitor, sofa::simulation::mechanicalvisitor::MechanicalAddMBK_ToMatrixVisitor, sofa::simulation::mechanicalvisitor::MechanicalAccumulateMatrixDeriv, sofa::simulation::mechanicalvisitor::MechanicalAccumulateJacobian, sofa::simulation::mechanicalvisitor::MechanicalAccFromFVisitor, sofa::simulation::InitVisitor, sofa::simulation::ExportVisualModelOBJVisitor, sofa::simulation::ExportGnuplotVisitor, sofa::simulation::InitGnuplotVisitor, sofa::simulation::graph::ExportDotVisitor, sofa::simulation::DeleteVisitor, sofa::simulation::DeactivationVisitor, sofa::simulation::CollisionResponseVisitor, sofa::simulation::CollisionDetectionVisitor, sofa::simulation::CollisionResetVisitor, sofa::simulation::CollisionVisitor, sofa::simulation::ProcessGeometricalDataVisitor, sofa::simulation::BaseCollisionVisitor, sofa::simulation::CleanupVisitor, sofa::simulation::BehaviorUpdatePositionVisitor, sofa::simulation::BaseMechanicalVisitor, sofa::simulation::AnimateVisitor, sofa::simulation::TransformationVisitor, sofa::simulation::FindByTypeVisitor< T >, sofa::component::playback::WriteTopologyActivator, sofa::component::playback::WriteTopologyCreator, sofa::component::playback::WriteStateActivator, sofa::component::playback::WriteStateCreator, sofa::component::playback::ReadTopologyModifier, sofa::component::playback::ReadTopologyActivator, sofa::component::playback::ReadTopologyCreator, sofa::component::playback::ReadStateModifier, sofa::component::playback::ReadStateActivator, sofa::component::playback::ReadStateCreator, sofa::component::playback::CompareTopologyResult, sofa::component::playback::CompareTopologyCreator, sofa::component::playback::CompareStateResult, sofa::component::playback::CompareStateCreator, sofa::component::odesolver::testing::GetAssembledSizeVisitor, sofa::component::odesolver::testing::GetVectorVisitor, sofa::component::linearsystem::DispatchFromGlobalVectorToLocalVectorVisitor, sofa::component::linearsystem::AssembleGlobalVectorFromLocalVectorVisitor, sofa::component::constraint::lagrangian::solver::MechanicalGetConstraintViolationVisitor, sofa::component::constraint::lagrangian::solver::MechanicalGetConstraintResolutionVisitor, and sofa::simulation::mechanicalvisitor::MechanicalGetMomentumVisitor.

◆ getInfos()

virtual std::string sofa::simulation::Visitor::getInfos ( ) const
inlinevirtual

Return eventual information on the behavior of the visitor Only used for debugging / profiling purposes

Reimplemented in sofa::simulation::TopologyChangeVisitor, sofa::simulation::PropagateEventVisitor, sofa::simulation::mechanicalvisitor::MechanicalVSizeVisitor, sofa::simulation::mechanicalvisitor::MechanicalVReallocVisitor< vtype >, sofa::simulation::mechanicalvisitor::MechanicalVOpVisitor, sofa::simulation::mechanicalvisitor::MechanicalVNormVisitor, sofa::simulation::mechanicalvisitor::MechanicalVMultiOpVisitor, sofa::simulation::mechanicalvisitor::MechanicalVInitVisitor< vtype >, sofa::simulation::mechanicalvisitor::MechanicalVFreeVisitor< vtype >, sofa::simulation::mechanicalvisitor::MechanicalVDotVisitor, sofa::simulation::mechanicalvisitor::MechanicalVAvailVisitor< vtype >, sofa::simulation::mechanicalvisitor::MechanicalVAllocVisitor< vtype >, sofa::simulation::mechanicalvisitor::MechanicalSetPositionAndVelocityVisitor, sofa::simulation::mechanicalvisitor::MechanicalResetForceVisitor, sofa::simulation::mechanicalvisitor::MechanicalPropagateOnlyVelocityVisitor, sofa::simulation::mechanicalvisitor::MechanicalPropagateOnlyPositionVisitor, sofa::simulation::mechanicalvisitor::MechanicalPropagateOnlyPositionAndVelocityVisitor, sofa::simulation::mechanicalvisitor::MechanicalPropagateDxVisitor, sofa::simulation::mechanicalvisitor::MechanicalPropagateDxAndResetForceVisitor, sofa::simulation::mechanicalvisitor::MechanicalProjectVelocityVisitor, sofa::simulation::mechanicalvisitor::MechanicalProjectPositionVisitor, sofa::simulation::mechanicalvisitor::MechanicalProjectPositionAndVelocityVisitor, sofa::simulation::mechanicalvisitor::MechanicalComputeGeometricStiffness, sofa::simulation::mechanicalvisitor::MechanicalComputeForceVisitor, sofa::simulation::mechanicalvisitor::MechanicalComputeDfVisitor, sofa::simulation::mechanicalvisitor::MechanicalApplyConstraintsVisitor, sofa::simulation::mechanicalvisitor::MechanicalAddSeparateGravityVisitor, sofa::simulation::mechanicalvisitor::MechanicalAddMDxVisitor, sofa::simulation::mechanicalvisitor::MechanicalAddMBKdxVisitor, sofa::simulation::mechanicalvisitor::MechanicalAccFromFVisitor, and sofa::simulation::FindByTypeVisitor< T >.

◆ isThreadSafe()

virtual bool sofa::simulation::Visitor::isThreadSafe ( ) const
inlinevirtual

Specify whether this visitor can be parallelized.

Reimplemented in sofa::simulation::graph::GetUpObjectsVisitor, sofa::simulation::graph::GetDownObjectsVisitor, sofa::simulation::UpdateMappingVisitor, sofa::simulation::UpdateLinksVisitor, sofa::simulation::UpdateInternalDataVisitor, sofa::simulation::UpdateContextVisitor, sofa::simulation::TopologyChangeVisitor, sofa::simulation::StateChangeVisitor, sofa::simulation::SolveVisitor, sofa::simulation::StoreResetStateVisitor, sofa::simulation::ResetVisitor, sofa::simulation::mechanicalvisitor::MechanicalVSizeVisitor, sofa::simulation::mechanicalvisitor::MechanicalVReallocVisitor< vtype >, sofa::simulation::mechanicalvisitor::MechanicalVOpVisitor, sofa::simulation::mechanicalvisitor::MechanicalVNormVisitor, sofa::simulation::mechanicalvisitor::MechanicalVMultiOpVisitor, sofa::simulation::mechanicalvisitor::MechanicalVInitVisitor< vtype >, sofa::simulation::mechanicalvisitor::MechanicalVFreeVisitor< vtype >, sofa::simulation::mechanicalvisitor::MechanicalVDotVisitor, sofa::simulation::mechanicalvisitor::MechanicalVAvailVisitor< vtype >, sofa::simulation::mechanicalvisitor::MechanicalVAllocVisitor< vtype >, sofa::simulation::mechanicalvisitor::MechanicalSetPositionAndVelocityVisitor, sofa::simulation::mechanicalvisitor::MechanicalResetForceVisitor, sofa::simulation::mechanicalvisitor::MechanicalResetConstraintVisitor, sofa::simulation::mechanicalvisitor::MechanicalPropagateOnlyVelocityVisitor, sofa::simulation::mechanicalvisitor::MechanicalPropagateOnlyPositionVisitor, sofa::simulation::mechanicalvisitor::MechanicalPropagateOnlyPositionAndVelocityVisitor, sofa::simulation::mechanicalvisitor::MechanicalPropagateOnlyPositionAndResetForceVisitor, sofa::simulation::mechanicalvisitor::MechanicalPropagateDxVisitor, sofa::simulation::mechanicalvisitor::MechanicalPropagateDxAndResetForceVisitor, sofa::simulation::mechanicalvisitor::MechanicalProjectVelocityVisitor, sofa::simulation::mechanicalvisitor::MechanicalProjectPositionVisitor, sofa::simulation::mechanicalvisitor::MechanicalProjectPositionAndVelocityVisitor, sofa::simulation::mechanicalvisitor::MechanicalProjectJacobianMatrixVisitor, sofa::simulation::mechanicalvisitor::MechanicalIntegrationVisitor, sofa::simulation::mechanicalvisitor::MechanicalEndIntegrationVisitor, sofa::simulation::mechanicalvisitor::MechanicalComputeGeometricStiffness, sofa::simulation::mechanicalvisitor::MechanicalComputeForceVisitor, sofa::simulation::mechanicalvisitor::MechanicalComputeDfVisitor, sofa::simulation::mechanicalvisitor::MechanicalComputeContactForceVisitor, sofa::simulation::mechanicalvisitor::MechanicalBuildConstraintMatrix, sofa::simulation::mechanicalvisitor::MechanicalBeginIntegrationVisitor, sofa::simulation::mechanicalvisitor::MechanicalApplyConstraintsVisitor, sofa::simulation::mechanicalvisitor::MechanicalAddMDxVisitor, sofa::simulation::mechanicalvisitor::MechanicalAddMBKdxVisitor, sofa::simulation::mechanicalvisitor::MechanicalAccumulateMatrixDeriv, sofa::simulation::mechanicalvisitor::MechanicalAccumulateJacobian, sofa::simulation::mechanicalvisitor::MechanicalAccFromFVisitor, sofa::simulation::InitVisitor, sofa::simulation::DeactivationVisitor, sofa::simulation::BehaviorUpdatePositionVisitor, sofa::simulation::AnimateVisitor, sofa::simulation::TransformationVisitor, and sofa::component::constraint::lagrangian::solver::MechanicalGetConstraintResolutionVisitor.

◆ processNodeBottomUp() [1/2]

◆ processNodeBottomUp() [2/2]

virtual void sofa::simulation::Visitor::processNodeBottomUp ( simulation::Node node,
LocalStorage *   
)
virtualdelete

Callback method called after child node have been processed and before going back to the parent node. This version is offered a LocalStorage to store temporary data

Reimplemented in sofa::simulation::BaseMechanicalVisitor.

◆ processNodeTopDown() [1/2]

virtual Result sofa::simulation::Visitor::processNodeTopDown ( simulation::Node )
inlinevirtual

Callback method called when descending to a new node. Recursion will stop if this method returns RESULT_PRUNE.

Reimplemented in sofa::gui::common::ColourPickingVisitor, sofa::simulation::graph::GetUpObjectsVisitor, sofa::simulation::graph::GetDownObjectsVisitor, sofa::simulation::XMLPrintVisitor, sofa::simulation::VisualComputeBBoxVisitor, sofa::simulation::VisualInitVisitor, sofa::simulation::VisualUpdateVisitor, sofa::simulation::VisualDrawVisitor, sofa::simulation::VisualVisitor, sofa::simulation::VelocityThresholdVisitor, sofa::simulation::UpdateMappingVisitor, sofa::simulation::UpdateLinksVisitor, sofa::simulation::UpdateInternalDataVisitor, sofa::simulation::UpdateVisualContextVisitor, sofa::simulation::UpdateSimulationContextVisitor, sofa::simulation::UpdateContextVisitor, sofa::simulation::UpdateBoundingBoxVisitor, sofa::simulation::TopologyChangeVisitor, sofa::simulation::StateChangeVisitor, sofa::simulation::SolveVisitor, sofa::simulation::StoreResetStateVisitor, sofa::simulation::ResetVisitor, sofa::simulation::PropagateEventVisitor, sofa::simulation::PrintVisitor, sofa::simulation::DofPrintVisitor, sofa::simulation::MechanicalVPrintWithElapsedTimeVisitor, sofa::simulation::MechanicalVPrintVisitor, sofa::simulation::InitVisitor, sofa::simulation::ExportGnuplotVisitor, sofa::simulation::InitGnuplotVisitor, sofa::simulation::DeactivationVisitor, sofa::simulation::CollisionVisitor, sofa::simulation::ProcessGeometricalDataVisitor, sofa::simulation::BaseCollisionVisitor, sofa::simulation::BehaviorUpdatePositionVisitor, sofa::simulation::BaseMechanicalVisitor, sofa::simulation::AnimateVisitor, sofa::simulation::TransformationVisitor, sofa::simulation::FindByTypeVisitor< T >, sofa::component::odesolver::testing::GetAssembledSizeVisitor, sofa::component::odesolver::testing::GetVectorVisitor, sofa::simulation::WriteStateVisitor, sofa::component::playback::WriteTopologyActivator, sofa::component::playback::WriteTopologyCreator, sofa::component::playback::WriteStateActivator, sofa::component::playback::WriteStateCreator, sofa::component::playback::ReadTopologyModifier, sofa::component::playback::ReadTopologyActivator, sofa::component::playback::ReadTopologyCreator, sofa::component::playback::ReadStateModifier, sofa::component::playback::ReadStateActivator, sofa::component::playback::ReadStateCreator, sofa::component::playback::CompareTopologyResult, sofa::component::playback::CompareTopologyCreator, sofa::component::playback::CompareStateResult, sofa::component::playback::CompareStateCreator, sofa::simulation::ExportVisualModelOBJVisitor, sofa::simulation::graph::ExportDotVisitor, and sofa::simulation::CleanupVisitor.

◆ processNodeTopDown() [2/2]

virtual Result sofa::simulation::Visitor::processNodeTopDown ( simulation::Node node,
LocalStorage *   
)
virtualdelete

Callback method called when descending to a new node. Recursion will stop if this method returns RESULT_PRUNE This version is offered a LocalStorage to store temporary data

Reimplemented in sofa::simulation::BaseMechanicalVisitor.

◆ removeTag()

Visitor& sofa::simulation::Visitor::removeTag ( Tag  t)
inline

◆ runVisitorTask() [1/2]

template<class VisitorType , class VContext , class ObjectType >
Visitor::Result sofa::simulation::Visitor::runVisitorTask ( VisitorType *  visitor,
VContext *  ctx,
Result(VisitorType::*)(VContext *, ObjectType *)  task,
ObjectType *  ptr,
const std::string &  typeInfo = std::string("type") 
)
protected

Function to be called when a visitor executes a main task It surrounds the task function with debug information

◆ runVisitorTask() [2/2]

template<class VisitorType , class VContext , class ObjectType >
void sofa::simulation::Visitor::runVisitorTask ( VisitorType *  visitor,
VContext *  ctx,
void(VisitorType::*)(VContext *, ObjectType *)  task,
ObjectType *  ptr,
const std::string &  typeInfo = std::string("type") 
)
protected

Function to be called when a visitor executes a main task It surrounds the task function with debug information

◆ setTags()

Visitor& sofa::simulation::Visitor::setTags ( const TagSet t)
inline

◆ testTags()

bool sofa::simulation::Visitor::testTags ( sofa::core::objectmodel::BaseObject obj)

◆ treeTraversal()

virtual bool sofa::simulation::Visitor::treeTraversal ( TreeTraversalRepetition repeat)
inlinevirtual
Returns
treeTraversal returns true if and only if a tree traversal must be enforced (even for a DAG)
Parameters
repeatTell if a node callback can be executed several times (at each traversal in diamond configurations)

Reimplemented in sofa::simulation::XMLPrintVisitor, sofa::simulation::VisualVisitor, and sofa::simulation::PrintVisitor.

Enum details

◆ Result

Enumerator
RESULT_CONTINUE 
RESULT_PRUNE 

◆ TreeTraversalRepetition

Enumerator
NO_REPETITION 
REPEAT_ALL 
REPEAT_ONCE