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 #include <string>
26 #include <vector>
27 #include <traci-server/TraCIDefs.h>
28 #include <utils/shapes/Polygon.h>
30 
31 public:
32 
33 
34  static std::vector<std::string> getIDList();
35  static std::string getType(const std::string& polygonID);
36  static TraCIPositionVector getShape(const std::string& polygonID);
37  static TraCIColor getColor(const std::string& polygonID);
38  static bool getFilled(const std::string& polygonID);
39  static std::string getParameter(const std::string& polygonID, const std::string& paramName);
40  static void setType(const std::string& polygonID, const std::string& setType);
41  static void setShape(const std::string& polygonID, const TraCIPositionVector& shape);
42  static void setColor(const std::string& polygonID, const TraCIColor& c);
43  static void add(const std::string& polygonID, const TraCIPositionVector& shape, const TraCIColor& c, bool fill, const std::string& type, int layer);
44  static void remove(const std::string& polygonID, int layer = 0);
45 
46 
47  static void subscribe(const std::string& objID, SUMOTime beginTime, SUMOTime endTime, const std::vector<int>& vars);
48  static void subscribeContext(const std::string& objID, SUMOTime beginTime, SUMOTime endTime, int domain, double range, const std::vector<int>& vars);
49 
50  static void setFilled(std::string polygonID, bool filled);
51  static void setParameter(std::string& name, std::string& value, std::string& string);
52 private:
53 
54  static SUMO::Polygon* getPolygon(const std::string& id);
55 
57  TraCI_Polygon();
58 
60  TraCI_Polygon(const TraCI_Polygon& src);
61 
64 
65 };
66 
67 #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)
A 2D- or 3D-polygon.
Definition: Polygon.h:57
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 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.
static SUMO::Polygon * getPolygon(const std::string &id)