22 #ifndef BinaryFormatter_h
23 #define BinaryFormatter_h
132 bool writeXMLHeader(std::ostream& into,
const std::string& rootElement,
133 const std::string& attrs =
"",
134 const std::string& comment =
"");
145 template <
typename E>
159 void openTag(std::ostream& into,
const std::string& xmlElement);
187 template <
typename dummy,
typename T>
197 template <
typename dummy,
typename T>
198 static void writeAttr(dummy& into,
const std::string& attr,
const T& val);
214 template <
typename dummy>
215 static void writeAttr(dummy& into,
const SumoXMLAttr attr,
const std::vector<const ROEdge*>& val);
216 template <
typename dummy>
217 static void writeAttr(dummy& into,
const SumoXMLAttr attr,
const std::vector<const MSEdge*>& val);
239 static void writeStringList(std::ostream& into,
const std::vector<std::string>& list);
258 template <
typename E>
270 const unsigned int numEdges = (
const unsigned int)E::dictSize();
273 for (
unsigned int i = 0; i < numEdges; i++) {
279 for (
unsigned int i = 0; i < numEdges; i++) {
280 E* e = E::dictionary(i);
283 for (
unsigned int j = 0; j < e->getNoFollowing(); j++) {
295 template <
typename dummy,
typename T>
302 template <
typename dummy,
typename T>
323 template <
typename dummy>
330 template <
typename dummy>
SumoXMLTag
Numbers representing SUMO-XML - element names.
static StringBijection< SumoXMLNodeType > NodeTypes
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 StringBijection< int > Tags
The names of SUMO-XML elements for use in netbuild.
static StringBijection< SumoXMLEdgeFunc > EdgeFunctions
static std::ostream & writeString(std::ostream &strm, const std::string &value)
Writes a string binary.