68 mySaveInFilename(false) {
170 for (std::vector<GNEVariableSpeedSignStep>::const_iterator i =
mySteps.begin(); i !=
mySteps.end(); ++i) {
195 const std::vector<GNEVariableSpeedSignStep>&
234 glRotated(180, 0, 0, 1);
365 std::vector<std::string> laneIds = GNEAttributeCarrier::parse<std::vector<std::string> > (value);
367 if (laneIds.empty()) {
371 for (
int i = 0; i < (int)laneIds.size(); i++) {
381 return canParse<bool>(value);
396 std::vector<std::string> laneIds = GNEAttributeCarrier::parse<std::vector<std::string> > (value);
397 std::vector<GNELane*> lanes;
400 for (
int i = 0; i < (int)laneIds.size(); i++) {
403 lanes.push_back(lane);
static void drawTexturedBox(int which, double size)
Draws a named texture as a box with the given size.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
double scale
information about a lane's width (temporary, used for a single view)
const std::string & getFilename() const
get filename of variable speed sign
GUIVisualizationTextSettings addName
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
const std::string & getAdditionalID() const
returns the ID of additional
static GUIGlID getTexture(GUITexture which)
returns a texture previously defined in the enum GUITexture
GNEAdditional * getAdditional(SumoXMLTag type, const std::string &id) const
Returns the named additional.
Stores the information about how to visualize structures.
double y() const
Returns the y-position.
void openAdditionalDialog()
open GNEVariableSpeedSignDialog
double x() const
Returns the x-position.
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Position getPositionInView() const
Returns position of Variable Speed Signal in view.
void p_begin(const std::string &description)
Begin undo command sub-group. This begins a new group of commands that are treated as a single comman...
void commmitAdditionalGeometryMoved(double oldPosx, double oldPosy, GNEUndoList *undoList)
updated geometry changes in the attributes of additional
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
static bool isValidFilename(const std::string &value)
true if value is a valid file value
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
GNEViewNet * myViewNet
The GNEViewNet this additional element belongs.
RGBColor myBaseColorSelected
base color selected (Default blue)
void p_add(GNEChange_Attribute *cmd)
special method, avoid empty changes, always execute
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
void drawLockIcon(double size=0.5) const
draw lock icon
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
void refreshAdditional(GNEAdditional *additional)
refreshes boundary information of an additional after a geometry update
PositionVector myShape
The shape of the additional element.
void p_end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise, the sub-group will be added as a new command into parent group. A matching begin() must have been called previously.
A point in 2D or 3D with translation and scaling methods.
GNELane * retrieveLane(const std::string &id, bool failHard=true)
get lane by id
void setBlockIconRotation(GNELane *lane=NULL)
set Rotation of block Icon
friend class GNEChange_Attribute
declare friend class
bool mySaveInFilename
enable or disable save in external filename
block movement of a graphic element
void setVariableSpeedSignSteps(const std::vector< GNEVariableSpeedSignStep > &steps)
set values of variable speed signal
void addStep(const GNEVariableSpeedSignStep &step)
insert a new step in variable speed signal
void drawName(const Position &pos, const double scale, const GUIVisualizationTextSettings &settings, const double angle=0) const
draw name of item
void updateGeometry()
update pre-computed geometry information
void setAdditionalID(const std::string &id)
set the ID of additional
virtual const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
const std::string getID() const
function to support debugging
std::string getAttribute(SumoXMLAttr key) const
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes ...
Position myBlockIconOffset
The offSet of the block icon.
GNEVariableSpeedSign(const std::string &id, GNEViewNet *viewNet, Position pos, std::vector< GNELane *> lanes, const std::string &filename, const std::vector< GNEVariableSpeedSignStep > &vssValues)
Constructor.
const std::vector< GNEVariableSpeedSignStep > & getSteps() const
get values of variable speed signal
trigger: the time of the step
GNEViewNet * getViewNet() const
Returns a pointer to GNEViewNet in which additional element is located.
std::vector< GNEVariableSpeedSignStep > mySteps
values of variable speed signal
bool myBlocked
boolean to check if additional element is blocked (i.e. cannot be moved with mouse) ...
An Element which don't belongs to GNENet but has influency in the simulation.
void setFilename(const std::string &filename)
set filename of variable speed sign
RGBColor myBaseColor
base color (Default green)
~GNEVariableSpeedSign()
Destructor.
GNENet * getNet() const
get the net object
GUIGlID getGlID() const
Returns the numerical id of the object.
Static storage of an output device and its base (abstract) implementation.
Position myPosition
The position in which this additional element is located.
bool closeTag()
Closes the most recently opened tag.
bool isAdditionalSelected() const
std::string myFilename
filename of variable speed sign
void moveAdditionalGeometry(double offsetx, double offsety)
change the position of the variable speed sign geometry
const std::string & getParentName() const
Returns the name of the parent object.
void writeAdditional(OutputDevice &device) const
writte additional element into a xml file
static PositionVector parseShapeReporting(const std::string &shpdef, const std::string &objecttype, const char *objectid, bool &ok, bool allowEmpty, bool report=true)
Builds a PositionVector from a string representation, reporting occured errors.
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
Position myBlockIconPosition
position of the block icon
trigger: a step description
SumoXMLTag getTag() const
get XML Tag assigned to this object