17 #ifndef GNEAdditional_h 18 #define GNEAdditional_h 307 static bool isRouteValid(
const std::vector<GNEEdge*>& edges,
bool report);
void removeEdgeChild(GNEEdge *edge)
remove edge child
virtual std::string getPopUpID() const =0
get PopPup ID (Used in AC Hierarchy)
virtual bool isValid(SumoXMLAttr key, const std::string &value)=0
method for checking if the key and their conrrespond attribute are valids
virtual void openAdditionalDialog()
open Additional Dialog
bool updateGenericParameter(const std::string &oldKey, const std::string &newKey)
update generic parameter
void addEdgeChild(GNEEdge *edge)
add edge child
SumoXMLTag
Numbers representing SUMO-XML - element names.
bool isAdditionalBlocked() const
Check if additional item is currently blocked (i.e. cannot be moved with mouse)
void setBlockIconRotation(GNELane *additionalLane=nullptr)
void writeAdditional(OutputDevice &device) const
writte additional element into a xml file
void removeAdditionalChild(GNEAdditional *additional)
remove additional child from this additional
const std::vector< GNEEdge * > & getEdgeChilds() const
get edge chidls
void setGenericParametersStr(const std::string &value)
set generic parameters in string format
const std::string & getAdditionalID() const
returns Additional ID
const std::vector< GNELane * > & getLaneChilds() const
get lanes of VSS
void changeFirstAdditionalParent(const std::string &newAdditionalParentID)
change first additional parent of additional
GNEAdditional(const std::string &id, GNEViewNet *viewNet, GUIGlObjectType type, SumoXMLTag tag, std::string additionalName, bool blockMovement)
Constructor.
Boundary myMovingGeometryBoundary
boundary used during moving of elements
Stores the information about how to visualize structures.
std::vector< std::pair< std::string, std::string > > getGenericParameters() const
return generic parameters as vector of pairs format
Dialog to edit sequences, parameters, etc.. of Additionals.
PositionVector getShape() const
Returns additional element's shape.
virtual void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)=0
method for setting the attribute and letting the object perform additional changes ...
virtual void drawGL(const GUIVisualizationSettings &s) const =0
Draws the object.
void unselectAttributeCarrier(bool changeFlag=true)
unselect attribute carrier using GUIGlobalSelection
A NBNetBuilder extended by visualisation and editing capabilities.
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
void setDefaultValues()
change all attributes of additional with their default values (note: this cannot be undo) ...
virtual bool checkAdditionalChildRestriction() const
check restriction with the number of childs
std::vector< double > myShapeRotations
bool removeGenericParameter(const std::string &key)
remove generic parameter
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
void changeAdditionalID(const std::string &newID)
change ID of additional
A class that stores a 2D geometrical boundary.
std::vector< PositionVector > myChildConnectionPositions
Matrix with the Vertex's positions of connections between parents an their childs.
virtual std::string getAttribute(SumoXMLAttr key) const =0
virtual void commitGeometryMoving(const Position &oldPos, GNEUndoList *undoList)=0
commit geometry changes in the attributes of an element after use of moveGeometry(...)
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
virtual std::string getHierarchyName() const =0
get Hierarchy Name (Used in AC Hierarchy)
GNEViewNet * myViewNet
The GNEViewNet this additional element belongs.
void drawChildConnections() const
draw connections between Parent and childrens
void drawLockIcon(double size=0.5) const
draw lock icon
PositionVector myShape
The shape of the additional element.
GNEAdditional * getSecondAdditionalParent() const
A point in 2D or 3D with translation and scaling methods.
std::string myAdditionalName
name of additional
bool updateGenericParameterValue(const std::string &key, const std::string &newValue)
update value generic parameter
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
void selectAttributeCarrier(bool changeFlag=true)
virtual void moveGeometry(const Position &oldPos, const Position &offset)=0
change the position of the element geometry without saving in undoList
std::vector< double > myShapeLengths
The lengths of the shape parts.
void updateChildConnections()
update Connection's geometry
void sortAdditionalChilds()
sort childs (used by Rerouters and VSS)
~GNEAdditional()
Destructor.
An upper class for objects with additional parameters.
virtual void updateGeometry(bool updateGrid)=0
update pre-computed geometry information
Position myBlockIconOffset
The offSet of the block icon.
bool myBlockMovement
boolean to check if additional element is blocked (i.e. cannot be moved with mouse) ...
std::vector< GNEAdditional * > myAdditionalChilds
vector with the Additional childs
GNEAdditional * getFirstAdditionalParent() const
A road/street connecting two junctions (netedit-version)
void changeSecondAdditionalParent(const std::string &newAdditionalParentID)
change second additional parent of additional
GNEViewNet * getViewNet() const
Returns a pointer to GNEViewNet in which additional element is located.
GNEEdge * changeEdge(GNEEdge *oldEdge, const std::string &newEdgeID)
change edge of additional
An Element which don't belongs to GNENet but has influency in the simulation.
std::vector< std::pair< Position, double > > mySymbolsPositionAndRotation
position and rotation of every simbol over lane
std::string getGenericParametersStr() const
return generic parameters in string format
std::string generateAdditionalChildID(SumoXMLTag childTag)
gererate a new ID for an additional child
Static storage of an output device and its base (abstract) implementation.
static bool isRouteValid(const std::vector< GNEEdge *> &edges, bool report)
check if a route is valid
bool isValidAdditionalID(const std::string &newID) const
check if a new additional ID is valid
void mouseOverObject(const GUIVisualizationSettings &s) const
method for check if mouse is over objects
GNEAdditional & operator=(const GNEAdditional &)=delete
Invalidated assignment operator.
void addAdditionalChild(GNEAdditional *additional)
add additional child to this additional
void removeLaneChild(GNELane *lane)
remove lane child
void endGeometryMoving()
begin movement (used when user click over additional to start a movement, to avoid problems with prob...
bool checkAdditionalChildsOverlapping() const
check if childs are overlapped (Used by Rerouters)
const std::vector< GNEAdditional * > & getAdditionalChilds() const
return vector of additionals that have as Parent this edge (For example, Calibrators) ...
void startGeometryMoving()
A window containing a gl-object's parameter.
double myBlockIconRotation
The rotation of the block icon.
GNEAdditional * myFirstAdditionalParent
pointer to first Addititional parent
GNELane * changeLane(GNELane *oldLane, const std::string &newLaneID)
change lane of additional
void addLaneChild(GNELane *lane)
add lane child
Position myBlockIconPosition
position of the block icon
std::vector< GNELane * > myLaneChilds
vector with the lane childs of this additional
bool addGenericParameter(const std::string &key, const std::string &value)
add generic parameter
GNEAdditional * mySecondAdditionalParent
pointer to second Addititional parent
std::vector< GNEEdge * > myEdgeChilds
vector with the edge childs of this additional
virtual Position getPositionInView() const =0
Returns position of additional in view.