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 )
override;
62 void openTag(std::ostream& into,
const std::string& xmlElement)
override;
79 bool closeTag(std::ostream& into,
const std::string& comment =
"")
override;
92 void writeAttr(std::ostream& into,
const SumoXMLAttr attr,
const T& val,
const bool isNull,
const bool escape) {
109 void writeAttr(std::ostream& into,
const std::string& attr,
const T& val,
const bool isNull,
const bool escape) {
117 void writeAttr(std::ostream& ,
const SumoXMLAttr attr,
const std::string& val,
const bool isNull,
const bool escape) {
121 void writeAttr(std::ostream& ,
const std::string& attr,
const std::string& val,
const bool isNull,
const bool escape) {
177 throw ProcessError(
TLF(
"Unexpected attribute '%', this file format does not support CSV output yet.",
toString(attr)));
183 template <
class ATTR_TYPE>
187 std::string headerName =
toString(attr);
190 prefix += entry.first +
"_";
192 const std::string fullHeaderName = prefix + headerName;
194 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)