Eclipse SUMO - Simulation of Urban MObility
BusStop.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 /****************************************************************************/
18 // C++ TraCI client API implementation
19 /****************************************************************************/
20 #pragma once
21 #include <vector>
22 #include <libsumo/TraCIDefs.h>
23 
24 
25 // ===========================================================================
26 // class declarations
27 // ===========================================================================
28 #ifndef LIBTRACI
29 class MSStoppingPlace;
30 #endif
31 
32 
33 // ===========================================================================
34 // class definitions
35 // ===========================================================================
40 namespace LIBSUMO_NAMESPACE {
41 class BusStop {
42 public:
43 
44  static std::string getLaneID(const std::string& stopID);
45  static double getStartPos(const std::string& stopID);
46  static double getEndPos(const std::string& stopID);
47  static std::string getName(const std::string& stopID);
48  static int getVehicleCount(const std::string& stopID);
49  static std::vector<std::string> getVehicleIDs(const std::string& stopID);
50  static int getPersonCount(const std::string& stopID);
51  static std::vector<std::string> getPersonIDs(const std::string& stopID);
52 
55 
56 #ifndef LIBTRACI
57 #ifndef SWIG
58  static std::shared_ptr<VariableWrapper> makeWrapper();
59 
60  static bool handleVariable(const std::string& objID, const int variable, VariableWrapper* wrapper, tcpip::Storage* paramData);
61 
62 private:
63  static MSStoppingPlace* getBusStop(const std::string& id);
64 
65 private:
68 #endif
69 #endif
70 
72  BusStop() = delete;
73 };
74 
75 
76 }
#define LIBSUMO_ID_PARAMETER_API
Definition: TraCIDefs.h:116
#define LIBSUMO_SUBSCRIPTION_API
Definition: TraCIDefs.h:62
LIBSUMO_ID_PARAMETER_API static LIBSUMO_SUBSCRIPTION_API std::shared_ptr< VariableWrapper > makeWrapper()
static ContextSubscriptionResults myContextSubscriptionResults
Definition: BusStop.h:67
static int getVehicleCount(const std::string &stopID)
static double getEndPos(const std::string &stopID)
static MSStoppingPlace * getBusStop(const std::string &id)
static std::string getName(const std::string &stopID)
static int getPersonCount(const std::string &stopID)
static double getStartPos(const std::string &stopID)
static bool handleVariable(const std::string &objID, const int variable, VariableWrapper *wrapper, tcpip::Storage *paramData)
BusStop()=delete
invalidated standard constructor
static std::vector< std::string > getVehicleIDs(const std::string &stopID)
static std::vector< std::string > getPersonIDs(const std::string &stopID)
static SubscriptionResults mySubscriptionResults
Definition: BusStop.h:66
static std::string getLaneID(const std::string &stopID)
A lane area vehicles can halt at.
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