SOFA API  b3f2f2a4
Open source framework for multi-physics simuation
sofa::simulation::XMLPrintVisitor Class Reference

#include <XMLPrintVisitor.h>

Inheritance diagram for sofa::simulation::XMLPrintVisitor:

Protected Attributes

std::ostream & m_out
 
int level
 
- Protected Attributes inherited from sofa::simulation::Visitor
const sofa::core::ExecParamsparams
 

Public Member Functions

 XMLPrintVisitor (const sofa::core::ExecParams *params, std::ostream &out)
 
template<class T >
void processObject (T obj)
 
template<class Seq >
void processObjects (Seq &list)
 
void processBaseObject (sofa::core::objectmodel::BaseObject *obj)
 
Result processNodeTopDown (simulation::Node *node) override
 Callback method called when decending to a new node. Recursion will stop if this method returns RESULT_PRUNE. More...
 
void processNodeBottomUp (simulation::Node *node) override
 Callback method called after child node have been processed and before going back to the parent node. More...
 
const chargetClassName () const override
 
int getLevel () const
 
void setLevel (int l)
 
bool treeTraversal (TreeTraversalRepetition &repeat) override
 
- Public Member Functions inherited from sofa::simulation::Visitor
 Visitor (const sofa::core::ExecParams *params)
 
virtual ~Visitor ()
 
const sofa::core::ExecParamsexecParams () const
 
virtual bool childOrderReversed (simulation::Node *)
 Return true to reverse the order of traversal of child nodes. More...
 
virtual const chargetCategoryName () 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)
 

Additional Inherited Members

- Public Attributes inherited from sofa::simulation::Visitor
TagSet subsetsToManage
 list of the subsets More...
 
bool canAccessSleepingNode
 Can the visitor access sleeping nodes? More...
 
- Protected Member Functions inherited from sofa::simulation::Visitor
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

◆ level

int sofa::simulation::XMLPrintVisitor::level
protected

◆ m_out

std::ostream& sofa::simulation::XMLPrintVisitor::m_out
protected

Constructor details

◆ XMLPrintVisitor()

sofa::simulation::XMLPrintVisitor::XMLPrintVisitor ( const sofa::core::ExecParams params,
std::ostream &  out 
)
inline

Function details

◆ getClassName()

const char* sofa::simulation::XMLPrintVisitor::getClassName ( ) const
inlineoverridevirtual

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

Reimplemented from sofa::simulation::Visitor.

◆ getLevel()

int sofa::simulation::XMLPrintVisitor::getLevel ( ) const
inline

◆ processBaseObject()

void sofa::simulation::XMLPrintVisitor::processBaseObject ( sofa::core::objectmodel::BaseObject obj)

◆ processNodeBottomUp()

void sofa::simulation::XMLPrintVisitor::processNodeBottomUp ( simulation::Node )
overridevirtual

Callback method called after child node have been processed and before going back to the parent node.

Reimplemented from sofa::simulation::Visitor.

◆ processNodeTopDown()

Visitor::Result sofa::simulation::XMLPrintVisitor::processNodeTopDown ( simulation::Node )
overridevirtual

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

Reimplemented from sofa::simulation::Visitor.

◆ processObject()

template<class T >
void sofa::simulation::XMLPrintVisitor::processObject ( obj)

◆ processObjects()

template<class Seq >
void sofa::simulation::XMLPrintVisitor::processObjects ( Seq &  list)

◆ setLevel()

void sofa::simulation::XMLPrintVisitor::setLevel ( int  l)
inline

◆ treeTraversal()

bool sofa::simulation::XMLPrintVisitor::treeTraversal ( TreeTraversalRepetition repeat)
overridevirtual
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 from sofa::simulation::Visitor.