41 std::vector<std::string>
42 Rerouter::getIDList() {
43 std::vector<std::string> ids;
45 ids.push_back(item.first);
51 Rerouter::getIDCount() {
57 Rerouter::getParameter(
const std::string& ,
const std::string& ) {
66 Rerouter::setParameter(
const std::string& ,
const std::string& ,
const std::string& ) {
76 Rerouter::getRerouter(
const std::string&
id) {
79 throw TraCIException(
"Rerouter '" +
id +
"' is not known");
85 std::shared_ptr<VariableWrapper>
86 Rerouter::makeWrapper() {
87 return std::make_shared<Helper::SubscriptionWrapper>(handleVariable, mySubscriptionResults, myContextSubscriptionResults);
92 Rerouter::handleVariable(
const std::string& objID,
const int variable, VariableWrapper* wrapper) {
95 return wrapper->wrapStringList(objID, variable, getIDList());
97 return wrapper->wrapInt(objID, variable, getIDCount());
#define LIBSUMO_SUBSCRIPTION_IMPLEMENTATION(CLASS, DOMAIN)
#define LIBSUMO_GET_PARAMETER_WITH_KEY_IMPLEMENTATION(CLASS)
Reroutes vehicles passing an edge.
static const std::map< std::string, MSTriggeredRerouter * > & getInstances()
return all rerouter instances
C++ TraCI client API implementation.
TRACI_CONST int TRACI_ID_LIST
std::map< std::string, TraCIResults > SubscriptionResults
{object->{variable->value}}
std::map< std::string, SubscriptionResults > ContextSubscriptionResults