37 const SUMOTime time,
const double speed) :
43 setParent<GNEAdditional*>(variableSpeedSign);
211 if (canParse<double>(value)) {
213 double newTime = parse<double>(value);
221 if (!VSSChild->getTagProperty()->isSymbol() && VSSChild->getAttributeDouble(
SUMO_ATTR_TIME) == newTime) {
225 return (counter <= 1);
233 return canParse<double>(value);
263 mySpeed = parse<double>(value);
SUMOTime string2time(const std::string &r)
convert string to SUMOTime
std::string time2string(SUMOTime t, bool humanReadable)
convert SUMOTime to string (independently of global format setting)
@ SUMO_TAG_STEP
trigger: a step description
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ GNE_ATTR_PARENT
parent of an additional element
@ SUMO_ATTR_TIME
trigger: the time of the step
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
virtual void updateCenteringBoundary(const bool updateGrid)=0
update centering boundary (implies change in RTREE)
void writeAdditionalAttributes(OutputDevice &device) const
write common additional attributes
void drawListedAdditional(const GUIVisualizationSettings &s, const RGBColor baseCol, const RGBColor textCol, GUITexture texture, const std::string text) const
draw listed additional
Position getListedPositionInView() const
get listed position in view
void updateGeometryListedAdditional()
update geometry of listed additional
double getCommonAttributeDouble(SumoXMLAttr key) const
PositionVector getCommonAttributePositionVector(SumoXMLAttr key) const
void setCommonAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
const std::string & getTagStr() const
get tag assigned to this object in string format
Position getCommonAttributePosition(SumoXMLAttr key) const
bool isCommonAttributeValid(SumoXMLAttr key, const std::string &value) const
std::string getCommonAttribute(SumoXMLAttr key) const
static void changeAttribute(GNEAttributeCarrier *AC, SumoXMLAttr key, const std::string &value, GNEUndoList *undoList, const bool force=false)
change attribute
const GNEHierarchicalContainerParents< GNEAdditional * > & getParentAdditionals() const
get parent additionals
A NBNetBuilder extended by visualisation and editing capabilities.
bool isAdditionalValid() const
check if current additional is valid to be written into XML
GNEVariableSpeedSignStep(GNENet *net)
default constructor
void splitEdgeGeometry(const double splitPosition, const GNENetworkElement *originalElement, const GNENetworkElement *newElement, GNEUndoList *undoList)
split geometry
GNEMoveElement * getMoveElement() const override
methods to retrieve the elements linked to this variableSpeedSignStep
bool checkDrawMoveContour() const override
check if draw move contour (red)
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
double mySpeed
speed in this timeStep
Position getPositionInView() const
Returns position of additional in view.
~GNEVariableSpeedSignStep()
destructor
double getAttributeDouble(SumoXMLAttr key) const override
Parameterised * getParameters() override
get parameters associated with this variableSpeedSignStep
void writeAdditional(OutputDevice &device) const
write additional element into a xml file
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList) override
SUMOTime getTime() const
get time
PositionVector getAttributePositionVector(SumoXMLAttr key) const override
bool isValid(SumoXMLAttr key, const std::string &value) override
std::string getParentName() const
Returns the name of the parent object.
std::string getHierarchyName() const override
get Hierarchy Name (Used in AC Hierarchy)
void updateGeometry() override
update pre-computed geometry information
std::string getAttribute(SumoXMLAttr key) const override
inherited from GNEAttributeCarrier
void fixAdditionalProblem()
fix additional problem
void updateCenteringBoundary(const bool updateGrid)
update centering boundary (implies change in RTREE)
std::string getAdditionalProblem() const
return a string with the current additional problem
Position getAttributePosition(SumoXMLAttr key) const override
std::string getPopUpID() const override
get PopPup ID (Used in AC Hierarchy)
const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
Stores the information about how to visualize structures.
Static storage of an output device and its base (abstract) implementation.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
An upper class for objects with additional parameters.
A point in 2D or 3D with translation and scaling methods.
static const RGBColor WHITE
static const RGBColor BLACK