#include <Base.h>


Public Member Functions | |
| Base () | |
| virtual | ~Base () |
| std::string | getName () const |
| Accessor to the object name. | |
| void | setName (const std::string &n) |
| Set the name of this object. | |
| virtual std::string | getTypeName () const |
| Get the type name of this object (i.e. class and template types). | |
| virtual std::string | getClassName () const |
| Get the class name of this object. | |
| virtual std::string | getTemplateName () const |
| Get the template type names (if any) used to instantiate this object. | |
| void | parseFields (std::list< std::string > str) |
| Assign the field values stored in the given list of name + value pairs of strings. | |
| virtual void | parseFields (const std::map< std::string, std::string * > &str) |
| Assign the field values stored in the given map of name -> value pairs. | |
| void | writeDatas (std::map< std::string, std::string * > &str) |
| Write the current field values to the given map of name -> value pairs. | |
| void | writeDatas (std::ostream &out) |
| Write the current field values to the given text output stream. | |
| void | xmlWriteNodeDatas (std::ostream &out, unsigned level) |
| Write the current Node values to the given XML output stream. | |
| void | xmlWriteDatas (std::ostream &out, unsigned level) |
| Write the current field values to the given XML output stream. | |
| unsigned int | findField (const char *name) const |
| Find a field give its name, if not found, the index is the size of the vector. | |
| unsigned int | findField (const std::string &name) const |
| template<class T > | |
| Data< T > | initData (Data< T > *field, const char *name, const char *help, bool isDisplayed=true) |
| Helper method used to initialize a field containing a value of type T. | |
| template<class T > | |
| Data< T > | initData (Data< T > *field, const T &value, const char *name, const char *help, bool isDisplayed=true) |
| Helper method used to initialize a field containing a value of type T. | |
| template<class T > | |
| DataPtr< T > | initDataPtr (DataPtr< T > *field, T *ptr, const char *name, const char *help, bool isDisplayed=true) |
| Helper method used to initialize a field pointing to a value of type T. | |
| virtual void | parse (BaseObjectDescription *arg) |
| Parse the given description to assign values to this object's fields and potentially other parameters. | |
| std::vector< std::pair < std::string, BaseData * > > | getFields () |
| Accessor to the map containing all the fields of this object. | |
Static Public Member Functions | |
| static std::string | decodeTypeName (const std::type_info &t) |
| Helper method to decode the type name to a more readable form if possible. | |
| static std::string | decodeClassName (const std::type_info &t) |
| Helper method to extract the class name (removing namespaces and templates). | |
| static std::string | decodeNamespaceName (const std::type_info &t) |
| Helper method to extract the namespace (removing class name and templates). | |
| static std::string | decodeTemplateName (const std::type_info &t) |
| Helper method to extract the template name (removing namespaces and class name). | |
| template<class T > | |
| static std::string | typeName (const T *=NULL) |
| Helper method to get the type name of a type derived from this class. | |
| template<class T > | |
| static std::string | className (const T *=NULL) |
| Helper method to get the class name of a type derived from this class. | |
| template<class T > | |
| static std::string | namespaceName (const T *=NULL) |
| Helper method to get the namespace name of a type derived from this class. | |
| template<class T > | |
| static std::string | templateName (const T *=NULL) |
| Helper method to get the template name of a type derived from this class. | |
Data Fields | |
| Data< std::string > | name |
| Name of the object. | |
Protected Member Functions | |
| void | addField (BaseData *f, const char *name) |
| Add a field. Note that this method should only be called if the field was not initialized with the initData<T> of field<T> methods. | |
Protected Attributes | |
| std::vector< std::pair < std::string, BaseData * > > | m_fieldVec |
| name -> Field object | |
This class contains all functionnality shared by every objects in SOFA. Most importantly it defines how to retrieve information about an object (name, type, fields).
Definition at line 55 of file Base.h.
| sofa::core::objectmodel::Base::Base | ( | ) |
| void sofa::core::objectmodel::Base::addField | ( | BaseData * | f, | |
| const char * | name | |||
| ) | [inline, protected] |
Add a field. Note that this method should only be called if the field was not initialized with the initData<T> of field<T> methods.
Definition at line 239 of file Base.h.
References findField(), and m_fieldVec.
Referenced by sofa::component::MechanicalObject< DataTypes >::MechanicalObject().
| static std::string sofa::core::objectmodel::Base::className | ( | const T * | = NULL |
) | [inline, static] |
Helper method to get the class name of a type derived from this class.
This method should be used as follow :
T* ptr = NULL; std::string type = T::className(ptr);
Definition at line 117 of file Base.h.
References decodeClassName().
Referenced by sofa::component::topology::Triangle2EdgeTopologicalMapping::canCreate(), sofa::component::topology::Tetra2TriangleTopologicalMapping::canCreate(), sofa::component::topology::Quad2TriangleTopologicalMapping::canCreate(), sofa::component::topology::Hexa2QuadTopologicalMapping::canCreate(), sofa::component::topology::Edge2QuadTopologicalMapping::canCreate(), sofa::core::Mapping< BaseMeshTopology, BaseMeshTopology >::canCreate(), and sofa::gpu::cuda::CudaVector< TReal >::reserve().
| std::string sofa::core::objectmodel::Base::decodeClassName | ( | const std::type_info & | t | ) | [static] |
Helper method to extract the class name (removing namespaces and templates).
Extract the class name (removing namespaces and templates).
Definition at line 158 of file Base.cpp.
References name.
Referenced by className(), and getClassName().
| std::string sofa::core::objectmodel::Base::decodeNamespaceName | ( | const std::type_info & | t | ) | [static] |
Helper method to extract the namespace (removing class name and templates).
Extract the namespace (removing class name and templates).
Definition at line 231 of file Base.cpp.
References name.
Referenced by projects::generateFactoryPHPDoc(), namespaceName(), and sofa::gui::qt::ModifyObject::setNode().
| std::string sofa::core::objectmodel::Base::decodeTemplateName | ( | const std::type_info & | t | ) | [static] |
Helper method to extract the template name (removing namespaces and class name).
Decode the template name (removing namespaces and class name).
Definition at line 270 of file Base.cpp.
References name.
Referenced by sofa::core::ObjectFactory::createObject(), getTemplateName(), and templateName().
| std::string sofa::core::objectmodel::Base::decodeTypeName | ( | const std::type_info & | t | ) | [static] |
Helper method to decode the type name to a more readable form if possible.
Decode the type's name to a more readable form if possible.
Definition at line 80 of file Base.cpp.
References name.
Referenced by sofa::gpu::cuda::CudaMatrix< T >::copyToDevice(), sofa::gpu::cuda::CudaVector< TReal >::copyToDevice(), sofa::gpu::cuda::CudaMatrix< T >::copyToHost(), sofa::gpu::cuda::CudaVector< TReal >::copyToHost(), getTypeName(), sofa::gpu::cuda::CudaVector< TReal >::operator=(), and typeName().
| unsigned int sofa::core::objectmodel::Base::findField | ( | const std::string & | name | ) | const [inline] |
| unsigned int sofa::core::objectmodel::Base::findField | ( | const char * | name | ) | const [inline] |
Find a field give its name, if not found, the index is the size of the vector.
Definition at line 163 of file Base.h.
References m_fieldVec.
Referenced by addField(), initData(), initDataPtr(), and parseFields().
| virtual std::string sofa::core::objectmodel::Base::getClassName | ( | ) | const [inline, virtual] |
Get the class name of this object.
Definition at line 77 of file Base.h.
References decodeClassName().
Referenced by sofa::core::componentmodel::behavior::MixedInteractionForceField< TDataTypes1, TDataTypes2 >::addDForce(), sofa::core::componentmodel::behavior::ForceField< TDataTypes >::addDForce(), sofa::core::componentmodel::topology::BaseMeshTopology::addEdge(), sofa::core::componentmodel::topology::BaseMeshTopology::addHexa(), sofa::core::componentmodel::topology::BaseMeshTopology::addPoint(), sofa::core::componentmodel::topology::BaseMeshTopology::addQuad(), sofa::core::componentmodel::topology::BaseMeshTopology::addTetra(), sofa::core::componentmodel::topology::BaseMeshTopology::addTriangle(), sofa::component::collision::DefaultPickingManager< TDataTypes, ContactForceField >::attach(), sofa::core::componentmodel::topology::BaseMeshTopology::clear(), sofa::component::collision::DefaultContactManager::createContacts(), sofa::gpu::cuda::CudaCollisionDetection::createTest(), sofa::core::componentmodel::topology::BaseMeshTopology::firstChange(), sofa::core::componentmodel::topology::BaseMeshTopology::firstStateChange(), SofaFlowVR::FlowVRInputMesh::flowvrBeginIteration(), sofa::core::componentmodel::topology::BaseMeshTopology::getEdgeHexaShell(), sofa::core::componentmodel::topology::BaseMeshTopology::getEdgeIndex(), sofa::core::componentmodel::topology::BaseMeshTopology::getEdgeIndexInHexahedron(), sofa::core::componentmodel::topology::BaseMeshTopology::getEdgeIndexInQuad(), sofa::core::componentmodel::topology::BaseMeshTopology::getEdgeIndexInTetrahedron(), sofa::core::componentmodel::topology::BaseMeshTopology::getEdgeIndexInTriangle(), sofa::core::componentmodel::topology::BaseMeshTopology::getEdgeQuadShell(), sofa::core::componentmodel::topology::BaseMeshTopology::getEdgeTetraShell(), sofa::core::componentmodel::topology::BaseMeshTopology::getEdgeTriangleShell(), sofa::core::componentmodel::topology::BaseMeshTopology::getEdgeVertexShell(), sofa::core::componentmodel::topology::BaseMeshTopology::getHexaEdgeShell(), sofa::core::componentmodel::topology::BaseMeshTopology::getHexahedronIndex(), sofa::core::componentmodel::topology::BaseMeshTopology::getHexaQuadShell(), sofa::core::componentmodel::topology::BaseMeshTopology::getHexaVertexShell(), sofa::core::componentmodel::topology::BaseMeshTopology::getLocalTetrahedronEdges(), sofa::core::componentmodel::topology::BaseMeshTopology::getQuadEdgeShell(), sofa::core::componentmodel::topology::BaseMeshTopology::getQuadHexaShell(), sofa::core::componentmodel::topology::BaseMeshTopology::getQuadIndex(), sofa::core::componentmodel::topology::BaseMeshTopology::getQuadIndexInHexahedron(), sofa::core::componentmodel::topology::BaseMeshTopology::getQuadVertexShell(), sofa::core::componentmodel::topology::BaseMeshTopology::getTetraEdgeShell(), sofa::core::componentmodel::topology::BaseMeshTopology::getTetrahedronIndex(), sofa::core::componentmodel::topology::BaseMeshTopology::getTetraTriangleShell(), sofa::core::componentmodel::topology::BaseMeshTopology::getTetraVertexShell(), sofa::core::componentmodel::topology::BaseMeshTopology::getTriangleEdgeShell(), sofa::core::componentmodel::topology::BaseMeshTopology::getTriangleIndex(), sofa::core::componentmodel::topology::BaseMeshTopology::getTriangleIndexInTetrahedron(), sofa::core::componentmodel::topology::BaseMeshTopology::getTriangleTetraShell(), sofa::core::componentmodel::topology::BaseMeshTopology::getTriangleVertexShell(), sofa::core::componentmodel::topology::BaseMeshTopology::getVertexIndexInHexahedron(), sofa::core::componentmodel::topology::BaseMeshTopology::getVertexIndexInQuad(), sofa::core::componentmodel::topology::BaseMeshTopology::getVertexIndexInTetrahedron(), sofa::core::componentmodel::topology::BaseMeshTopology::getVertexIndexInTriangle(), sofa::core::componentmodel::topology::BaseMeshTopology::lastChange(), sofa::core::componentmodel::topology::BaseMeshTopology::lastStateChange(), sofa::simulation::OdeSolverImpl::m_print(), sofa::simulation::OdeSolverImpl::m_resetSystem(), sofa::simulation::OdeSolverImpl::m_setSystemLHVector(), sofa::simulation::OdeSolverImpl::m_setSystemMBKMatrix(), sofa::simulation::OdeSolverImpl::m_setSystemRHVector(), sofa::simulation::OdeSolverImpl::m_solveSystem(), sofa::gpu::cuda::CudaCollisionDetection::PointRigidTest::PointRigidTest(), sofa::gpu::cuda::CudaCollisionDetection::RigidRigidTest::RigidRigidTest(), sofa::gui::qt::ModifyObject::setNode(), and sofa::gpu::cuda::CudaCollisionDetection::SphereRigidTest::SphereRigidTest().
| std::vector< std::pair<std::string, BaseData*> > sofa::core::objectmodel::Base::getFields | ( | ) | [inline] |
Accessor to the map containing all the fields of this object.
Definition at line 232 of file Base.h.
References m_fieldVec.
Referenced by sofa::gui::qt::ModifyObject::setNode().
| std::string sofa::core::objectmodel::Base::getName | ( | ) | const |
Accessor to the object name.
Definition at line 66 of file Base.cpp.
References sofa::core::objectmodel::Data< T >::getValue(), and name.
Referenced by sofa::gui::qt::GraphListenerQListView::addChild(), sofa::component::collision::BruteForceDetection::addCollisionPair(), sofa::component::misc::CompareStateCreator::addCompareState(), sofa::gui::qt::GraphModeler::addComponent(), sofa::gui::qt::GraphListenerQListView::addObject(), sofa::component::misc::ReadStateCreator::addReadState(), sofa::component::misc::WriteStateCreator::addWriteState(), sofa::component::MechanicalObject< DataTypes >::applyScale(), sofa::component::collision::DefaultPickingManager< TDataTypes, ContactForceField >::attach(), sofa::component::topology::SparseGridTopology::buildVirtualFinerLevels(), sofa::component::collision::DefaultContactManager::createContacts(), sofa::component::collision::DefaultPipeline::doCollisionDetection(), sofa::component::collision::DefaultPipeline::doCollisionResponse(), sofa::core::componentmodel::behavior::PairInteractionForceField< TDataTypes >::getMState(), sofa::simulation::tree::ExportDotVisitor::getName(), sofa::component::visualmodel::OgreVisualModel::getOgreName(), sofa::simulation::tree::GNode::getPathName(), sofa::component::misc::WriteState::handleEvent(), sofa::core::objectmodel::BaseObject::handleEvent(), sofa::component::forcefield::TriangleFEMForceField< DataTypes >::init(), sofa::component::forcefield::HexahedronFEMForceField< DataTypes >::init(), sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::init(), sofa::component::constraint::LinearSolverConstraintCorrection< TDataTypes >::init(), sofa::core::componentmodel::behavior::PairInteractionForceField< TDataTypes >::init(), sofa::component::misc::Monitor< DataTypes >::initGnuplot(), sofa::component::MechanicalObject< DataTypes >::initGnuplot(), sofa::core::componentmodel::behavior::Mass< DataTypes >::initGnuplot(), sofa::simulation::tree::ExportDotVisitor::processNodeTopDown(), sofa::simulation::PrintVisitor::processNodeTopDown(), sofa::simulation::InstrumentVisitor::processNodeTopDown(), sofa::simulation::tree::ExportDotVisitor::processObject(), sofa::simulation::AnimateVisitor::processOdeSolver(), sofa::simulation::ExportOBJVisitor::processVisualModel(), SofaFlowVR::FlowVRRenderMesh::renderUpdate(), sofa::component::collision::BarycentricPenalityContact< TCollisionModel1, TCollisionModel2, ResponseDataTypes >::setDetectionOutputs(), sofa::gui::qt::ModifyObject::setNode(), sofa::simulation::Node::updateContext(), sofa::simulation::Node::updateSimulationContext(), and sofa::simulation::Node::updateVisualContext().
| virtual std::string sofa::core::objectmodel::Base::getTemplateName | ( | ) | const [inline, virtual] |
Get the template type names (if any) used to instantiate this object.
Reimplemented in sofa::core::componentmodel::behavior::Constraint< DataTypes >, sofa::core::componentmodel::behavior::ForceField< TDataTypes >, sofa::core::componentmodel::behavior::MechanicalState< TDataTypes >, sofa::core::componentmodel::behavior::MixedInteractionConstraint< TDataTypes1, TDataTypes2 >, sofa::core::componentmodel::behavior::MixedInteractionForceField< TDataTypes1, TDataTypes2 >, sofa::core::componentmodel::behavior::PairInteractionConstraint< TDataTypes >, sofa::core::componentmodel::behavior::PairInteractionForceField< TDataTypes >, sofa::core::componentmodel::behavior::State< TDataTypes >, sofa::core::Mapping< TIn, TOut >, sofa::component::constraint::LinearSolverConstraintCorrection< TDataTypes >, sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >, sofa::component::constraint::UncoupledConstraintCorrection< TDataTypes >, sofa::component::constraint::UnilateralInteractionConstraint< DataTypes >, sofa::component::container::SpatialGridContainer< DataTypes >, sofa::component::controller::EdgeSetController< DataTypes >, sofa::component::controller::MechanicalStateController< DataTypes >, sofa::component::misc::Monitor< DataTypes >, sofa::component::topology::PointSetGeometryAlgorithms< DataTypes >, sofa::component::topology::PointSetTopologyAlgorithms< DataTypes >, sofa::component::visualmodel::OglTetrahedralModel< DataTypes >, sofa::component::visualmodel::VisualModelImpl, sofa::simulation::MatrixLinearSolver< Matrix, Vector >, sofa::core::componentmodel::behavior::Constraint< TDataTypes >, sofa::core::componentmodel::behavior::ForceField< sofa::gpu::cuda::CudaVectorTypes >, sofa::core::componentmodel::behavior::ForceField< sofa::defaulttype::StdVectorTypes >, sofa::core::componentmodel::behavior::ForceField< DataTypes >, sofa::core::componentmodel::behavior::MechanicalState< sofa::gpu::cuda::CudaVectorTypes >, sofa::core::componentmodel::behavior::MechanicalState< sofa::defaulttype::StdVectorTypes >, sofa::core::componentmodel::behavior::MechanicalState< StdRigidTypes< 3, double > >, sofa::core::componentmodel::behavior::MechanicalState< DataTypes2 >, sofa::core::componentmodel::behavior::MechanicalState< Rigid3Types >, sofa::core::componentmodel::behavior::MechanicalState< DataTypes1 >, sofa::core::componentmodel::behavior::MechanicalState< DataTypes >, sofa::core::componentmodel::behavior::MixedInteractionForceField< DataTypes1, DataTypes2 >, sofa::core::componentmodel::behavior::PairInteractionConstraint< DataTypes >, sofa::core::componentmodel::behavior::PairInteractionForceField< CudaVec3fTypes >, sofa::core::componentmodel::behavior::PairInteractionForceField< DataTypes >, sofa::core::Mapping< sofa::core::componentmodel::topology::BaseMeshTopology, >, sofa::core::Mapping< BaseMeshTopology, BaseMeshTopology >, sofa::component::constraint::UnilateralInteractionConstraint< sofa::defaulttype::StdVectorTypes >, and sofa::simulation::MatrixLinearSolver< TMatrix, TVector >.
Definition at line 83 of file Base.h.
References decodeTemplateName().
Referenced by sofa::gui::qt::GraphModeler::addComponent(), sofa::component::collision::DefaultPickingManager< TDataTypes, ContactForceField >::attach(), and sofa::gui::qt::ModifyObject::setNode().
| virtual std::string sofa::core::objectmodel::Base::getTypeName | ( | ) | const [inline, virtual] |
Get the type name of this object (i.e. class and template types).
Definition at line 71 of file Base.h.
References decodeTypeName().
Referenced by sofa::core::componentmodel::behavior::BaseConstraintCorrection::CudaGetCompliance(), sofa::core::objectmodel::BaseObject::handleEvent(), and sofa::component::forcefield::HexahedronFEMForceField< DataTypes >::init().
| Data<T> sofa::core::objectmodel::Base::initData | ( | Data< T > * | field, | |
| const T & | value, | |||
| const char * | name, | |||
| const char * | help, | |||
| bool | isDisplayed = true | |||
| ) | [inline] |
Helper method used to initialize a field containing a value of type T.
Definition at line 199 of file Base.h.
References findField(), and m_fieldVec.
| Data<T> sofa::core::objectmodel::Base::initData | ( | Data< T > * | field, | |
| const char * | name, | |||
| const char * | help, | |||
| bool | isDisplayed = true | |||
| ) | [inline] |
Helper method used to initialize a field containing a value of type T.
Definition at line 184 of file Base.h.
References findField(), and m_fieldVec.
Referenced by Base(), sofa::core::componentmodel::behavior::Mass< DataTypes >::Mass(), sofa::component::mass::MatrixMass< DataTypes, MassType >::MatrixMass(), sofa::component::MechanicalObject< DataTypes >::MechanicalObject(), and sofa::component::forcefield::QuadularBendingSprings< DataTypes >::QuadularBendingSprings().
| DataPtr<T> sofa::core::objectmodel::Base::initDataPtr | ( | DataPtr< T > * | field, | |
| T * | ptr, | |||
| const char * | name, | |||
| const char * | help, | |||
| bool | isDisplayed = true | |||
| ) | [inline] |
Helper method used to initialize a field pointing to a value of type T.
Definition at line 214 of file Base.h.
References findField(), and m_fieldVec.
| static std::string sofa::core::objectmodel::Base::namespaceName | ( | const T * | = NULL |
) | [inline, static] |
Helper method to get the namespace name of a type derived from this class.
This method should be used as follow :
T* ptr = NULL; std::string type = T::namespaceName(ptr);
Definition at line 128 of file Base.h.
References decodeNamespaceName().
| void sofa::core::objectmodel::Base::parse | ( | BaseObjectDescription * | arg | ) | [virtual] |
Parse the given description to assign values to this object's fields and potentially other parameters.
Reimplemented in sofa::core::componentmodel::topology::BaseMeshTopology, sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >, sofa::component::forcefield::HexahedralFEMForceField< DataTypes >, sofa::component::forcefield::HexahedronFEMForceField< DataTypes >, sofa::component::forcefield::MeshSpringForceField< DataTypes >, sofa::component::forcefield::RegularGridSpringForceField< DataTypes >, sofa::component::forcefield::SparseGridSpringForceField< DataTypes >, sofa::component::forcefield::SpringForceField< DataTypes >, sofa::component::forcefield::TetrahedralCorotationalFEMForceField< DataTypes >, sofa::component::forcefield::TetrahedronFEMForceField< DataTypes >, sofa::component::mapping::ImplicitSurfaceMapping< In, Out >, sofa::component::mapping::RigidMapping< BasicMapping >, sofa::component::mapping::RigidRigidMapping< BasicMapping >, sofa::component::mapping::SkinningMapping< BasicMapping >, sofa::component::mass::DiagonalMass< DataTypes, MassType >, sofa::component::mass::UniformMass< DataTypes, MassType >, sofa::component::MechanicalObject< DataTypes >, sofa::component::MeshLoader, sofa::component::topology::CubeTopology, sofa::component::topology::GridTopology, sofa::component::topology::RegularGridTopology, sofa::component::visualmodel::OglTexture2D, sofa::component::visualmodel::VisualModelImpl, SofaFlowVR::FlowVRRenderMesh, sofa::component::visualmodel::OgreVisualModel, sofa::component::forcefield::MeshSpringForceField< sofa::defaulttype::StdVectorTypes >, sofa::component::MechanicalObject< sofa::defaulttype::StdVectorTypes >, sofa::component::MechanicalObject< Rigid3Types >, sofa::component::MechanicalObject< TDataTypes >, sofa::component::mass::UniformMass< DataTypes, MassType >, sofa::component::mass::UniformMass< DataTypes, MassType >, sofa::component::mass::UniformMass< DataTypes, MassType >, and sofa::component::mass::UniformMass< DataTypes, MassType >.
Definition at line 387 of file Base.cpp.
References sofa::core::objectmodel::BaseObjectDescription::getAttribute(), and m_fieldVec.
Referenced by sofa::simulation::tree::GNode::create(), sofa::component::MechanicalObject< DataTypes >::parse(), sofa::component::mass::UniformMass< DataTypes, MassType >::parse(), sofa::component::mass::DiagonalMass< DataTypes, MassType >::parse(), sofa::component::mapping::ImplicitSurfaceMapping< In, Out >::parse(), sofa::component::forcefield::SpringForceField< DataTypes >::parse(), and sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::parse().
| void sofa::core::objectmodel::Base::parseFields | ( | const std::map< std::string, std::string * > & | str | ) | [virtual] |
Assign the field values stored in the given map of name -> value pairs.
Definition at line 365 of file Base.cpp.
References findField(), and m_fieldVec.
| void sofa::core::objectmodel::Base::parseFields | ( | std::list< std::string > | str | ) |
Assign the field values stored in the given list of name + value pairs of strings.
Definition at line 345 of file Base.cpp.
References findField(), m_fieldVec, and name.
| void sofa::core::objectmodel::Base::setName | ( | const std::string & | n | ) |
Set the name of this object.
Definition at line 73 of file Base.cpp.
References name, and sofa::core::objectmodel::Data< T >::setValue().
Referenced by sofa::gui::qt::GraphModeler::addGNode(), sofa::component::visualmodel::OgreVisualModel::attach(), sofa::filemanager::pml::LMLReader::BuildStructure(), sofa::component::collision::BasePickingManager::Create(), sofa::component::collision::BasePickingManager::CreateAll(), sofa::component::collision::DefaultContactManager::createContacts(), sofa::simulation::tree::xml::ObjectElement::initNode(), sofa::filemanager::pml::LMLConstraint< DataTypes >::LMLConstraint(), sofa::filemanager::pml::LMLForce< DataTypes >::LMLForce(), main(), sofa::gui::qt::viewer::SofaViewer::mouseEvent(), sofa::gui::glut::SimpleGUI::mouseEvent(), sofa::simulation::Node::Node(), sofa::component::collision::BarycentricPenalityContact< TCollisionModel1, TCollisionModel2, ResponseDataTypes >::setDetectionOutputs(), and sofa::filemanager::pml::LMLReader::updateStructure().
| static std::string sofa::core::objectmodel::Base::templateName | ( | const T * | = NULL |
) | [inline, static] |
Helper method to get the template name of a type derived from this class.
This method should be used as follow :
T* ptr = NULL; std::string type = T::templateName(ptr);
Definition at line 139 of file Base.h.
References decodeTemplateName().
| static std::string sofa::core::objectmodel::Base::typeName | ( | const T * | = NULL |
) | [inline, static] |
Helper method to get the type name of a type derived from this class.
This method should be used as follow :
T* ptr = NULL; std::string type = T::typeName(ptr);
Definition at line 106 of file Base.h.
References decodeTypeName().
| void sofa::core::objectmodel::Base::writeDatas | ( | std::ostream & | out | ) |
Write the current field values to the given text output stream.
Definition at line 417 of file Base.cpp.
References sofa::core::objectmodel::BaseData::getValueString(), sofa::core::objectmodel::BaseData::isSet(), and m_fieldVec.
| void sofa::core::objectmodel::Base::writeDatas | ( | std::map< std::string, std::string * > & | str | ) |
Write the current field values to the given map of name -> value pairs.
Definition at line 402 of file Base.cpp.
References sofa::core::objectmodel::BaseData::getValueString(), and m_fieldVec.
| void sofa::core::objectmodel::Base::xmlWriteDatas | ( | std::ostream & | out, | |
| unsigned | level | |||
| ) |
Write the current field values to the given XML output stream.
Definition at line 440 of file Base.cpp.
References sofa::core::objectmodel::BaseData::getValueString(), sofa::core::objectmodel::BaseData::isSet(), and m_fieldVec.
| void sofa::core::objectmodel::Base::xmlWriteNodeDatas | ( | std::ostream & | out, | |
| unsigned | level | |||
| ) |
Write the current Node values to the given XML output stream.
Definition at line 428 of file Base.cpp.
References sofa::core::objectmodel::BaseData::getValueString(), sofa::core::objectmodel::BaseData::isSet(), and m_fieldVec.
Referenced by sofa::simulation::XMLPrintVisitor::processNodeTopDown().
std::vector< std::pair<std::string, BaseData*> > sofa::core::objectmodel::Base::m_fieldVec [protected] |
name -> Field object
Definition at line 236 of file Base.h.
Referenced by addField(), findField(), getFields(), initData(), initDataPtr(), parse(), parseFields(), writeDatas(), xmlWriteDatas(), and xmlWriteNodeDatas().
| Data<std::string> sofa::core::objectmodel::Base::name |
Name of the object.
Definition at line 62 of file Base.h.
Referenced by sofa::component::collision::BruteForceDetection::addCollisionPair(), sofa::component::collision::DefaultPickingManager< TDataTypes, ContactForceField >::attach(), Base(), decodeClassName(), decodeNamespaceName(), decodeTemplateName(), decodeTypeName(), sofa::component::collision::DefaultPickingManager< TDataTypes, ContactForceField >::getMState(), getName(), sofa::simulation::tree::GNode::getObject(), SofaFlowVR::FlowVRRenderMesh::parse(), parseFields(), and setName().
1.5.7.1