22 #ifndef BinaryFormatter_h 23 #define BinaryFormatter_h 128 bool writeXMLHeader(std::ostream& into,
const std::string& rootElement,
129 const std::map<SumoXMLAttr, std::string>& attrs);
140 template <
typename E>
154 void openTag(std::ostream& into,
const std::string& xmlElement);
182 template <
typename dummy,
typename T>
192 template <
typename dummy,
typename T>
193 static void writeAttr(dummy& into,
const std::string& attr,
const T& val);
209 template <
typename dummy>
210 static void writeAttr(dummy& into,
const SumoXMLAttr attr,
const std::vector<const ROEdge*>& val);
211 template <
typename dummy>
212 static void writeAttr(dummy& into,
const SumoXMLAttr attr,
const std::vector<const MSEdge*>& val);
224 const int attrNum = (int)attr;
247 static void writeStringList(std::ostream& into,
const std::vector<std::string>& list);
266 template <
typename E>
270 const int numEdges = (
const int)E::getAllEdges().size();
273 for (
int i = 0; i < numEdges; i++) {
279 for (
int i = 0; i < numEdges; i++) {
280 E* e = E::getAllEdges()[i];
283 for (
int j = 0; j < e->getNumSuccessors(); j++) {
295 template <
typename dummy,
typename T>
302 template <
typename dummy,
typename T>
322 template <
typename dummy>
329 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.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
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.
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.