SUMO - Simulation of Urban MObility
TraCI_Polygon.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2017-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
17 // C++ TraCI client API implementation
18 /****************************************************************************/
19 
20 
21 #ifndef SUMO_TRACI_POLYGON_H
22 #define SUMO_TRACI_POLYGON_H
23 
24 
25 // ===========================================================================
26 // included modules
27 // ===========================================================================
28 #ifdef _MSC_VER
29 #include <windows_config.h>
30 #else
31 #include <config.h>
32 #endif
33 
34 #include <string>
35 #include <vector>
36 #include <traci-server/TraCIDefs.h>
37 
38 
39 // ===========================================================================
40 // class declarations
41 // ===========================================================================
42 class SUMOPolygon;
43 
44 
45 // ===========================================================================
46 // class definitions
47 // ===========================================================================
49 public:
50  static std::vector<std::string> getIDList();
51  static std::string getType(const std::string& polygonID);
52  static TraCIPositionVector getShape(const std::string& polygonID);
53  static TraCIColor getColor(const std::string& polygonID);
54  static bool getFilled(const std::string& polygonID);
55  static std::string getParameter(const std::string& polygonID, const std::string& paramName);
56  static void setType(const std::string& polygonID, const std::string& setType);
57  static void setShape(const std::string& polygonID, const TraCIPositionVector& shape);
58  static void setColor(const std::string& polygonID, const TraCIColor& c);
59  static void add(const std::string& polygonID, const TraCIPositionVector& shape, const TraCIColor& c, bool fill, const std::string& type, int layer);
60  static void remove(const std::string& polygonID, int layer = 0);
61 
62 
63  static void subscribe(const std::string& objID, SUMOTime beginTime, SUMOTime endTime, const std::vector<int>& vars);
64  static void subscribeContext(const std::string& objID, SUMOTime beginTime, SUMOTime endTime, int domain, double range, const std::vector<int>& vars);
65 
66  static void setFilled(std::string polygonID, bool filled);
67  static void setParameter(std::string& name, std::string& value, std::string& string);
68 private:
69 
70  static SUMOPolygon* getPolygon(const std::string& id);
71 
73  TraCI_Polygon();
74 
76  TraCI_Polygon(const TraCI_Polygon& src);
77 
80 
81 };
82 
83 #endif //SUMO_TRACI_POLYGON_H
static TraCIColor getColor(const std::string &polygonID)
static void add(const std::string &polygonID, const TraCIPositionVector &shape, const TraCIColor &c, bool fill, const std::string &type, int layer)
static std::string getParameter(const std::string &polygonID, const std::string &paramName)
TraCI_Polygon()
invalidated standard constructor
static void subscribe(const std::string &objID, SUMOTime beginTime, SUMOTime endTime, const std::vector< int > &vars)
static void setParameter(std::string &name, std::string &value, std::string &string)
static void setColor(const std::string &polygonID, const TraCIColor &c)
static bool getFilled(const std::string &polygonID)
static std::string getType(const std::string &polygonID)
static void setFilled(std::string polygonID, bool filled)
static std::vector< std::string > getIDList()
TraCI_Polygon & operator=(const TraCI_Polygon &src)
invalidated assignment operator
static void subscribeContext(const std::string &objID, SUMOTime beginTime, SUMOTime endTime, int domain, double range, const std::vector< int > &vars)
static SUMOPolygon * getPolygon(const std::string &id)
static TraCIPositionVector getShape(const std::string &polygonID)
A color.
Definition: TraCIDefs.h:77
static void setType(const std::string &polygonID, const std::string &setType)
long long int SUMOTime
Definition: TraCIDefs.h:51
static void setShape(const std::string &polygonID, const TraCIPositionVector &shape)
A list of positions.