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

Classes

struct  CleanupCheck
 

Functions

SOFA_SIMPLEAPI_API void init ()
 Initialize the Sofa.SimpleApi library, as well as its dependencies. More...
 
SOFA_SIMPLEAPI_API bool isInitialized ()
 Return true if and only if the Sofa.SimpleApi library has been initialized. More...
 
SOFA_SIMPLEAPI_API void cleanup ()
 Clean up the resources used by the SofaSimulationGraph library, as well as its dependencies. More...
 
SOFA_SIMPLEAPI_API bool isCleanedUp ()
 Return true if and only if the Sofa.SimpleApi library has been cleaned up. More...
 
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_SIMPLEAPI_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_SIMPLEAPI_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_SIMPLEAPI_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_SIMPLEAPI_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_SIMPLEAPI_API dumpScene (NodeSPtr root)
 
template<class T >
std::string str (const T &t)
 

Function Documentation

◆ cleanup()

SOFA_SIMPLEAPI_API void sofa::simpleapi::cleanup ( )

Clean up the resources used by the SofaSimulationGraph library, as well as its dependencies.

◆ 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_SIMPLEAPI_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_SIMPLEAPI_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_SIMPLEAPI_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_SIMPLEAPI_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_SIMPLEAPI_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_SIMPLEAPI_API sofa::simpleapi::createRootNode ( Simulation s,
const std::string &  name,
const std::map< std::string, std::string > &  params 
)

◆ createRootNode() [2/2]

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

◆ createSimulation()

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

◆ dumpScene() [1/2]

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

◆ dumpScene() [2/2]

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

◆ importPlugin()

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

◆ init()

SOFA_SIMPLEAPI_API void sofa::simpleapi::init ( )

Initialize the Sofa.SimpleApi library, as well as its dependencies.

◆ isCleanedUp()

SOFA_SIMPLEAPI_API bool sofa::simpleapi::isCleanedUp ( )

Return true if and only if the Sofa.SimpleApi library has been cleaned up.

◆ isInitialized()

SOFA_SIMPLEAPI_API bool sofa::simpleapi::isInitialized ( )

Return true if and only if the Sofa.SimpleApi library has been initialized.

◆ str()

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