SUMO - Simulation of Urban MObility
NIVissimTrafficDescription.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2018 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 /****************************************************************************/
15 // -------------------
16 /****************************************************************************/
17 #ifndef NIVissimTrafficDescription_h
18 #define NIVissimTrafficDescription_h
19 
20 
21 // ===========================================================================
22 // included modules
23 // ===========================================================================
24 #include <config.h>
25 
26 
27 #include <string>
28 #include <map>
30 
31 // ===========================================================================
32 // class definitions
33 // ===========================================================================
38 public:
39  NIVissimTrafficDescription(const std::string& name,
40  const NIVissimVehicleClassVector& vehicleTypes);
42  static bool dictionary(int id, const std::string& name,
43  const NIVissimVehicleClassVector& vehicleTypes);
44  static bool dictionary(int id, NIVissimTrafficDescription* o);
45  static NIVissimTrafficDescription* dictionary(int id);
46  static void clearDict();
47  static double meanSpeed(int id);
48  double meanSpeed() const;
49 private:
50  std::string myName;
52 private:
53  typedef std::map<int, NIVissimTrafficDescription*> DictType;
54  static DictType myDict;
55 };
56 
57 
58 #endif
59 
60 /****************************************************************************/
61 
std::vector< NIVissimVehicleClass * > NIVissimVehicleClassVector
std::map< int, NIVissimTrafficDescription * > DictType
NIVissimTrafficDescription(const std::string &name, const NIVissimVehicleClassVector &vehicleTypes)
NIVissimVehicleClassVector myVehicleTypes
static bool dictionary(int id, const std::string &name, const NIVissimVehicleClassVector &vehicleTypes)