43 #ifdef CHECK_MEMORY_LEAKS
45 #endif // CHECK_MEMORY_LEAKS
52 const std::map<int, std::string>& predefinedTagsMML,
53 const std::string& objectType,
58 int type = in->
peek();
77 const int type = in->
peek();
81 throw ProcessError(
"Invalid binary file, only supporting position vectors.");
91 *in >> myIntValues[attr];
94 *in >> myIntValues[attr];
96 *in >> myCharValues[attr];
117 *in >> myIntValues[attr];
120 *in >> myCharValues[attr];
123 *in >> myCharValues[attr];
126 std::ostringstream into(std::ios::binary);
132 int intsToRead = size - 1;
137 if (bitsOrEntry < 0) {
138 intsToRead = (-bitsOrEntry * (size - 1) - 1) /
sizeof(
int) / 8 + 2;
140 while (intsToRead > 0) {
147 myStringValues[attr] = into.str();
170 const std::map<int, char>::const_iterator i =
myCharValues.find(
id);
174 return i->second != 0;
180 const std::map<int, int>::const_iterator i =
myIntValues.find(
id);
196 const std::map<int, std::string>::const_iterator i =
myStringValues.find(
id);
206 const std::string& str)
const {
207 const std::map<int, std::string>::const_iterator i =
myStringValues.find(
id);
217 const std::map<int, SUMOReal>::const_iterator i =
myFloatValues.find(
id);
239 const std::string& )
const {
248 const char func = i->second;
262 const char type = i->second;
278 const int val = i->second;
279 return RGBColor(val & 0xff, (val >> 8) & 0xff, (val >> 16) & 0xff, (val >> 24) & 0xff);
285 const std::map<int, PositionVector>::const_iterator i =
myPositionVectors.find(attr);
295 const std::map<int, PositionVector>::const_iterator i =
myPositionVectors.find(attr);
299 if (i->second.size() != 2) {
302 return Boundary(i->second[0].x(), i->second[0].y(), i->second[1].x(), i->second[1].y());
306 std::vector<std::string>
309 std::vector<std::string> ret;
315 std::vector<SUMOReal>
317 std::vector<SUMOReal> ret;
337 for (std::set<int>::const_iterator i =
myAttrs.begin(); i !=
myAttrs.end(); ++i) {