43 #ifdef CHECK_MEMORY_LEAKS
45 #endif // CHECK_MEMORY_LEAKS
124 for (std::vector<std::string>::const_iterator it = names.begin(); it != names.end(); it++) {
129 if (ret.length() > 0) {
130 return ret.substr(1);
139 std::ostringstream oss;
142 for (std::vector<std::string>::const_iterator it = classNames.begin(); it != classNames.end(); it++) {
153 std::vector<std::string>
157 std::vector<std::string> result;
158 for (std::vector<std::string>::const_iterator it = classNames.begin(); it != classNames.end(); it++) {
160 if ((svc & permissions) == svc && svc !=
SVC_UNKNOWN) {
161 result.push_back(*it);
168 std::pair<std::string, bool>
172 return std::pair<std::string, bool>(
"",
false);
175 size_t num_allowed = 0;
177 if ((mask & permissions) == mask) {
194 throw ProcessError(
"Unknown vehicle class '" + name +
"'.");
202 for (std::vector<std::string>::const_iterator it = names.begin(); it != names.end(); it++) {
203 if (name.find(*it) != std::string::npos) {
235 if (allowedS.size() == 0 && disallowedS.size() == 0) {
237 }
else if (allowedS.size() > 0 && disallowedS.size() > 0) {
238 WRITE_WARNING(
"SVCPermissions must be specified either via 'allow' or 'disallow'. Ignoring 'disallow'");
240 }
else if (allowedS.size() > 0) {
251 for (std::vector<std::string>::const_iterator i = allowedS.begin(); i != allowedS.end(); ++i) {
263 throw ProcessError(
"Unknown vehicle shape '" + name +
"'.");
280 }
else if (name ==
"zero") {
282 }
else if (name.find(
"HDV_3_") == 0) {
284 }
else if (name.find(
"HDV_6_") == 0) {
286 }
else if (name.find(
"HDV_12_") == 0) {
288 }
else if (name.find(
"P_7_") == 0) {
290 }
else if (name.find(
"P_14_") == 0) {
292 }
else if (name.find(
"HDV_A0_3_") == 0) {
294 }
else if (name.find(
"HDV_A0_6_") == 0) {
296 }
else if (name.find(
"HDV_A0_12_") == 0) {
298 }
else if (name.find(
"P_A0_7_") == 0) {
300 }
else if (name.find(
"P_A0_14_") == 0) {
305 throw ProcessError(
"Unknown emission type '" + name +
"'.");
317 return "HDV_3_" +
toString(
int(
id));
318 }
else if (
id < 3 + 6) {
319 return "HDV_6_" +
toString(
int(
id - 3));
320 }
else if (
id < 3 + 6 + 12) {
321 return "HDV_12_" +
toString(
int(
id - 3 - 6));
322 }
else if (
id < 3 + 6 + 12 + 7) {
323 return "P_7_" +
toString(
int(
id - 3 - 6 - 12));
324 }
else if (
id < 3 + 6 + 12 + 7 + 14) {
325 return "P_14_" +
toString(
int(
id - 3 - 6 - 12 - 7));