#include <ExportDotVisitor.h>


Public Member Functions | |
| ExportDotVisitor (std::ostream *out) | |
| ~ExportDotVisitor () | |
| void | processObject (GNode *node, core::objectmodel::BaseObject *obj) |
| virtual Result | processNodeTopDown (GNode *node) |
| Callback method called when decending to a new node. Recursion will stop if this method returns RESULT_PRUNE. | |
| virtual void | processNodeBottomUp (GNode *node) |
| Callback method called after child node have been processed and before going back to the parent node. | |
Data Fields | |
| std::ostream * | out |
| bool | showNode |
| bool | showObject |
| bool | showBehaviorModel |
| bool | showCollisionModel |
| bool | showVisualModel |
| bool | showMapping |
| bool | showContext |
| bool | showCollisionPipeline |
| bool | showSolver |
| bool | showMechanicalState |
| bool | showForceField |
| bool | showInteractionForceField |
| bool | showConstraint |
| bool | showMass |
| bool | showTopology |
| bool | showMechanicalMapping |
| bool | labelNodeName |
| bool | labelNodeClass |
| bool | labelObjectName |
| bool | labelObjectClass |
Protected Member Functions | |
| bool | display (GNode *node, const char **color=NULL) |
| Test if a node should be displayed. | |
| bool | display (core::objectmodel::BaseObject *obj, const char **color=NULL) |
| Test if an object should be displayed. | |
| std::string | getParentName (core::objectmodel::BaseObject *obj) |
| Find the node or object a given object should be attached to. | |
| std::string | getName (core::objectmodel::Base *o, std::string prefix) |
| Compute the name of a given node or object. | |
| std::string | getName (GNode *node) |
| Compute the name of a given node. | |
| std::string | getName (core::objectmodel::BaseObject *obj) |
| Compute the name of a given object. | |
Protected Attributes | |
| std::map < core::objectmodel::Base *, std::string > | names |
| None names in output. | |
| std::map< std::string, int > | nextIndex |
| Next indice available for duplicated names. | |
Definition at line 42 of file ExportDotVisitor.h.
| sofa::simulation::tree::ExportDotVisitor::ExportDotVisitor | ( | std::ostream * | out | ) |
Definition at line 40 of file ExportDotVisitor.cpp.
| sofa::simulation::tree::ExportDotVisitor::~ExportDotVisitor | ( | ) |
| bool sofa::simulation::tree::ExportDotVisitor::display | ( | core::objectmodel::BaseObject * | obj, | |
| const char ** | color = NULL | |||
| ) | [protected] |
Test if an object should be displayed.
Definition at line 86 of file ExportDotVisitor.cpp.
References sofa::simulation::Colors::BMODEL, sofa::simulation::Colors::CMODEL, sofa::simulation::Colors::COLLISION, sofa::simulation::Colors::COLOR, sofa::simulation::Colors::CONSTRAINT, sofa::simulation::Colors::CONTEXT, sofa::simulation::Colors::FFIELD, sofa::simulation::Colors::IFFIELD, sofa::simulation::Colors::MAPPING, sofa::simulation::Colors::MASS, sofa::simulation::Colors::MMAPPING, sofa::simulation::Colors::MMODEL, sofa::simulation::Colors::OBJECT, showBehaviorModel, showCollisionModel, showCollisionPipeline, showConstraint, showContext, showForceField, showInteractionForceField, showMapping, showMass, showMechanicalMapping, showMechanicalState, showObject, showSolver, showTopology, showVisualModel, sofa::simulation::Colors::SOLVER, sofa::simulation::Colors::TOPOLOGY, and sofa::simulation::Colors::VMODEL.
| bool sofa::simulation::tree::ExportDotVisitor::display | ( | GNode * | node, | |
| const char ** | color = NULL | |||
| ) | [protected] |
Test if a node should be displayed.
Definition at line 72 of file ExportDotVisitor.cpp.
References sofa::simulation::Colors::COLOR, sofa::simulation::Colors::NODE, and showNode.
Referenced by getParentName(), processNodeTopDown(), and processObject().
| std::string sofa::simulation::tree::ExportDotVisitor::getName | ( | core::objectmodel::BaseObject * | obj | ) | [protected] |
Compute the name of a given object.
Definition at line 199 of file ExportDotVisitor.cpp.
References getName().
| std::string sofa::simulation::tree::ExportDotVisitor::getName | ( | GNode * | node | ) | [protected] |
Compute the name of a given node.
Definition at line 193 of file ExportDotVisitor.cpp.
References getName().
| std::string sofa::simulation::tree::ExportDotVisitor::getName | ( | core::objectmodel::Base * | o, | |
| std::string | prefix | |||
| ) | [protected] |
Compute the name of a given node or object.
Definition at line 166 of file ExportDotVisitor.cpp.
References sofa::core::objectmodel::Base::getName(), names, and nextIndex.
Referenced by getName(), getParentName(), processNodeTopDown(), and processObject().
| std::string sofa::simulation::tree::ExportDotVisitor::getParentName | ( | core::objectmodel::BaseObject * | obj | ) | [protected] |
Find the node or object a given object should be attached to.
This is the parent node if it is displayed, otherwise it is the attached MechanicalState or Solver. Returns an empty string if not found.
This is the parent node if it is displayed, otherwise it is the attached MechanicalState or Solver. Returns an empty string if not found.
Definition at line 137 of file ExportDotVisitor.cpp.
References sofa::simulation::Node::collisionPipeline, display(), sofa::core::objectmodel::BaseObject::getContext(), getName(), sofa::simulation::Node::masterSolver, sofa::simulation::Node::mechanicalMapping, sofa::simulation::Node::mechanicalState, sofa::simulation::tree::GNode::parent, and sofa::simulation::Node::solver.
Referenced by processObject().
| void sofa::simulation::tree::ExportDotVisitor::processNodeBottomUp | ( | GNode * | ) | [virtual] |
Callback method called after child node have been processed and before going back to the parent node.
Reimplemented from sofa::simulation::tree::GNodeVisitor.
Definition at line 308 of file ExportDotVisitor.cpp.
| simulation::Visitor::Result sofa::simulation::tree::ExportDotVisitor::processNodeTopDown | ( | GNode * | ) | [virtual] |
Callback method called when decending to a new node. Recursion will stop if this method returns RESULT_PRUNE.
Reimplemented from sofa::simulation::tree::GNodeVisitor.
Definition at line 270 of file ExportDotVisitor.cpp.
References display(), sofa::core::objectmodel::Base::getName(), getName(), sofa::helper::gettypename(), labelNodeClass, labelNodeName, sofa::simulation::Node::object, out, sofa::simulation::tree::GNode::parent, processObject(), and sofa::simulation::Visitor::RESULT_CONTINUE.
| void sofa::simulation::tree::ExportDotVisitor::processObject | ( | GNode * | node, | |
| core::objectmodel::BaseObject * | obj | |||
| ) |
Definition at line 204 of file ExportDotVisitor.cpp.
References display(), sofa::core::BaseMapping::getFrom(), sofa::core::componentmodel::behavior::InteractionForceField::getMechModel1(), sofa::core::componentmodel::behavior::InteractionForceField::getMechModel2(), sofa::core::objectmodel::Base::getName(), getName(), getParentName(), sofa::core::BaseMapping::getTo(), sofa::helper::gettypename(), labelObjectClass, labelObjectName, and out.
Referenced by processNodeTopDown().
Definition at line 65 of file ExportDotVisitor.h.
Referenced by sofa::gui::qt::GenGraphForm::doExport(), and processNodeTopDown().
Definition at line 64 of file ExportDotVisitor.h.
Referenced by sofa::gui::qt::GenGraphForm::doExport(), and processNodeTopDown().
Definition at line 67 of file ExportDotVisitor.h.
Referenced by sofa::gui::qt::GenGraphForm::doExport(), and processObject().
Definition at line 66 of file ExportDotVisitor.h.
Referenced by sofa::gui::qt::GenGraphForm::doExport(), and processObject().
std::map<core::objectmodel::Base*, std::string> sofa::simulation::tree::ExportDotVisitor::names [protected] |
std::map<std::string, int> sofa::simulation::tree::ExportDotVisitor::nextIndex [protected] |
Next indice available for duplicated names.
Definition at line 83 of file ExportDotVisitor.h.
Referenced by getName().
| std::ostream* sofa::simulation::tree::ExportDotVisitor::out |
Definition at line 45 of file ExportDotVisitor.h.
Referenced by processNodeTopDown(), processObject(), and ~ExportDotVisitor().
Definition at line 49 of file ExportDotVisitor.h.
Referenced by display(), and sofa::gui::qt::GenGraphForm::doExport().
Definition at line 50 of file ExportDotVisitor.h.
Referenced by display(), and sofa::gui::qt::GenGraphForm::doExport().
Definition at line 54 of file ExportDotVisitor.h.
Referenced by display(), and sofa::gui::qt::GenGraphForm::doExport().
Definition at line 59 of file ExportDotVisitor.h.
Referenced by display(), and sofa::gui::qt::GenGraphForm::doExport().
Definition at line 53 of file ExportDotVisitor.h.
Referenced by display(), and sofa::gui::qt::GenGraphForm::doExport().
Definition at line 57 of file ExportDotVisitor.h.
Referenced by display(), and sofa::gui::qt::GenGraphForm::doExport().
Definition at line 58 of file ExportDotVisitor.h.
Referenced by display(), and sofa::gui::qt::GenGraphForm::doExport().
Definition at line 52 of file ExportDotVisitor.h.
Referenced by display(), and sofa::gui::qt::GenGraphForm::doExport().
Definition at line 60 of file ExportDotVisitor.h.
Referenced by display(), and sofa::gui::qt::GenGraphForm::doExport().
Definition at line 62 of file ExportDotVisitor.h.
Referenced by display(), and sofa::gui::qt::GenGraphForm::doExport().
Definition at line 56 of file ExportDotVisitor.h.
Referenced by display(), and sofa::gui::qt::GenGraphForm::doExport().
Definition at line 47 of file ExportDotVisitor.h.
Referenced by display(), and sofa::gui::qt::GenGraphForm::doExport().
Definition at line 48 of file ExportDotVisitor.h.
Referenced by display(), and sofa::gui::qt::GenGraphForm::doExport().
Definition at line 55 of file ExportDotVisitor.h.
Referenced by display(), and sofa::gui::qt::GenGraphForm::doExport().
Definition at line 61 of file ExportDotVisitor.h.
Referenced by display(), and sofa::gui::qt::GenGraphForm::doExport().
Definition at line 51 of file ExportDotVisitor.h.
Referenced by display(), and sofa::gui::qt::GenGraphForm::doExport().
1.5.7.1