153 bool addPolygon(
const std::string&
id,
const std::string& type,
const RGBColor& color,
double layer,
154 double angle,
const std::string& imgFile,
bool relativePath,
const PositionVector& shape,
155 bool geo,
bool fill,
double lineWidth,
bool ignorePruning =
false);
174 bool addPOI(
const std::string&
id,
const std::string& type,
const RGBColor& color,
const Position& pos,
bool geo,
175 const std::string& lane,
double posOverLane,
double posLat,
double layer,
double angle,
176 const std::string& imgFile,
bool relativePath,
double width,
double height,
bool ignorePruning =
false);
212 const std::string& suggestedName =
"",
bool wasSplit =
false,
bool allowDuplicateGeom =
false,
213 bool recomputeConnections =
true);
392 std::vector<GNEEdge*>
retrieveEdges(
bool onlySelected =
false);
397 std::vector<GNELane*>
retrieveLanes(
bool onlySelected =
false);
405 GNELane*
retrieveLane(
const std::string&
id,
bool failHard =
true,
bool checkVolatileChange =
false);
638 std::map<std::string, GNEEdge*>
edges;
641 std::map<SumoXMLTag, std::map<std::string, GNEAdditional*> >
additionals;
763 myTllcont(tllcont), myReplaced(replaced), myBy(by) { }
770 return "Redo replace in TLS";
775 return "Undo replace in TLS";
780 myTllcont.replaceRemoved(myBy, -1, myReplaced, -1);
785 myTllcont.replaceRemoved(myReplaced, -1, myBy, -1);
790 return myReplaced != myBy;
~GNEChange_ReplaceEdgeInTLS()
destructor
void setViewNet(GNEViewNet *viewNet)
Set the viewNet to be notified of network changes.
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...
The main window of the Netedit.
bool additionalExist(GNEAdditional *additional)
return true if additional exist (use pointer instead ID)
NBNetBuilder * getNetBuilder() const
get net builder
A container for traffic light definitions and built programs.
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.
void removeShape(GNEShape *shape)
remove created shape (but NOT delete)
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 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
const Boundary & getBoundary() const
returns the bounder of the network
std::vector< GNEAttributeCarrier * > getSelectedAttributeCarriers()
get all selected attribute carriers
A RT-tree for efficient storing of SUMO's GL-objects.
bool deleteAdditional(GNEAdditional *additional)
delete additional element of GNENet container
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 trigger objects for GNENet (busStops, chargingStations, detectors, etc..)
NBNetBuilder * myNetBuilder
The internal netbuilder.
bool netHasGNECrossings() const
check if net has GNECrossings
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
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 updateAdditionalID(const std::string &oldID, GNEAdditional *additional)
update additional ID in container
void splitJunction(GNEJunction *junction, GNEUndoList *undoList)
replace the selected junction by a list of junctions for each unique edge endpoint ...
bool removeRestrictedLane(SUMOVehicleClass vclass, GNEEdge &edge, GNEUndoList *undoList)
remove restricted lane
NBEdge * myBy
replaced by NBEdge
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 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.
void insertShape(GNEShape *shape)
insert shape
A point in 2D or 3D with translation and scaling methods.
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
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
void save(OptionsCont &oc)
save the network
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
FXString undoName() const
undo name
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
GNECrossing * retrieveCrossing(const std::string &id, bool failHard=true) const
get Crossing by id
void deleteSingleJunction(GNEJunction *junction)
deletes a single junction
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 removeSolitaryJunctions(GNEUndoList *undoList)
removes junctions that have no edges
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)
class for GNEChange_ReplaceEdgeInTLS
void computeEverything(GNEApplicationWindow *window, bool force=false, bool volatileOptions=false, std::string additionalPath="", std::string shapePath="")
trigger full netbuild computation param[in] window The window to inform about delay param[in] force W...
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)
const std::map< std::string, GNEAdditional * > & getAdditionalByType(SumoXMLTag type) const
get map with IDs and pointers to additionals
GNEEdge * addReversedEdge(GNEEdge *edge, GNEUndoList *undoList)
add reversed edge
void reserveEdgeID(const std::string &id)
reserve edge ID (To avoid duplicates)
void deleteSingleEdge(GNEEdge *edge)
deletes a single edge
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
bool myShapesSaved
Flag to check if shapes has to be saved.
A window containing a gl-object's parameter.
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.
void requiereSaveShapes(bool value)
inform that shapes has to be saved
NBEdge * myReplaced
replaced NBEdge
GNEViewNet * getViewNet() const
get view net
void saveShapes(const std::string &filename)
save shapes elements of the network