SUMO - Simulation of Urban MObility
NIVissimVehTypeClass.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2002-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 /****************************************************************************/
16 // -------------------
17 /****************************************************************************/
18 #ifndef NIVissimVehTypeClass_h
19 #define NIVissimVehTypeClass_h
20 
21 
22 // ===========================================================================
23 // included modules
24 // ===========================================================================
25 #include <config.h>
26 
27 #include <string>
28 #include <map>
29 #include <utils/common/RGBColor.h>
30 
31 
32 // ===========================================================================
33 // class definitions
34 // ===========================================================================
39 public:
40  NIVissimVehTypeClass(int id, const std::string& name,
41  const RGBColor& color, std::vector<int>& types);
43  static bool dictionary(int id, const std::string& name,
44  const RGBColor& color, std::vector<int>& types);
45  static bool dictionary(int id, NIVissimVehTypeClass* o);
46  static NIVissimVehTypeClass* dictionary(int name);
47  static void clearDict();
48  double meanSpeed() const;
49 private:
50  int myID;
51  std::string myName;
53  std::vector<int> myTypes;
54 private:
55  typedef std::map<int, NIVissimVehTypeClass*> DictType;
56  static DictType myDict;
57 };
58 
59 
60 #endif
61 
62 /****************************************************************************/
63 
static bool dictionary(int id, const std::string &name, const RGBColor &color, std::vector< int > &types)
NIVissimVehTypeClass(int id, const std::string &name, const RGBColor &color, std::vector< int > &types)
std::map< int, NIVissimVehTypeClass * > DictType
std::vector< int > myTypes
double meanSpeed() const