SOFA API  384d495c
Open source framework for multi-physics simuation
sofa::simpleapi Namespace Reference

Functions

bool importPlugin (const std::string &name)
 
void dumpScene (Node::SPtr root)
 
Simulation::SPtr createSimulation (const std::string &type)
 
Node::SPtr createRootNode (Simulation::SPtr s, const std::string &name, const std::map< std::string, std::string > &params)
 
NodeSPtr createRootNode (Simulation *s, const std::string &name, const std::map< std::string, std::string > &params)
 
BaseObject::SPtr createObject (Node::SPtr parent, BaseObjectDescription &desc)
 
BaseObject::SPtr createObject (Node::SPtr parent, const std::string &type, const std::map< std::string, std::string > &params)
 
Node::SPtr createChild (Node::SPtr node, const std::string &name, const std::map< std::string, std::string > &params)
 
Node::SPtr createChild (Node::SPtr node, BaseObjectDescription &desc)
 
Node::SPtr createNode (const std::string &name)
 create a child to the provided node. The parameter "params" is for passing specific data argument to the created object (including the node name). More...
 
sofa::core::sptr< BaseObject > SOFA_SIMULATION_GRAPH_API createObject (NodeSPtr node, BaseObjectDescription &params)
 Create a sofa object in the provided node. The parameter "params" is for passing specific data argument to the created object including the object's type. More...
 
sofa::core::sptr< BaseObject > SOFA_SIMULATION_GRAPH_API createObject (NodeSPtr node, const std::string &type, const std::map< std::string, std::string > &params=std::map< std::string, std::string >{})
 create a sofa object in the provided node of the given type. The parameter "params" is for passing specific data argument to the created object. More...
 
NodeSPtr SOFA_SIMULATION_GRAPH_API createChild (NodeSPtr node, const std::string &name, const std::map< std::string, std::string > &params=std::map< std::string, std::string >{})
 create a child to the provided nodeof given name. The parameter "params" is for passing specific data argument to the created object. More...
 
NodeSPtr SOFA_SIMULATION_GRAPH_API createChild (NodeSPtr node, BaseObjectDescription &desc)
 create a child to the provided node. The parameter "params" is for passing specific data argument to the created object (including the node name). More...
 
void SOFA_SIMULATION_GRAPH_API dumpScene (NodeSPtr root)
 
template<class T >
std::string str (const T &t)
 

Function Documentation

◆ createChild() [1/4]

Node::SPtr sofa::simpleapi::createChild ( Node::SPtr  node,
BaseObjectDescription desc 
)

◆ createChild() [2/4]

Node::SPtr sofa::simpleapi::createChild ( Node::SPtr  node,
const std::string &  name,
const std::map< std::string, std::string > &  params 
)

◆ createChild() [3/4]

NodeSPtr SOFA_SIMULATION_GRAPH_API sofa::simpleapi::createChild ( NodeSPtr  node,
BaseObjectDescription desc 
)

create a child to the provided node. The parameter "params" is for passing specific data argument to the created object (including the node name).

◆ createChild() [4/4]

NodeSPtr SOFA_SIMULATION_GRAPH_API sofa::simpleapi::createChild ( NodeSPtr  node,
const std::string &  name,
const std::map< std::string, std::string > &  params = std::map< std::string, std::string >{} 
)

create a child to the provided nodeof given name. The parameter "params" is for passing specific data argument to the created object.

◆ createNode()

NodeSPtr SOFA_SIMULATION_GRAPH_API sofa::simpleapi::createNode ( const std::string &  name)

create a child to the provided node. The parameter "params" is for passing specific data argument to the created object (including the node name).

◆ createObject() [1/4]

BaseObject::SPtr sofa::simpleapi::createObject ( Node::SPtr  parent,
BaseObjectDescription desc 
)

◆ createObject() [2/4]

BaseObject::SPtr sofa::simpleapi::createObject ( Node::SPtr  parent,
const std::string &  type,
const std::map< std::string, std::string > &  params 
)

◆ createObject() [3/4]

sofa::core::sptr<BaseObject> SOFA_SIMULATION_GRAPH_API sofa::simpleapi::createObject ( NodeSPtr  node,
BaseObjectDescription params 
)

Create a sofa object in the provided node. The parameter "params" is for passing specific data argument to the created object including the object's type.

◆ createObject() [4/4]

sofa::core::sptr<BaseObject> SOFA_SIMULATION_GRAPH_API sofa::simpleapi::createObject ( NodeSPtr  node,
const std::string &  type,
const std::map< std::string, std::string > &  params = std::map< std::string, std::string >{} 
)

create a sofa object in the provided node of the given type. The parameter "params" is for passing specific data argument to the created object.

◆ createRootNode() [1/2]

NodeSPtr SOFA_SIMULATION_GRAPH_API sofa::simpleapi::createRootNode ( Simulation s,
const std::string &  name,
const std::map< std::string, std::string > &  params 
)

◆ createRootNode() [2/2]

NodeSPtr SOFA_SIMULATION_GRAPH_API sofa::simpleapi::createRootNode ( Simulation::SPtr  s,
const std::string &  name,
const std::map< std::string, std::string > &  params 
)

◆ createSimulation()

Simulation::SPtr SOFA_SIMULATION_GRAPH_API sofa::simpleapi::createSimulation ( const std::string &  type)

◆ dumpScene() [1/2]

void sofa::simpleapi::dumpScene ( Node::SPtr  root)

◆ dumpScene() [2/2]

void SOFA_SIMULATION_GRAPH_API sofa::simpleapi::dumpScene ( NodeSPtr  root)

◆ importPlugin()

bool SOFA_SIMULATION_GRAPH_API sofa::simpleapi::importPlugin ( const std::string &  name)

◆ str()

template<class T >
std::string sofa::simpleapi::str ( const T t)