20 #ifndef BinaryFormatter_h
21 #define BinaryFormatter_h
130 bool writeXMLHeader(std::ostream& into,
const std::string& rootElement,
131 const std::string& attrs =
"",
132 const std::string& comment =
"");
143 template <
typename E>
157 void openTag(std::ostream& into,
const std::string& xmlElement);
185 template <
typename dummy,
typename T>
195 template <
typename dummy,
typename T>
196 static void writeAttr(dummy& into,
const std::string& attr,
const T& val);
201 template <
typename dummy>
202 static void writeAttr(dummy& into,
const SumoXMLAttr attr,
const std::vector<const ROEdge*>& val);
203 template <
typename dummy>
204 static void writeAttr(dummy& into,
const SumoXMLAttr attr,
const std::vector<const MSEdge*>& val);
226 static void writeStringList(std::ostream& into,
const std::vector<std::string>& list);
245 template <
typename E>
257 const unsigned int numEdges = (
const unsigned int)E::dictSize();
260 for (
unsigned int i = 0; i < numEdges; i++) {
266 for (
unsigned int i = 0; i < numEdges; i++) {
267 E* e = E::dictionary(i);
270 for (
unsigned int j = 0; j < e->getNoFollowing(); j++) {
282 template <
typename dummy,
typename T>
289 template <
typename dummy,
typename T>
311 template <
typename dummy>
318 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.