SOFA API  c76874b7
Open source framework for multi-physics simuation
sofa::component::misc::WriteStateCreator Class Reference

#include <WriteState.h>

Create WriteState component in the graph each time needed. More...

Inheritance diagram for sofa::component::misc::WriteStateCreator:

Detailed Description

Create WriteState component in the graph each time needed.

Protected Attributes

std::string sceneName
 
std::string extension
 
helper::vector< doublem_times
 
bool recordX
 
bool recordV
 
bool recordF
 
bool createInMapping
 
int counterWriteState
 
- Protected Attributes inherited from sofa::simulation::Visitor
const core::ExecParamsparams
 

Public Member Functions

 WriteStateCreator (const core::ExecParams *params)
 
 WriteStateCreator (const core::ExecParams *params, const std::string &n, bool _recordX, bool _recordV, bool _recordF, bool _createInMapping, int c=0)
 
Result processNodeTopDown (simulation::Node *) override
 Callback method called when decending to a new node. Recursion will stop if this method returns RESULT_PRUNE. More...
 
void setSceneName (std::string &n)
 
void setRecordX (bool b)
 
void setRecordV (bool b)
 
void setRecordF (bool b)
 
void setCreateInMapping (bool b)
 
void setCounter (int c)
 
const char * getClassName () const override
 
void setExportTimes (const helper::vector< double > times)
 
- Public Member Functions inherited from sofa::simulation::Visitor
 Visitor (const core::ExecParams *params)
 
virtual ~Visitor ()
 
const core::ExecParamsexecParams () const
 
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 char * getCategoryName () const
 
virtual std::string getInfos () const
 
void debug_write_state_before (core::objectmodel::BaseObject *)
 
void debug_write_state_after (core::objectmodel::BaseObject *)
 
template<class Visit , class VContext , class Container , class Object >
void for_each (Visit *visitor, VContext *ctx, const Container &list, void(Visit::*fn)(VContext *, Object *))
 Helper method to enumerate objects in the given list. The callback gets the pointer to node. More...
 
template<class Visit , class VContext , class Container , class Object >
Visitor::Result for_each_r (Visit *visitor, VContext *ctx, const Container &list, Visitor::Result(Visit::*fn)(VContext *, Object *))
 Helper method to enumerate objects in the given list. The callback gets the pointer to node. More...
 
bool testTags (core::objectmodel::BaseObject *obj)
 
virtual void execute (core::objectmodel::BaseContext *node, bool precomputedOrder=false)
 Alias for context->executeVisitor(this) More...
 
virtual ctime_t begin (simulation::Node *node, core::objectmodel::BaseObject *obj, const std::string &typeInfo=std::string("type"))
 
virtual void end (simulation::Node *node, core::objectmodel::BaseObject *obj, ctime_t t0)
 
ctime_t begin (simulation::Visitor::VisitorContext *node, core::objectmodel::BaseObject *obj, const std::string &typeInfo=std::string("type"))
 
void end (simulation::Visitor::VisitorContext *node, 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 *)
 
virtual void processNodeBottomUp (simulation::Node *node, LocalStorage *)
 
VisitorsetTags (const TagSet &t)
 
VisitoraddTag (Tag t)
 
VisitorremoveTag (Tag t)
 

Protected Member Functions

void addWriteState (sofa::core::behavior::BaseMechanicalState *ms, simulation::Node *gnode)
 

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...
 

Attribute details

int sofa::component::misc::WriteStateCreator::counterWriteState
protected
bool sofa::component::misc::WriteStateCreator::createInMapping
protected
std::string sofa::component::misc::WriteStateCreator::extension
protected
helper::vector<double> sofa::component::misc::WriteStateCreator::m_times
protected
bool sofa::component::misc::WriteStateCreator::recordF
protected
bool sofa::component::misc::WriteStateCreator::recordV
protected
bool sofa::component::misc::WriteStateCreator::recordX
protected
std::string sofa::component::misc::WriteStateCreator::sceneName
protected

Constructor details

sofa::component::misc::WriteStateCreator::WriteStateCreator ( const core::ExecParams params)
sofa::component::misc::WriteStateCreator::WriteStateCreator ( const core::ExecParams params,
const std::string &  n,
bool  _recordX,
bool  _recordV,
bool  _recordF,
bool  _createInMapping,
int  c = 0 
)

Function details

void sofa::component::misc::WriteStateCreator::addWriteState ( sofa::core::behavior::BaseMechanicalState ms,
simulation::Node gnode 
)
protected
const char* sofa::component::misc::WriteStateCreator::getClassName ( ) const
inlineoverridevirtual

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

Reimplemented from sofa::simulation::Visitor.

simulation::Visitor::Result sofa::component::misc::WriteStateCreator::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.

void sofa::component::misc::WriteStateCreator::setCounter ( int  c)
inline
void sofa::component::misc::WriteStateCreator::setCreateInMapping ( bool  b)
inline
void sofa::component::misc::WriteStateCreator::setExportTimes ( const helper::vector< double times)
inline
void sofa::component::misc::WriteStateCreator::setRecordF ( bool  b)
inline
void sofa::component::misc::WriteStateCreator::setRecordV ( bool  b)
inline
void sofa::component::misc::WriteStateCreator::setRecordX ( bool  b)
inline
void sofa::component::misc::WriteStateCreator::setSceneName ( std::string &  n)
inline