99 std::map<std::string, GNEEdge*>
edges;
102 std::map<SumoXMLTag, std::map<std::string, GNEAdditional*> >
additionals;
174 bool addPolygon(
const std::string&
id,
const std::string& type,
const RGBColor& color,
double layer,
175 double angle,
const std::string& imgFile,
bool relativePath,
const PositionVector& shape,
176 bool geo,
bool fill,
double lineWidth,
bool ignorePruning =
false);
195 bool addPOI(
const std::string&
id,
const std::string& type,
const RGBColor& color,
const Position& pos,
bool geo,
196 const std::string& lane,
double posOverLane,
double posLat,
double layer,
double angle,
197 const std::string& imgFile,
bool relativePath,
double width,
double height,
bool ignorePruning =
false);
233 const std::string& suggestedName =
"",
bool wasSplit =
false,
bool allowDuplicateGeom =
false,
234 bool recomputeConnections =
true);
428 std::vector<GNEEdge*>
retrieveEdges(
bool onlySelected =
false);
433 std::vector<GNELane*>
retrieveLanes(
bool onlySelected =
false);
441 GNELane*
retrieveLane(
const std::string&
id,
bool failHard =
true,
bool checkVolatileChange =
false);
874 myTllcont(tllcont), myReplaced(replaced), myBy(by) { }
881 return "Redo replace in TLS";
886 return "Undo replace in TLS";
891 myTllcont.replaceRemoved(myBy, -1, myReplaced, -1);
896 myTllcont.replaceRemoved(myReplaced, -1, myBy, -1);
901 return myReplaced != myBy;
~GNEChange_ReplaceEdgeInTLS()
destructor
void setViewNet(GNEViewNet *viewNet)
Set the viewNet to be notified of network changes.
const AttributeCarriers & getAttributeCarriers() const
retrieve all attribute carriers of Net
GNEJunction * splitEdge(GNEEdge *edge, const Position &pos, GNEUndoList *undoList, GNEJunction *newJunction=0)
split edge at position by inserting a new junction
bool addRestrictedLane(SUMOVehicleClass vclass, GNEEdge &edge, int index, GNEUndoList *undoList)
add restricted lane to edge
std::vector< GNEJunction * > retrieveJunctions(bool onlySelected=false)
return all junctions
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
void initJunctionsAndEdges()
Init Junctions and edges.
void insertAdditional(GNEAdditional *additional)
Insert a additional element int GNENet container.
std::vector< GNELane * > retrieveLanes(bool onlySelected=false)
return all lanes
GNEViewNet * myViewNet
The viewNet to be notofied of about changes.
SumoXMLTag
Numbers representing SUMO-XML - element names.
NBTrafficLightLogicCont & myTllcont
container for traffic light logic
the function-object for an editing operation (abstract base)
GNEEdge * retrieveEdge(const std::string &id, bool failHard=true)
get edge by id
IDSupplier myEdgeIDSupplier
SUMORTree myGrid
the rtree which contains all GUIGlObjects (so named for historical reasons)
std::map< std::string, GNEEdge * > edges
map with the name and pointer to edges of net
FXApp * getApp()
get pointer to the main App
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
void splitJunction(GNEJunction *junction, bool reconnect, GNEUndoList *undoList)
replace the selected junction by a list of junctions for each unique edge endpoint ...
The main window of the Netedit.
NBNetBuilder * getNetBuilder() const
get net builder
A container for traffic light definitions and built programs.
void deleteDemandElement(GNEDemandElement *demandElement, GNEUndoList *undoList)
remove demand element
void deleteSingleEdge(GNEEdge *edge, bool updateViewAfterDeleting)
deletes a single edge
std::map< SumoXMLTag, std::map< std::string, GNEAdditional * > > additionals
map with the name and pointer to additional elements of net
GNEAttributeCarrier * retrieveAttributeCarrier(const GUIGlID id, bool failHard=true)
get a single attribute carrier based on a GLID
Stores the information about how to visualize structures.
std::vector< GNEAttributeCarrier * > getSelectedAttributeCarriers(bool ignoreCurrentSupermode)
get all selected attribute carriers (or only relative to current supermode
GNEConnection * retrieveConnection(const std::string &id, bool failHard=true) const
get Connection by id
The representation of a single edge during network building.
GNEPOI * retrievePOI(const std::string &id, bool failHard=true) const
get POI by id
void saveDemandElementsConfirmed(const std::string &filename)
save demand elements after confirming invalid objects
void reverseEdge(GNEEdge *edge, GNEUndoList *undoList)
reverse edge
void update()
notify myViewNet
void insertJunction(GNEJunction *junction)
inserts a single junction into the net and into the underlying netbuild-container ...
void deleteShape(GNEShape *shape, GNEUndoList *undoList)
remove shape
GNEPoly * retrievePolygon(const std::string &id, bool failHard=true) const
get Polygon by id
void deleteConnection(GNEConnection *connection, GNEUndoList *undoList)
remove connection
void resetJunctionConnections(GNEJunction *junction, GNEUndoList *undoList)
reset junction's connections
A NBNetBuilder extended by visualisation and editing capabilities.
GNEEdge * createEdge(GNEJunction *src, GNEJunction *dest, GNEEdge *tpl, GNEUndoList *undoList, const std::string &suggestedName="", bool wasSplit=false, bool allowDuplicateGeom=false, bool recomputeConnections=true)
creates a new edge (unless an edge with the same geometry already exists)
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
std::vector< GNEConnection * > retrieveConnections(bool onlySelected=false) const
return all connections
void addExplicitTurnaround(std::string id)
add edge id to the list of explicit turnarounds
bool myAllowUndoShapes
flag used to indicate if shaped created can be undo
bool cleanInvalidCrossings(GNEUndoList *undoList)
clear invalid crossings
int getNumberOfAdditionals(SumoXMLTag type=SUMO_TAG_NOTHING) const
Returns the number of additionals of the net.
Storage for geometrical objects.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
void insertEdge(GNEEdge *edge)
inserts a single edge into the net and into the underlying netbuild-container
std::map< std::string, GNEDemandElement * > vehicleDepartures
special map used for saving Demand Elements of type "Vehicle" (Vehicles, routeFlows, etc.) sorted by depart time
const Boundary & getBoundary() const
returns the bounder of the network
A RT-tree for efficient storing of SUMO's GL-objects.
void cleanInvalidDemandElements(GNEUndoList *undoList)
clean invalid demand elements
GNEJunction * registerJunction(GNEJunction *junction)
registers a junction with GNENet containers
A class that stores a 2D geometrical boundary.
bool myNeedRecompute
whether the net needs recomputation
Builds additional objects for GNENet (busStops, chargingStations, detectors, etc..)
NBNetBuilder * myNetBuilder
The internal netbuilder.
bool netHasGNECrossings() const
check if net has GNECrossings
bool isDemandElementsSaved() const
check if demand elements are saved
void saveTLSPrograms(const std::string &filename)
save TLS Programs elements of the network
bool restrictLane(SUMOVehicleClass vclass, GNELane *lane, GNEUndoList *undoList)
transform lane to restricted lane
std::string generateShapeID(SumoXMLTag shapeTag) const
generate Shape ID
void joinRoutes(GNEUndoList *undoList)
join routes
bool myAdditionalsSaved
Flag to check if additionals has to be saved.
void renameJunction(GNEJunction *junction, const std::string &newID)
updates the map and reserves new id
GNEAdditional * retrieveAdditional(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named additional.
IDSupplier myJunctionIDSupplier
std::map< std::string, int > myEdgesAndNumberOfLanes
map with the Edges and their number of lanes
static const double Z_INITIALIZED
marker for whether the z-boundary is initialized
void removeShape(GNEShape *shape, bool updateViewAfterDeleting)
remove created shape (but NOT delete)
void updateAdditionalID(const std::string &oldID, GNEAdditional *additional)
update additional ID in container
bool removeRestrictedLane(SUMOVehicleClass vclass, GNEEdge &edge, GNEUndoList *undoList)
remove restricted lane
std::vector< GNEDemandElement * > retrieveDemandElements(bool onlySelected=false) const
return all demand elements
NBEdge * myBy
replaced by NBEdge
void deleteAdditional(GNEAdditional *additional, GNEUndoList *undoList)
remove additional
GNEPoly * addPolygonForEditShapes(GNENetElement *netElement, const PositionVector &shape, bool fill, RGBColor col)
Builds a special polygon used for edit Junctions's shapes.
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
void saveAdditionalsConfirmed(const std::string &filename)
save additionals after confirming invalid objects
void enableUpdateGeometry()
void deleteLane(GNELane *lane, GNEUndoList *undoList, bool recomputeConnections)
removes lane
NBEdgeCont & getEdgeCont()
returns the NBEdgeCont of the underlying netbuilder
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
GNEDemandElement * retrieveDemandElement(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named demand element.
A point in 2D or 3D with translation and scaling methods.
bool isUpdateGeometryEnabled() const
check if update geometry after inserting or removing has to be updated
GNEJunction * retrieveJunction(const std::string &id, bool failHard=true)
get junction by id
bool joinSelectedJunctions(GNEUndoList *undoList)
join selected junctions
Boundary myZBoundary
the z boundary (stored in the x-coordinate), values of 0 are ignored
void removeGLObjectFromGrid(GUIGlObject *o)
add GL Object into net
void replaceIncomingEdge(GNEEdge *which, GNEEdge *by, GNEUndoList *undoList)
replaces edge
bool trueChange()
wether original and new value differ
int getNumberOfDemandElements(SumoXMLTag type=SUMO_TAG_NOTHING) const
Returns the number of demand elements of the net.
bool additionalExist(GNEAdditional *additional) const
return true if additional exist (use pointer instead ID)
void requiereSaveDemandElements(bool value)
inform that demand elements has to be saved
bool addPOI(const std::string &id, const std::string &type, const RGBColor &color, const Position &pos, bool geo, const std::string &lane, double posOverLane, double posLat, double layer, double angle, const std::string &imgFile, bool relativePath, double width, double height, bool ignorePruning=false)
Builds a POI using the given values and adds it to the container.
void computeJunction(GNEJunction *junction)
trigger recomputation of junction shape and logic param[in] window The window to inform about delay ...
void requiereSaveAdditionals(bool value)
inform that additionals has to be saved
Storage for edges, including some functionality operating on multiple edges.
void initGNEConnections()
initialize GNEConnections
bool isAdditionalsSaved() const
check if additionals are saved
void updateDemandElementID(const std::string &oldID, GNEDemandElement *demandElement)
update demand element ID in container
std::map< SumoXMLTag, std::map< std::string, GNEDemandElement * > > demandElements
map with the name and pointer to demand elements of net
void save(OptionsCont &oc)
save the network
void cleanUnusedRoutes(GNEUndoList *undoList)
clean unused routes
void deleteCrossing(GNECrossing *crossing, GNEUndoList *undoList)
remove crossing
void changeShapeID(GNEShape *s, const std::string &OldID)
change Shape ID
GNEJunction * createJunction(const Position &pos, GNEUndoList *undoList)
creates a new junction
std::vector< GNEShape * > retrieveShapes(SumoXMLTag shapeTag, bool onlySelected=false)
return shape by type shapes
std::string generateDemandElementID(const std::string &prefix, SumoXMLTag type) const
generate demand element id
FXString undoName() const
undo name
void insertShape(GNEShape *shape, bool updateViewAfterDeleting)
insert shape
SUMORTree & getVisualisationSpeedUp()
Returns the RTree used for visualisation speed-up.
std::vector< GNEAttributeCarrier * > retrieveAttributeCarriers(SumoXMLTag type=SUMO_TAG_NOTHING)
get the attribute carriers based on Type
std::set< std::string > myExplicitTurnarounds
list of edge ids for which turn-arounds must be added explicitly
bool checkJunctionPosition(const Position &pos)
return true if there are already a Junction in the given position, false in other case ...
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
void replaceJunctionByGeometry(GNEJunction *junction, GNEUndoList *undoList)
replace the selected junction by geometry node(s) and merge the edges
A road/street connecting two junctions (netedit-version)
void reserveJunctionID(const std::string &id)
reserve junction ID (To avoid duplicates)
friend class GNEChange_CalibratorItem
void duplicateLane(GNELane *lane, GNEUndoList *undoList, bool recomputeConnections)
duplicates lane
void updateDemandElementBegin(const std::string &oldBegin, GNEDemandElement *demandElement)
update demand element begin in container
GNECrossing * retrieveCrossing(const std::string &id, bool failHard=true) const
get Crossing by id
Builds trigger objects for GNENet (busStops, chargingStations, detectors, etc..)
bool myDemandElementsSaved
Flag to check if demand elements has to be saved.
const Boundary & getZBoundary() const
Returns the Z boundary (stored in the x() coordinate) values of 0 do not affect the boundary...
std::string generateAdditionalID(SumoXMLTag type) const
generate additional id
void deleteEdge(GNEEdge *edge, GNEUndoList *undoList, bool recomputeConnections)
removes edge
std::vector< GNEEdge * > retrieveEdges(bool onlySelected=false)
return all edges
GNEEdge * registerEdge(GNEEdge *edge)
registers an edge with GNENet containers
GNENet(NBNetBuilder *netBuilder)
Constructor.
An Element which don't belongs to GNENet but has influency in the simulation.
std::vector< GNEAdditional * > retrieveAdditionals(bool onlySelected=false) const
return all additionals
Instance responsible for building networks.
FXString redoName() const
get Redo name
void computeNetwork(GNEApplicationWindow *window, bool force=false, bool volatileOptions=false, std::string additionalPath="", std::string demandPath="")
trigger full netbuild computation param[in] window The window to inform about delay param[in] force W...
void removeSolitaryJunctions(GNEUndoList *undoList)
removes junctions that have no edges
bool myUpdateGeometryEnabled
Flag to enable or disable update geometry of elements after inserting or removing element in net...
void requiereSaveNet(bool value)
inform that net has to be saved
struct used for saving all attribute carriers of net, in different formats
AttributeCarriers myAttributeCarriers
AttributeCarriers of net.
A storage for options typed value containers)
void deleteSingleJunction(GNEJunction *junction, bool updateViewAfterDeleting)
deletes a single junction
void computeDemandElements(GNEApplicationWindow *window)
compute demand elements param[in] window The window to inform about delay
class for GNEChange_ReplaceEdgeInTLS
void clearJunctionConnections(GNEJunction *junction, GNEUndoList *undoList)
clear junction's connections
void computeAndUpdate(OptionsCont &oc, bool volatileOptions)
recompute the network and update lane geometries
int getNumberOfShapes() const
get number of shapes
void renameEdge(GNEEdge *edge, const std::string &newID)
updates the map and reserves new id
static void replaceInListAttribute(GNEAttributeCarrier *ac, SumoXMLAttr key, const std::string &which, const std::string &by, GNEUndoList *undoList)
void deleteJunction(GNEJunction *junction, GNEUndoList *undoList)
removes junction and all incident edges
bool myTLSProgramsSaved
Flag to check if shapes has to be saved.
std::map< std::string, GNEJunction * > junctions
map with the name and pointer to junctions of net
std::vector< GNECrossing * > retrieveCrossings(bool onlySelected=false) const
return all crossings
void removeExplicitTurnaround(std::string id)
remove edge id from the list of explicit turnarounds
void saveJoined(OptionsCont &oc)
save log of joined junctions (and nothing else)
GNEEdge * addReversedEdge(GNEEdge *edge, GNEUndoList *undoList)
add reversed edge
void saveDemandElements(const std::string &filename)
save demand element elements of the network
void reserveEdgeID(const std::string &id)
reserve edge ID (To avoid duplicates)
void disableUpdateGeometry()
disable update geometry of elements after inserting or removing an element in net ...
bool demandElementExist(GNEDemandElement *demandElement) const
return true if demand element exist (use pointer instead ID)
void removePolygonForEditShapes(GNEPoly *polygon)
remove Polygon for edit shapes
void mergeJunctions(GNEJunction *moved, GNEJunction *target, GNEUndoList *undoList)
merge the given junctions edges between the given junctions will be deleted
void requiereSaveTLSPrograms()
void addGLObjectIntoGrid(GUIGlObject *o)
add GL Object into net
GNEChange_ReplaceEdgeInTLS(NBTrafficLightLogicCont &tllcont, NBEdge *replaced, NBEdge *by)
constructor
GNELane * retrieveLane(const std::string &id, bool failHard=true, bool checkVolatileChange=false)
get lane by id
A window containing a gl-object's parameter.
void insertDemandElement(GNEDemandElement *demandElement)
Insert a demand element element int GNENet container.
void changeEdgeEndpoints(GNEEdge *edge, const std::string &newSourceID, const std::string &newDestID)
modifies endpoins of the given edge
NBTrafficLightLogicCont & getTLLogicCont()
returns the tllcont of the underlying netbuilder
int getNumberOfTLSPrograms() const
get number of TLS Programs
void saveAdditionals(const std::string &filename)
save additional elements of the network
bool myNetSaved
Flag to check if net has to be saved.
void savePlain(OptionsCont &oc)
save plain xml representation of the network (and nothing else)
void splitEdgesBidi(GNEEdge *edge, GNEEdge *oppositeEdge, const Position &pos, GNEUndoList *undoList)
split all edges at position by inserting one new junction
void requireRecompute()
inform the net about the need for recomputation
bool isNetSaved() const
return if net has to be saved
bool addPolygon(const std::string &id, const std::string &type, const RGBColor &color, double layer, double angle, const std::string &imgFile, bool relativePath, const PositionVector &shape, bool geo, bool fill, double lineWidth, bool ignorePruning=false)
Builds a polygon using the given values and adds it to the container.
An Element which don't belongs to GNENet but has influency in the simulation.
NBEdge * myReplaced
replaced NBEdge
GNEViewNet * getViewNet() const
get view net