 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
18 #ifndef BinaryFormatter_h
19 #define BinaryFormatter_h
120 bool writeXMLHeader(std::ostream& into,
const std::string& rootElement,
121 const std::map<SumoXMLAttr, std::string>& attrs);
132 template <
typename E>
146 void openTag(std::ostream& into,
const std::string& xmlElement);
165 bool closeTag(std::ostream& into,
const std::string& comment =
"");
174 template <
typename dummy,
typename T>
184 template <
typename dummy,
typename T>
185 static void writeAttr(dummy& into,
const std::string& attr,
const T& val);
203 template <
typename dummy>
204 static void writeAttr(dummy& into,
const SumoXMLAttr attr,
const std::vector<const ROEdge*>& val);
205 template <
typename dummy>
206 static void writeAttr(dummy& into,
const SumoXMLAttr attr,
const std::vector<const MSEdge*>& val);
218 const int attrNum = (int)attr;
241 static void writeStringList(std::ostream& into,
const std::vector<std::string>& list);
260 template <
typename E>
264 const int numEdges = (
const int)E::getAllEdges().size();
267 for (
int i = 0; i < numEdges; i++) {
273 for (
int i = 0; i < numEdges; i++) {
274 E* e = E::getAllEdges()[i];
277 for (
int j = 0; j < e->getNumSuccessors(); j++) {
289 template <
typename dummy,
typename T>
296 template <
typename dummy,
typename T>
316 template <
typename dummy>
323 template <
typename dummy>
static std::ostream & writeEdgeVector(std::ostream &os, const std::vector< E > &edges)
Writes an edge vector binary.
static std::ostream & writeInt(std::ostream &strm, int value)
Writes an integer binary.
SumoXMLEdgeFunc
Numbers representing special SUMO-XML-attribute values for representing edge functions used in netbui...
static std::ostream & writeByte(std::ostream &strm, unsigned char value)
Writes a byte binary.
SumoXMLTag
Numbers representing SUMO-XML - element names.
static std::ostream & writeString(std::ostream &strm, const std::string &value)
Writes a string binary.
SumoXMLNodeType
Numbers representing special SUMO-XML-attribute values for representing node- (junction-) types used ...
A class that stores a 2D geometrical boundary.
A point in 2D or 3D with translation and scaling methods.
A road/street connecting two junctions.
static StringBijection< int > Attrs
The names of SUMO-XML attributes for use in netbuild.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
A basic edge for routing applications.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.