SOFA API  c76874b7
Open source framework for multi-physics simuation
sofa::simulation::xml Namespace Reference

Classes

class  AttributeElement
 
class  BaseElement
 
class  BaseMultiMappingElement
 
class  DataElement
 
class  Element
 
class  ElementNameHelper
 
class  NodeElement
 
class  ObjectElement
 

Enumerations

enum  IncludeNodeType { INCLUDE_NODE_CHILD, INCLUDE_NODE_GROUP, INCLUDE_NODE_MERGE }
 Flags indicating when an element is from an included file that should be treated specifically. More...
 

Functions

Creator< BaseElement::NodeFactory, AttributeElementAttributeNodeClass ("Attribute")
 
Creator< BaseElement::NodeFactory, DataElementDataNodeClass ("Data")
 
Creator< BaseElement::NodeFactory, ObjectElementObjectNodeClass ("Object")
 
void recReplaceAttribute (BaseElement *node, const char *attr, const char *value, const char *nodename=nullptr)
 
BaseElementincludeNode (TiXmlNode *root, const char *basefilename, ElementNameHelper &resolveElementName)
 
BaseElementattributeNode (TiXmlNode *root, const char *basefilename)
 
void recursiveMergeNode (BaseElement *destNode, BaseElement *srcNode)
 
BaseElementcreateNode (TiXmlNode *root, const char *basefilename, ElementNameHelper &elementNameHelper, bool isRoot=false)
 
BaseElementprocessXMLLoading (const char *filename, const TiXmlDocument &doc, bool fromMem)
 
BaseElementloadFromMemory (const char *filename, const char *data, unsigned int)
 
BaseElementloadFromFile (const char *filename)
 
SOFA_SIMULATION_COMMON_API bool save (const char *filename, BaseElement *root)
 

Variables

helper::Creator< BaseElement::NodeFactory, NodeElementNodeNodeClass ("Node")
 
int numDefault =0
 

Enumeration Type Documentation

Flags indicating when an element is from an included file that should be treated specifically.

Enumerator
INCLUDE_NODE_CHILD 

indicating a standard node that should be used as child

INCLUDE_NODE_GROUP 

indicating a node that should be removed, and its content added within the parent node

INCLUDE_NODE_MERGE 

indicating a node that should be merged with its parent, and any child node with the same name as an existing child should be recursively merged

Function Documentation

BaseElement* sofa::simulation::xml::attributeNode ( TiXmlNode *  root,
const char *  basefilename 
)
Creator<BaseElement::NodeFactory, AttributeElement> sofa::simulation::xml::AttributeNodeClass ( "Attribute"  )
BaseElement* sofa::simulation::xml::createNode ( TiXmlNode *  root,
const char *  basefilename,
ElementNameHelper elementNameHelper,
bool  isRoot = false 
)
Creator<BaseElement::NodeFactory, DataElement> sofa::simulation::xml::DataNodeClass ( "Data"  )
BaseElement * sofa::simulation::xml::includeNode ( TiXmlNode *  root,
const char *  basefilename,
ElementNameHelper resolveElementName 
)
SOFA_SIMULATION_COMMON_API BaseElement * sofa::simulation::xml::loadFromFile ( const char *  filename)
SOFA_SIMULATION_COMMON_API BaseElement * sofa::simulation::xml::loadFromMemory ( const char *  filename,
const char *  data,
unsigned  int 
)
Creator<BaseElement::NodeFactory, ObjectElement> sofa::simulation::xml::ObjectNodeClass ( "Object"  )
SOFA_SIMULATION_COMMON_API BaseElement * sofa::simulation::xml::processXMLLoading ( const char *  filename,
const TiXmlDocument &  doc,
bool  fromMem 
)
void sofa::simulation::xml::recReplaceAttribute ( BaseElement node,
const char *  attr,
const char *  value,
const char *  nodename = nullptr 
)
void sofa::simulation::xml::recursiveMergeNode ( BaseElement destNode,
BaseElement srcNode 
)
SOFA_SIMULATION_COMMON_API bool sofa::simulation::xml::save ( const char *  filename,
BaseElement root 
)

Variable Documentation

helper::Creator<BaseElement::NodeFactory, NodeElement> sofa::simulation::xml::NodeNodeClass("Node")
int SOFA_SIMULATION_COMMON_API sofa::simulation::xml::numDefault =0