Go to the documentation of this file.
45 this->document = document;
46 node = document->allocate_node(
node_type);
51 const std::string& name)
53 this->document = document;
54 node = document->allocate_node(
node_type, cloneString(name));
62 document->allocate_attribute(cloneString(name), cloneString(
value)));
68 const std::string& trueValue,
69 const std::string& falseValue,
78 const std::string& trueValue,
79 const std::string& falseValue,
83 if (
value != defaultValue)
116 cloneString(
const std::string&
str)
118 return document->allocate_string(
str.c_str());
133 document.append_node(declaration.node);
140 document.append_node(rootNode.node);
157 file.open(path.c_str());
158 file <<
print(indent);
RapidXmlWriterNode & append_data_node(const std::string &value)
OutIt print(OutIt out, const xml_node< Ch > &node, int flags=0)
Prints XML to given output iterator.
@ node_data
A data node. Name is empty. Value contains data text.
@ node_element
An element node. Name contains element name. Value contains text of first data node.
@ node_declaration
A declaration node. Name and value are empty. Declaration parameters (version, encoding and standalon...
RapidXmlWriterNode & append_bool_attribute(const std::string &name, const std::string &trueValue, const std::string &falseValue, bool value)
RapidXmlWriterNode & append_optional_bool_attribute(const std::string &name, const std::string &trueValue, const std::string &falseValue, bool value, bool defaultValue)
std::string print(bool indent)
std::shared_ptr< Value > value()
const int print_no_indenting
Printer flag instructing the printer to suppress indenting of XML. See print() function.
RapidXmlWriterNode & append_attribute(const std::string &name, const std::string &value)
This class represents root of the DOM hierarchy.
Class representing a node of XML document.
node_type
Enumeration listing all node types produced by the parser.
void append_node(xml_node< Ch > *child)
Appends a new child node.
void saveToFile(const std::string &path, bool indent)
RapidXmlWriterNode createRootNode(const std::string &name)
RapidXmlWriterNode & append_string_node(const std::string &name, const std::string &value)
RapidXmlWriterNode append_node(const std::string &name)
void append_attribute(xml_attribute< Ch > *attribute)
Appends a new attribute to the node.
double s(double t, double s0, double v0, double a0, double j)
This file offers overloads of toIce() and fromIce() functions for STL container types.