42 #ifdef CHECK_MEMORY_LEAKS
44 #endif // CHECK_MEMORY_LEAKS
68 std::vector<std::string> ids;
113 std::string warning =
"";
117 && variable !=
ADD && variable !=
REMOVE) {
124 if (variable !=
ADD && variable !=
REMOVE) {
226 const std::map<std::string, PointOfInterest*>& pois = shapeCont.
getPOIs().
getMyMap();
227 for (std::map<std::string, PointOfInterest*>::const_iterator i = pois.begin(); i != pois.end(); ++i) {
228 const float cmin[2] = {(
float)(*i).second->x(), (
float)(*i).second->y()};
229 const float cmax[2] = {(
float)(*i).second->x(), (
float)(*i).second->y()};
230 t->
Insert(cmin, cmax, (*i).second);
void Insert(const float a_min[2], const float a_max[2], Named *a_data)
Insert entry.
static const std::string DEFAULT_IMG_FILE
static bool processSet(TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
Processes a set value command (Command 0xc7: Change PoI State)
bool readTypeCheckingColor(tcpip::Storage &inputStorage, RGBColor &into)
Reads the value type and a color, verifying the type.
A RT-tree for efficient storing of SUMO's Named objects.
bool readTypeCheckingInt(tcpip::Storage &inputStorage, int &into)
Reads the value type and an int, verifying the type.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
bool readTypeCheckingString(tcpip::Storage &inputStorage, std::string &into)
Reads the value type and a string, verifying the type.
Storage for geometrical objects.
virtual void writeUnsignedByte(int)
bool writeErrorStatusCmd(int commandId, const std::string &description, tcpip::Storage &outputStorage)
Writes a status command to the given storage with status = RTYPE_ERR.
SUMOReal x() const
Returns the x-position.
virtual void writeInt(int)
virtual int readUnsignedByte()
T get(const std::string &id) const
Retrieves an item.
unsigned char blue() const
Returns the blue-amount of the color.
static const SUMOReal DEFAULT_ANGLE
static NamedRTree * getTree()
Returns a tree filled with PoI instances.
virtual void movePOI(const std::string &id, const Position &pos)
Assigns a new position to the named PoI.
ShapeContainer & getShapeContainer()
Returns the shapes container.
static const SUMOReal DEFAULT_IMG_HEIGHT
A point in 2D or 3D with translation and scaling methods.
#define CMD_GET_POI_VARIABLE
virtual bool removePOI(const std::string &id)
Removes a PoI from the container.
void insertIDs(std::vector< std::string > &into) const
unsigned char alpha() const
Returns the alpha-amount of the color.
virtual void writeStringList(const std::vector< std::string > &s)
virtual std::string readString()
#define CMD_SET_POI_VARIABLE
virtual bool addPOI(const std::string &id, const std::string &type, const RGBColor &color, SUMOReal layer, SUMOReal angle, const std::string &imgFile, const Position &pos, SUMOReal width, SUMOReal height)
Builds a POI using the given values and adds it to the container.
static bool getPosition(const std::string &id, Position &p)
Returns the named PoI's position.
const POIs & getPOIs() const
Returns all pois.
TraCI server used to control sumo by a remote TraCI client.
const RGBColor & getColor() const
Returns the color of the Shape.
void writeResponseWithLength(tcpip::Storage &outputStorage, tcpip::Storage &tempMsg)
static bool processGet(TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
Processes a get value command (Command 0xa7: Get PoI Variable)
const IDMap & getMyMap() const
bool readTypeCheckingPosition2D(tcpip::Storage &inputStorage, Position &into)
Reads the value type and a 2D position, verifying the type.
virtual void writeString(const std::string &s)
void setType(const std::string &type)
Sets a new type.
#define RESPONSE_GET_POI_VARIABLE
SUMOReal y() const
Returns the y-position.
virtual void writeDouble(double)
unsigned char green() const
Returns the green-amount of the color.
void writeStatusCmd(int commandId, int status, const std::string &description, tcpip::Storage &outputStorage)
Writes a status command to the given storage.
static PointOfInterest * getPoI(const std::string &id)
Returns the named PoI.
const std::string & getType() const
Returns the (abstract) type of the Shape.
unsigned char red() const
Returns the red-amount of the color.
void setColor(const RGBColor &col)
Sets a new color.
static const SUMOReal DEFAULT_IMG_WIDTH