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