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.dev/sumo
3 // Copyright (C) 2012-2024 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 <vector>
24 #include <libsumo/TraCIDefs.h>
25 
26 
27 // ===========================================================================
28 // class declarations
29 // ===========================================================================
30 #ifndef LIBTRACI
31 class MSRoute;
32 typedef std::shared_ptr<const MSRoute> ConstMSRoutePtr;
33 #endif
34 
35 
36 // ===========================================================================
37 // class definitions
38 // ===========================================================================
43 namespace LIBSUMO_NAMESPACE {
44 class Route {
45 public:
46 
47  static std::vector<std::string> getEdges(const std::string& routeID);
48 
51 
52  static void add(const std::string& routeID, const std::vector<std::string>& edges);
53 
54 #ifndef LIBTRACI
55 #ifndef SWIG
56  static std::shared_ptr<VariableWrapper> makeWrapper();
57 
58  static bool handleVariable(const std::string& objID, const int variable, VariableWrapper* wrapper, tcpip::Storage* paramData);
59 
60 private:
61  static ConstMSRoutePtr getRoute(const std::string& id);
62 
63 private:
66 #endif
67 #endif
68 
70  Route() = delete;
71 };
72 
73 
74 }
std::shared_ptr< const MSRoute > ConstMSRoutePtr
Definition: Route.h:31
#define LIBSUMO_ID_PARAMETER_API
Definition: TraCIDefs.h:116
#define LIBSUMO_SUBSCRIPTION_API
Definition: TraCIDefs.h:62
static std::vector< std::string > getEdges(const std::string &routeID)
static ConstMSRoutePtr getRoute(const std::string &id)
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:64
static std::shared_ptr< VariableWrapper > makeWrapper()
static ContextSubscriptionResults myContextSubscriptionResults
Definition: Route.h:65
static bool handleVariable(const std::string &objID, const int variable, VariableWrapper *wrapper, tcpip::Storage *paramData)
std::map< std::string, libsumo::SubscriptionResults > ContextSubscriptionResults
Definition: TraCIDefs.h:338
std::map< std::string, libsumo::TraCIResults > SubscriptionResults
{object->{variable->value}}
Definition: TraCIDefs.h:337