Eclipse SUMO - Simulation of Urban MObility
Route.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2012-2020 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials are made available under the
5 // terms of the Eclipse Public License 2.0 which is available at
6 // https://www.eclipse.org/legal/epl-2.0/
7 // This Source Code may also be made available under the following Secondary
8 // Licenses when the conditions for such availability set forth in the Eclipse
9 // Public License 2.0 are satisfied: GNU General Public License, version 2
10 // or later which is available at
11 // https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12 // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13 /****************************************************************************/
20 // C++ TraCI client API implementation
21 /****************************************************************************/
22 #pragma once
23 #include <config.h>
24 
25 #include <vector>
26 #include <libsumo/TraCIDefs.h>
27 
28 
29 // ===========================================================================
30 // class declarations
31 // ===========================================================================
32 #ifndef LIBTRACI
33 class MSRoute;
34 namespace libsumo {
35 class VariableWrapper;
36 }
37 #endif
38 
39 
40 // ===========================================================================
41 // class definitions
42 // ===========================================================================
47 namespace LIBSUMO_NAMESPACE {
48 class Route {
49 public:
50 
51  static std::vector<std::string> getEdges(const std::string& routeID);
52 
55 
56  static void add(const std::string& routeID, const std::vector<std::string>& edges);
57 
58 #ifndef LIBTRACI
59  static std::shared_ptr<VariableWrapper> makeWrapper();
60 
61  static bool handleVariable(const std::string& objID, const int variable, VariableWrapper* wrapper);
62 
63 private:
64  static const MSRoute* getRoute(const std::string& id);
65 
66 private:
69 #endif
70 
72  Route() = delete;
73 };
74 
75 
76 }
#define LIBSUMO_ID_PARAMETER_API
Definition: TraCIDefs.h:97
#define LIBSUMO_SUBSCRIPTION_API
Definition: TraCIDefs.h:44
static std::vector< std::string > getEdges(const std::string &routeID)
static bool handleVariable(const std::string &objID, const int variable, VariableWrapper *wrapper)
Route()=delete
invalidated standard constructor
LIBSUMO_ID_PARAMETER_API static LIBSUMO_SUBSCRIPTION_API void add(const std::string &routeID, const std::vector< std::string > &edges)
static SubscriptionResults mySubscriptionResults
Definition: Route.h:67
static std::shared_ptr< VariableWrapper > makeWrapper()
static ContextSubscriptionResults myContextSubscriptionResults
Definition: Route.h:68
static const MSRoute * getRoute(const std::string &id)
std::map< std::string, TraCIResults > SubscriptionResults
{object->{variable->value}}
Definition: TraCIDefs.h:250
std::map< std::string, SubscriptionResults > ContextSubscriptionResults
Definition: TraCIDefs.h:251