Go to the documentation of this file.
46 for(
int i = 0; i < n; ++i)
49 for(
int i = 0; i < n - 2; ++i)
59 Map* map =
static_cast<Map*
>(n.get());
76 out <<
"\"" << v <<
"\"";
93 if (m->type() ==
ARRAY)
101 if (it != children.
begin())
124 Map* map =
static_cast<Map*
>(n.get());
129 if (array_item_start)
130 array_item_start =
false;
140 if (array_item_start)
141 array_item_start =
false;
149 if (m->type() ==
ARRAY)
176 if (write_type ==
XML)
180 else if (write_type ==
YAML)
184 writer.
writeYAML(data.data->nodes[data.idx],
"",
false);
194 writer.
writeJSON(data.data->nodes[data.idx],
"");
202 return toFile(filename.
c_str(), data, write_type, indent_size);
214 toStream(out, data, write_type, indent_size);
const std::string & getName(const Label &label) const
std::string yaml_array_tab
bool toFile(const std::string &filename, const DataConstPointer &data, WriteType write_type, int indent_size=0)
WriterImpl(std::ostream &out_, const tue::config::Data &cfg_)
void toStream(std::ostream &s, const DataConstPointer &data, WriteType write_type, int indent_size=0)
void setIndentSize(int n)
std::vector< NodeIdx > children_
const tue::config::Data & cfg
std::map< Label, NodeIdx > map_
std::vector< NodePtr > nodes
void writeJSON(const NodePtr &n, const std::string &indent)
void writeYAML(const NodePtr &n, const std::string &indent, bool array_item_start)
boost::shared_ptr< Node > NodePtr
std::map< Label, Variant > values
tue::config::ReaderWriter config