41 const Position& pos,
const std::string& name,
const std::vector<std::string>& vTypes,
90 if (!step->getTagProperty()->isSymbol()) {
91 step->writeAdditional(device);
104GNEVariableSpeedSign::GNEVariableSpeedSign::isAdditionalValid()
const {
110GNEVariableSpeedSign::GNEVariableSpeedSign::getAdditionalProblem()
const {
116GNEVariableSpeedSign::GNEVariableSpeedSign::fixAdditionalProblem() {
148 const auto& editModes =
myNet->getViewNet()->getEditModes();
150 if (!
myNet->getViewNet()->isCurrentlyMovingElements() && editModes.isCurrentSupermodeNetwork() &&
151 !
myNet->getViewNet()->getEditNetworkElementShapes().getEditedNetworkElement() &&
154 return myNet->getViewNet()->getViewObjectsSelector().getGUIGlObjectFront() ==
this;
170 return myNet->getMicrosimID();
176 const auto& inspectedElements =
myNet->getViewNet()->getInspectedElements();
178 if (
myNet->getViewNet()->getDataViewOptions().showAdditionals()) {
186 if (
myNet->getViewNet()->getNetworkViewOptions().showSubAdditionals() ||
188 step->isAttributeCarrierSelected() || inspectedElements.isACInspected(step) ||
189 step->isMarkedForDrawingFront()) {
203 std::vector<std::string> lanes;
205 if (VSSSymbol->getTagProperty()->isSymbol()) {
318 if (
getID().size() > 0) {
326 undoList->
begin(
this, (
"change " +
getTagStr() +
" attribute").c_str());
334 for (
const auto& lane : lanes) {
@ NETWORK_MOVE
mode for moving network elements
@ VARIABLESPEEDSIGN_SELECTED
#define WRITE_WARNING(msg)
const std::string invalid_return< std::string >::value
@ SUMO_TAG_VSS
A variable speed sign.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
bool isValidAdditionalID(const std::string &value) const
check if a new additional ID is valid
void setAdditionalID(const std::string &newID)
set additional ID
std::string myAdditionalName
name of additional
friend class GNEAdditionalSquared
void writeAdditionalAttributes(OutputDevice &device) const
write common additional attributes
GNEAdditional(const std::string &id, GNENet *net, const std::string &filename, SumoXMLTag tag, const std::string &additionalName)
Constructor.
void drawParentChildLines(const GUIVisualizationSettings &s, const RGBColor &color, const bool onlySymbols=false) const
draw parent and child lines
void updatedSquaredGeometry()
updated squared geometry
Position myPosOverView
position over view
void updatedSquaredCenteringBoundary(const bool updateGrid)
updated squared centering boundary
GNEMoveElementView * myMoveElementView
move element over view
void drawSquaredAdditional(const GUIVisualizationSettings &s, const double size, GUITexture texture, GUITexture selectedTexture) const
draw squared additional
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
bool mySelected
boolean to check if this AC is selected (more quickly as checking GUIGlObjectStorage)
const std::string getID() const override
get ID (all Attribute Carriers have one)
static T parse(const std::string &string)
parses a value of type T from string (used for basic types: int, double, bool, etc....
const std::string & getTagStr() const
get tag assigned to this object in string format
static bool canParse(const std::string &string)
true if a value of type T can be parsed from string
GNENet * myNet
pointer to net
static void changeAttribute(GNEAttributeCarrier *AC, SumoXMLAttr key, const std::string &value, GNEUndoList *undoList, const bool force=false)
change attribute
const GNEHierarchicalContainerChildren< GNEAdditional * > & getChildAdditionals() const
return child additionals
A NBNetBuilder extended by visualisation and editing capabilities.
void end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise,...
void begin(GUIIcon icon, const std::string &description)
Begin undo command sub-group with current supermode. This begins a new group of commands that are tre...
void add(GNEChange *command, bool doit=false, bool merge=true)
Add new command, executing it if desired. The new command will be merged with the previous command if...
void updateGeometry() override
update pre-computed geometry information
Position getAttributePosition(SumoXMLAttr key) const override
Parameterised * getParameters() override
get parameters associated with this variableSpeedSign
PositionVector getAttributePositionVector(SumoXMLAttr key) const override
std::string getPopUpID() const override
get PopPup ID (Used in AC Hierarchy)
~GNEVariableSpeedSign()
Destructor.
double getAttributeDouble(SumoXMLAttr key) const override
void drawGL(const GUIVisualizationSettings &s) const override
Draws the object.
GNEVariableSpeedSign(GNENet *net)
default Constructor
Position getPositionInView() const override
Returns position of additional in view.
void rebuildVSSSymbols(const std::string &value, GNEUndoList *undoList)
rebuild VSS Symbols
void writeAdditional(OutputDevice &device) const override
write additional element into a xml file
void openAdditionalDialog() override
open GNEVariableSpeedSignDialog
std::string getHierarchyName() const override
get Hierarchy Name (Used in AC Hierarchy)
std::string getAttribute(SumoXMLAttr key) const override
std::string getParentName() const override
Returns the name of the parent object.
bool checkDrawMoveContour() const override
check if draw move contour (red)
GNEMoveElement * getMoveElement() const override
methods to retrieve the elements linked to this variableSpeedSign
void splitEdgeGeometry(const double splitPosition, const GNENetworkElement *originalElement, const GNENetworkElement *newElement, GNEUndoList *undoList) override
split geometry
bool isValid(SumoXMLAttr key, const std::string &value) override
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList) override
std::vector< std::string > myVehicleTypes
attribute vehicle types
void updateCenteringBoundary(const bool updateGrid) override
update centering boundary (implies change in RTREE)
const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
Stores the information about how to visualize structures.
GUIVisualizationAdditionalSettings additionalSettings
Additional settings.
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.
std::map< std::string, std::string > Map
parameters map
Parameterised()
Default constructor.
void writeParams(OutputDevice &device) const
write Params in the given outputdevice
A point in 2D or 3D with translation and scaling methods.
static bool isValidListOfTypeID(const std::string &value)
whether the given string is a valid list of ids for an edge or vehicle type (empty aren't allowed)
static bool isValidAttribute(const std::string &value)
whether the given string is a valid attribute for a certain key (for example, a name)
static const RGBColor connectionColor
connection color
static const double VSSSize
VSS size.