1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
10 /// @file    NBParking.h
11 /// @author  Jakob Erdmann
12 /// @date    Tue, 14 Nov 2017
13 /// @version $Id$
14 ///
15 // The representation of an imported parking area
16 /****************************************************************************/
17 #ifndef SUMO_NBParking_H
18 #define SUMO_NBParking_H
19 
20 // ===========================================================================
21 // included modules
22 // ===========================================================================
23 #include <config.h>
24 
25 #include <string>
26 #include "utils/common/Named.h"
27 
28 
29 // ===========================================================================
30 // class declarations
31 // ===========================================================================
32 class OutputDevice;
33 class NBEdgeCont;
34 class OptionsCont;
35 
36 
37 // ===========================================================================
38 // class definitions
39 // ===========================================================================
40 /**
41 * @class NBParking
42 * @brief The representation of a single pt stop
43 */
44 class NBParking : public Named {
45 
46 public:
47     /**@brief Constructor
48     * @param[in] id The id of the pt stop
49     * @param[in] position The position of the pt stop
50     * @param[in] edgeId The edge id of the pt stop
51     * @param[in] length The length of the pt stop
52     */
53     NBParking(const std::string& id, const std::string& edgeID, const std::string& name = "");
54 
55     void write(OutputDevice& device, NBEdgeCont& ec) const;
56 
57 private:
58     std::string myEdgeID;
59     std::string myName;
60 
61 };
62 
63 class NBParkingCont : public std::vector<NBParking> {
64 
65 public:
66     /// @brief add edges that must be kept
67     void addEdges2Keep(const OptionsCont& oc, std::set<std::string>& into);
68 };
69 
70 #endif //SUMO_NBParking_H
71