43 #ifdef CHECK_MEMORY_LEAKS
45 #endif // CHECK_MEMORY_LEAKS
235 for (std::vector<std::string>::const_iterator it = names.begin(); it != names.end(); it++) {
240 if (ret.length() > 0) {
241 return ret.substr(1);
254 std::vector<std::string>
258 std::vector<std::string> result;
259 for (std::vector<std::string>::const_iterator it = classNames.begin(); it != classNames.end(); it++) {
261 if ((svc & permissions) == svc && svc !=
SVC_UNKNOWN) {
262 result.push_back(*it);
269 std::pair<std::string, bool>
273 return std::pair<std::string, bool>(
"",
false);
277 size_t num_allowed = 0;
279 if ((mask & permissions) == mask) {
296 throw ProcessError(
"Unknown vehicle class '" + name +
"'.");
304 for (std::vector<std::string>::const_iterator it = names.begin(); it != names.end(); it++) {
305 if (name.find(*it) != std::string::npos) {
337 if (allowedS.size() == 0 && disallowedS.size() == 0) {
339 }
else if (allowedS.size() > 0 && disallowedS.size() > 0) {
340 WRITE_WARNING(
"SVCPermissions must be specified either via 'allow' or 'disallow'. Ignoring 'disallow'");
342 }
else if (allowedS.size() > 0) {
353 for (std::vector<std::string>::const_iterator i = allowedS.begin(); i != allowedS.end(); ++i) {
365 throw ProcessError(
"Unknown vehicle shape '" + name +
"'.");
378 return (permissions & anyRail) > 0 && (permissions &
SVC_PASSENGER) == 0;
387 throw ProcessError(
"Unknown emission type '" + name +
"'.");