25#include <fmt/ostream.h>
60 bool writeXMLHeader(std::ostream& into,
const std::string& rootElement,
61 const std::map<SumoXMLAttr, std::string>& attrs,
62 bool includeConfig =
true);
86 void openTag(std::ostream& into,
const std::string& xmlElement);
105 bool closeTag(std::ostream& into,
const std::string& comment =
"");
117 void writePadding(std::ostream& into,
const std::string& val);
127 static void writeAttr(std::ostream& into,
const std::string& attr,
const T& val) {
128 into <<
" " << attr <<
"=\"" <<
toString(val, into.precision()) <<
"\"";
140 into <<
" " <<
toString(attr) <<
"=\"" <<
toString(val, into.precision()) <<
"\"";
165 fmt::print(into,
" {}=\"{:.{}f}\"",
toString(attr), val, into.precision());
167 into <<
" " <<
toString(attr) <<
"=\"" << val <<
"\"";
174 into <<
" " <<
toString(attr) <<
"=\"" << val <<
"\"";
SumoXMLTag
Numbers representing SUMO-XML - element names.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)