Skip to content

raisim::RaiSimTinyXmlWriter ​

class · #include <raisim/RaiSimTinyXmlWriter.hpp>

Minimal XML document writer: add top-level elements with operator[] and write the file with saveFile(). See RaiSimTinyXmlWriterElement for the reference-lifetime caveat.

Constructors & destructor ​

RaiSimTinyXmlWriter ​

cpp
RaiSimTinyXmlWriter()

Creates a document with an XML 1.0 declaration.

Public member functions ​

operator[] ​

cpp
RaiSimTinyXmlWriterElement &operator[](const std::string &element)

Append a new top-level element. The returned reference may be invalidated when another top-level element is added.

Parameters

ParameterDescription
element (in)element name

Returns the new element

saveFile ​

cpp
void saveFile(const std::string &fileName)

Assemble the document and write it. Prints a warning if the file cannot be written (e.g. the directory does not exist). Call it once per writer.

Parameters

ParameterDescription
fileName (in)output file path

RaiSim — physics for robotics and AI.