22 #ifndef BinaryFormatter_h 23 #define BinaryFormatter_h 128 bool writeXMLHeader(std::ostream& into,
const std::string& rootElement,
129 const std::string& attrs =
"",
130 const std::string& comment =
"");
141 template <
typename E>
155 void openTag(std::ostream& into,
const std::string& xmlElement);
183 template <
typename dummy,
typename T>
193 template <
typename dummy,
typename T>
194 static void writeAttr(dummy& into,
const std::string& attr,
const T& val);
210 template <
typename dummy>
211 static void writeAttr(dummy& into,
const SumoXMLAttr attr,
const std::vector<const ROEdge*>& val);
212 template <
typename dummy>
213 static void writeAttr(dummy& into,
const SumoXMLAttr attr,
const std::vector<const MSEdge*>& val);
244 static void writeStringList(std::ostream& into,
const std::vector<std::string>& list);
263 template <
typename E>
267 const unsigned int numEdges = (
const unsigned int)E::getAllEdges().size();
270 for (
unsigned int i = 0; i < numEdges; i++) {
276 for (
unsigned int i = 0; i < numEdges; i++) {
277 E* e = E::getAllEdges()[i];
280 for (
unsigned int j = 0; j < e->getNumSuccessors(); j++) {
292 template <
typename dummy,
typename T>
299 template <
typename dummy,
typename T>
320 template <
typename dummy>
327 template <
typename dummy>
SumoXMLTag
Numbers representing SUMO-XML - element names.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
A class that stores a 2D geometrical boundary.
A road/street connecting two junctions.
A point in 2D or 3D with translation and scaling methods.
static std::ostream & writeInt(std::ostream &strm, int value)
Writes an integer binary.
static std::ostream & writeByte(std::ostream &strm, unsigned char value)
Writes a byte binary.
std::string toString(const T &t, std::streamsize accuracy=OUTPUT_ACCURACY)
A basic edge for routing applications.
SumoXMLNodeType
Numbers representing special SUMO-XML-attribute values for representing node- (junction-) types used ...
static StringBijection< int > Attrs
The names of SUMO-XML attributes for use in netbuild.
SumoXMLEdgeFunc
Numbers representing special SUMO-XML-attribute values for representing edge functions used in netbui...
static std::ostream & writeEdgeVector(std::ostream &os, const std::vector< E > &edges)
Writes an edge vector binary.
static std::ostream & writeString(std::ostream &strm, const std::string &value)
Writes a string binary.