36 #ifdef CHECK_MEMORY_LEAKS
56 edge->incRef(
"GNEChange_Edge");
58 myAdditionalChilds = myEdge->getAdditionalChilds();
59 myAdditionalSetParents = myEdge->getAdditionalSets();
61 for (std::vector<GNELane*>::const_iterator i = myEdge->getLanes().begin(); i != myEdge->getLanes().end(); i++) {
63 myAdditionalLanes[*i] = (*i)->getAdditionalChilds();
64 myAdditionalSetsLanes[*i] = (*i)->getAdditionalSetParents();
87 (*i)->removeEdgeChild(
myEdge);
89 if ((*i)->getNumberOfEdgeChilds() == 0) {
95 for (std::vector<GNEAdditional*>::iterator j = i->second.begin(); j != i->second.end(); j++) {
101 for (std::vector<GNEAdditionalSet*>::iterator j = i->second.begin(); j != i->second.end(); j++) {
102 (*j)->removeLaneChild(i->first);
104 if ((*j)->getNumberOfLaneChilds() == 0) {
118 (*i)->addEdgeChild(
myEdge);
122 for (std::vector<GNEAdditional*>::iterator j = i->second.begin(); j != i->second.end(); j++) {
128 for (std::vector<GNEAdditionalSet*>::iterator j = i->second.begin(); j != i->second.end(); j++) {
130 (*j)->addLaneChild(i->first);
147 (*i)->addEdgeChild(
myEdge);
151 for (std::vector<GNEAdditional*>::iterator j = i->second.begin(); j != i->second.end(); j++) {
157 for (std::vector<GNEAdditionalSet*>::iterator j = i->second.begin(); j != i->second.end(); j++) {
159 (*j)->addLaneChild(i->first);
170 (*i)->removeEdgeChild(
myEdge);
172 if ((*i)->getNumberOfEdgeChilds() == 0) {
178 for (std::vector<GNEAdditional*>::iterator j = i->second.begin(); j != i->second.end(); j++) {
184 for (std::vector<GNEAdditionalSet*>::iterator j = i->second.begin(); j != i->second.end(); j++) {
185 (*j)->removeLaneChild(i->first);
187 if ((*j)->getNumberOfLaneChilds() == 0) {
198 return (
"Undo create edge");
200 return (
"Undo delete edge");
207 return (
"Redo create edge");
209 return (
"Redo delete edge");
the function-object for an editing operation (abstract base)
std::map< GNELane *, std::vector< GNEAdditionalSet * > > myAdditionalSetsLanes
we need to preserve the additional sets in which the edge of lanes are childs
A NBNetBuilder extended by visualisation and editing capabilities.
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
void insertEdge(GNEEdge *edge)
inserts a single edge into the net and into the underlying netbuild-container
std::vector< GNEAdditional * > myAdditionalChilds
we need to preserve the list of additionals vinculated with this edge
FXString redoName() const
get Redo name
FXString undoName() const
return undoName
std::vector< GNEAdditionalSet * > myAdditionalSetParents
we need to preserve the list of additional sets in which this edge is a child
void decRef(const std::string &debugMsg="")
A road/street connecting two junctions (netedit-version)
GNENet * myNet
the net to which operations shall be applied or which shall be informed about gui updates (we are not...
std::map< GNELane *, std::vector< GNEAdditional * > > myAdditionalLanes
we need to preserve additional vinculated with the lanes of edge
GNEEdge * myEdge
full information regarding the edge that is to be created/deleted
bool myForward
we group antagonistic commands (create junction/delete junction) and keep them apart by this flag ...
void deleteAdditional(GNEAdditional *additional)
delete additional element previously inserted
void deleteSingleEdge(GNEEdge *edge)
deletes a single edge
void insertAdditional(GNEAdditional *additional, bool hardFail=true)
Insert a additional element previously created in GNEAdditionalHandler.
~GNEChange_Edge()
Destructor.