25#include <fmt/ostream.h>
60 bool writeXMLHeader(std::ostream& into,
const std::string& rootElement,
61 const std::map<SumoXMLAttr, std::string>& attrs,
bool writeMetadata,
74 void openTag(std::ostream& into,
const std::string& xmlElement);
91 bool closeTag(std::ostream& into,
const std::string& comment =
"");
102 void writePadding(std::ostream& into,
const std::string& val);
111 static void writeAttr(std::ostream& into,
const std::string& attr,
const T& val) {
112 into <<
" " << attr <<
"=\"" <<
toString(val, into.precision()) <<
"\"";
123 into <<
" " <<
toString(attr) <<
"=\"" <<
toString(val, into.precision()) <<
"\"";
152 fmt::print(into,
" {}=\"{:.{}f}\"",
toString(attr), val, into.precision());
154 into <<
" " <<
toString(attr) <<
"=\"" <<
toString(val, into.precision()) <<
"\"";
161 into <<
" " <<
toString(attr) <<
"=\"" << val <<
"\"";
std::string time2string(SUMOTime t, bool humanReadable)
convert SUMOTime to string (independently of global format setting)
SumoXMLTag
Numbers representing SUMO-XML - element names.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)