SUMO - Simulation of Urban MObility
TraCI_Polygon.h
Go to the documentation of this file.
1 /****************************************************************************/
7 // C++ TraCI client API implementation
8 /****************************************************************************/
9 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
10 // Copyright (C) 2017-2017 DLR (http://www.dlr.de/) and contributors
11 /****************************************************************************/
12 //
13 // This file is part of SUMO.
14 // SUMO is free software: you can redistribute it and/or modify
15 // it under the terms of the GNU General Public License as published by
16 // the Free Software Foundation, either version 3 of the License, or
17 // (at your option) any later version.
18 //
19 /****************************************************************************/
20 
21 
22 #ifndef SUMO_TRACI_POLYGON_H
23 #define SUMO_TRACI_POLYGON_H
24 
25 
26 // ===========================================================================
27 // included modules
28 // ===========================================================================
29 #ifdef _MSC_VER
30 #include <windows_config.h>
31 #else
32 #include <config.h>
33 #endif
34 
35 #include <string>
36 #include <vector>
37 #include <traci-server/TraCIDefs.h>
38 
39 
40 // ===========================================================================
41 // class declarations
42 // ===========================================================================
43 class SUMOPolygon;
44 
45 
46 // ===========================================================================
47 // class definitions
48 // ===========================================================================
50 public:
51  static std::vector<std::string> getIDList();
52  static std::string getType(const std::string& polygonID);
53  static TraCIPositionVector getShape(const std::string& polygonID);
54  static TraCIColor getColor(const std::string& polygonID);
55  static bool getFilled(const std::string& polygonID);
56  static std::string getParameter(const std::string& polygonID, const std::string& paramName);
57  static void setType(const std::string& polygonID, const std::string& setType);
58  static void setShape(const std::string& polygonID, const TraCIPositionVector& shape);
59  static void setColor(const std::string& polygonID, const TraCIColor& c);
60  static void add(const std::string& polygonID, const TraCIPositionVector& shape, const TraCIColor& c, bool fill, const std::string& type, int layer);
61  static void remove(const std::string& polygonID, int layer = 0);
62 
63 
64  static void subscribe(const std::string& objID, SUMOTime beginTime, SUMOTime endTime, const std::vector<int>& vars);
65  static void subscribeContext(const std::string& objID, SUMOTime beginTime, SUMOTime endTime, int domain, double range, const std::vector<int>& vars);
66 
67  static void setFilled(std::string polygonID, bool filled);
68  static void setParameter(std::string& name, std::string& value, std::string& string);
69 private:
70 
71  static SUMOPolygon* getPolygon(const std::string& id);
72 
74  TraCI_Polygon();
75 
77  TraCI_Polygon(const TraCI_Polygon& src);
78 
81 
82 };
83 
84 #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)
static void setType(const std::string &polygonID, const std::string &setType)
long long int SUMOTime
Definition: TraCIDefs.h:52
static void setShape(const std::string &polygonID, const TraCIPositionVector &shape)
A list of positions.