Eclipse SUMO - Simulation of Urban MObility
NBParking.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3 // Copyright (C) 2001-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 // The representation of an imported parking area
19 /****************************************************************************/
20 #pragma once
21 #include <config.h>
22 
23 #include <string>
24 #include "utils/common/Named.h"
25 
26 
27 // ===========================================================================
28 // class declarations
29 // ===========================================================================
30 class OutputDevice;
31 class NBEdgeCont;
32 class OptionsCont;
33 
34 
35 // ===========================================================================
36 // class definitions
37 // ===========================================================================
42 class NBParking : public Named {
43 
44 public:
50  NBParking(const std::string& id, const std::string& edgeID, const std::string& name = "");
51 
52  void write(OutputDevice& device, NBEdgeCont& ec) const;
53 
54  const std::string getEdgeID() const {
55  return myEdgeID;
56  }
57 
58 private:
59  std::string myEdgeID;
60  std::string myName;
61 
62 };
63 
64 class NBParkingCont : public std::vector<NBParking> {
65 
66 public:
68  void addEdges2Keep(const OptionsCont& oc, std::set<std::string>& into);
69 };
Storage for edges, including some functionality operating on multiple edges.
Definition: NBEdgeCont.h:59
void addEdges2Keep(const OptionsCont &oc, std::set< std::string > &into)
add edges that must be kept
Definition: NBParking.cpp:78
The representation of an imported parking area.
Definition: NBParking.h:42
void write(OutputDevice &device, NBEdgeCont &ec) const
Definition: NBParking.cpp:40
std::string myName
Definition: NBParking.h:60
const std::string getEdgeID() const
Definition: NBParking.h:54
NBParking(const std::string &id, const std::string &edgeID, const std::string &name="")
Constructor.
Definition: NBParking.cpp:33
std::string myEdgeID
Definition: NBParking.h:59
Base class for objects which have an id.
Definition: Named.h:54
A storage for options typed value containers)
Definition: OptionsCont.h:89
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:61