43 #ifdef CHECK_MEMORY_LEAKS
45 #endif // CHECK_MEMORY_LEAKS
233 for (std::vector<std::string>::const_iterator it = names.begin(); it != names.end(); it++) {
238 if (ret.length() > 0) {
239 return ret.substr(1);
252 std::vector<std::string>
256 std::vector<std::string> result;
257 for (std::vector<std::string>::const_iterator it = classNames.begin(); it != classNames.end(); it++) {
259 if ((svc & permissions) == svc && svc !=
SVC_UNKNOWN) {
260 result.push_back(*it);
267 std::pair<std::string, bool>
271 return std::pair<std::string, bool>(
"",
false);
275 size_t num_allowed = 0;
277 if ((mask & permissions) == mask) {
294 throw ProcessError(
"Unknown vehicle class '" + name +
"'.");
302 for (std::vector<std::string>::const_iterator it = names.begin(); it != names.end(); it++) {
303 if (name.find(*it) != std::string::npos) {
335 if (allowedS.size() == 0 && disallowedS.size() == 0) {
337 }
else if (allowedS.size() > 0 && disallowedS.size() > 0) {
338 WRITE_WARNING(
"SVCPermissions must be specified either via 'allow' or 'disallow'. Ignoring 'disallow'");
340 }
else if (allowedS.size() > 0) {
351 for (std::vector<std::string>::const_iterator i = allowedS.begin(); i != allowedS.end(); ++i) {
363 throw ProcessError(
"Unknown vehicle shape '" + name +
"'.");
376 return (permissions & anyRail) > 0 && (permissions &
SVC_PASSENGER) == 0;
385 throw ProcessError(
"Unknown emission type '" + name +
"'.");