 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
16 #ifndef GNEAdditional_h
17 #define GNEAdditional_h
70 const std::vector<GNEEdge*>& parentEdges,
71 const std::vector<GNELane*>& parentLanes,
72 const std::vector<GNEShape*>& parentShapes,
73 const std::vector<GNEAdditional*>& parentAdditionals,
74 const std::vector<GNEDemandElement*>& parentDemandElements,
75 const std::vector<GNEEdge*>& childEdges,
76 const std::vector<GNELane*>& childLanes,
77 const std::vector<GNEShape*>& childShapes,
78 const std::vector<GNEAdditional*>& childAdditionals,
79 const std::vector<GNEDemandElement*>& childDemandElements);
100 const std::vector<GNEEdge*>& parentEdges,
101 const std::vector<GNELane*>& parentLanes,
102 const std::vector<GNEShape*>& parentShapes,
103 const std::vector<GNEAdditional*>& parentAdditionals,
104 const std::vector<GNEDemandElement*>& parentDemandElements,
105 const std::vector<GNEEdge*>& childEdges,
106 const std::vector<GNELane*>& childLanes,
107 const std::vector<GNEShape*>& childShapes,
108 const std::vector<GNEAdditional*>& childAdditionals,
109 const std::vector<GNEDemandElement*>& childDemandElements);
void writeAdditional(OutputDevice &device) const
writte additional element into a xml file
void enableAttribute(SumoXMLAttr key, GNEUndoList *undoList)
bool isAdditionalBlocked() const
Check if additional item is currently blocked (i.e. cannot be moved with mouse)
Position position
position of the block icon
virtual Position getPositionInView() const =0
Returns position of additional in view.
An Element which don't belongs to GNENet but has influency in the simulation.
A window containing a gl-object's parameter.
GNEAdditional(const std::string &id, GNEViewNet *viewNet, GUIGlObjectType type, SumoXMLTag tag, std::string additionalName, bool blockMovement, const std::vector< GNEEdge * > &parentEdges, const std::vector< GNELane * > &parentLanes, const std::vector< GNEShape * > &parentShapes, const std::vector< GNEAdditional * > &parentAdditionals, const std::vector< GNEDemandElement * > &parentDemandElements, const std::vector< GNEEdge * > &childEdges, const std::vector< GNELane * > &childLanes, const std::vector< GNEShape * > &childShapes, const std::vector< GNEAdditional * > &childAdditionals, const std::vector< GNEDemandElement * > &childDemandElements)
Constructor.
virtual std::string getPopUpID() const =0
get PopPup ID (Used in AC Hierarchy)
const std::string & getAdditionalID() const
An upper class for objects with additional parameters.
virtual Boundary getCenteringBoundary() const =0
Returns the boundary to which the view shall be centered in order to show the object.
Static storage of an output device and its base (abstract) implementation.
void setRotation(GNELane *additionalLane=nullptr)
set Rotation of block Icon (must be called in updateGeometry() function)
Boundary movingGeometryBoundary
boundary used during moving of elements (to avoid insertion in RTREE
std::string generateChildID(SumoXMLTag childTag)
gererate a new ID for an element child
void setDefaultValues()
change all attributes of additional with their default values (note: this cannot be undo)
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 bool isAdditionalValid() const
check if current additional is valid to be writed into XML (by default true, can be reimplemented in ...
virtual void drawGL(const GUIVisualizationSettings &s) const =0
Draws the object.
struct for pack all variables and functions related with Block Icon
void changeAdditionalID(const std::string &newID)
change ID of additional
void unselectAttributeCarrier(bool changeFlag=true)
unselect attribute carrier using GUIGlobalSelection
std::string secondOriginalPosition
value for saving second original position over lane before moving
BlockIcon myBlockIcon
variable BlockIcon
GNEAdditional * myAdditional
pointer to parent additional
SumoXMLTag
Numbers representing SUMO-XML - element names.
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
virtual std::string getAdditionalProblem() const
return a string with the current additional problem (by default empty, can be reimplemented in childr...
const RGBColor * mySpecialColor
pointer to special color (used for drawing Additional with a certain color, mainly used for selection...
AdditionalMove myMove
variable AdditionalMove
An special type of Attribute carrier that owns hierarchical elements.
GNEViewNet * myViewNet
The GNEViewNet this additional element belongs.
const GNEGeometry::SegmentGeometry & getAdditionalSegmentGeometry() const
obtain additional segment geometry
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
virtual std::string getAttribute(SumoXMLAttr key) const =0
struct for pack all variables related with geometry of elemements divided in segments
bool isValidDetectorID(const std::string &newID) const
check if a new detector ID is valid
void setEnabledAttribute(const int enabledAttributes)
method for enabling the attribute and nothing else (used in GNEChange_EnableAttribute)
virtual std::string getHierarchyName() const =0
get Hierarchy Name (Used in AC Hierarchy)
const GNEGeometry::Geometry & getAdditionalGeometry() const
obtain additional geometry
BlockIcon(GNEAdditional *additional)
constructor
void selectAttributeCarrier(bool changeFlag=true)
AdditionalMove & operator=(const AdditionalMove &other)=delete
Invalidated assignment operator.
A class that stores a 2D geometrical boundary.
A point in 2D or 3D with translation and scaling methods.
GNEGeometry::Geometry myAdditionalGeometry
geometry to be precomputed in updateGeometry(...)
std::string myAdditionalName
name of additional
struct for pack all variables related with geometry of stop
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
virtual double getAttributeDouble(SumoXMLAttr key) const =0
bool myBlockMovement
boolean to check if additional element is blocked (i.e. cannot be moved with mouse)
double rotation
The rotation of the block icon.
~GNEAdditional()
Destructor.
void setSpecialColor(const RGBColor *color)
set special color
void drawIcon(const GUIVisualizationSettings &s, const double exaggeration, const double size=0.5) const
draw lock icon
void disableAttribute(SumoXMLAttr key, GNEUndoList *undoList)
virtual bool checkChildAdditionalRestriction() const
check restriction with the number of children
const std::string & getOptionalAdditionalName() const
Returns the additional name.
GNEViewNet * getViewNet() const
Returns a pointer to GNEViewNet in which additional element is located.
bool drawUsingSelectColor() const
check if attribute carrier must be drawn using selecting color.
An special type of Attribute carrier that owns hierarchical elements.
virtual void commitGeometryMoving(GNEUndoList *undoList)=0
commit geometry changes in the attributes of an element after use of moveGeometry(....
virtual void moveGeometry(const Position &offset)=0
change the position of the element geometry without saving in undoList
virtual bool isAttributeEnabled(SumoXMLAttr key) const =0
void endGeometryMoving()
begin movement (used when user click over additional to start a movement, to avoid problems with prob...
BlockIcon & operator=(const BlockIcon &other)=delete
Invalidated assignment operator.
void startGeometryMoving()
Stores the information about how to visualize structures.
GNEGeometry::SegmentGeometry mySegmentGeometry
segment geometry to be precomputed in updateGeometry(...) (used by E2Multilane)
bool isValidAdditionalID(const std::string &newID) const
check if a new additional ID is valid
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
virtual void updateGeometry()=0
update pre-computed geometry information
Position originalViewPosition
value for saving first original position over lane before moving
GNEAdditional & operator=(const GNEAdditional &)=delete
Invalidated assignment operator.
std::string firstOriginalLanePosition
value for saving first original position over lane before moving
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
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
virtual void splitEdgeGeometry(const double splitPosition, const GNENetElement *originalElement, const GNENetElement *newElement, GNEUndoList *undoList)=0
split geometry
virtual void fixAdditionalProblem()
fix additional problem (by default throw an exception, has to be reimplemented in children)
Position offset
The offSet of the block icon.
struct for pack all variables related with additional move