40 CSVFormatter(
const std::string& columnNames,
const char separator =
';');
54 bool writeXMLHeader(std::ostream& into,
const std::string& rootElement,
55 const std::map<SumoXMLAttr, std::string>& attrs,
bool ,
63 void openTag(std::ostream& into,
const std::string& xmlElement)
override;
80 bool closeTag(std::ostream& into,
const std::string& comment =
"")
override;
93 void writeAttr(std::ostream& into,
const SumoXMLAttr attr,
const T& val,
const bool isNull,
const bool escape) {
110 void writeAttr(std::ostream& into,
const std::string& attr,
const T& val,
const bool isNull,
const bool escape) {
118 void writeAttr(std::ostream& ,
const SumoXMLAttr attr,
const std::string& val,
const bool isNull,
const bool escape) {
122 void writeAttr(std::ostream& ,
const std::string& attr,
const std::string& val,
const bool isNull,
const bool escape) {
178 throw ProcessError(
TLF(
"Unexpected attribute '%', this file format does not support CSV output yet.",
toString(attr)));
184 template <
class ATTR_TYPE>
188 std::string headerName =
toString(attr);
191 prefix += entry.first +
"_";
193 const std::string fullHeaderName = prefix + headerName;
195 headerName =
myXMLStack.back().first +
"_" + headerName;
std::string time2string(SUMOTime t, bool humanReadable)
convert SUMOTime to string (independently of global format setting)
SumoXMLTag
Numbers representing SUMO-XML - element names.
std::bitset< 96 > SumoXMLAttrMask
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
static std::string escapeCSV(const std::string &orig, const char separator, const char quote='"')
Adds quotes to strings containing the separator or the quote char and escapes the quote char with a b...
#define UNUSED_PARAMETER(x)