SUMO - Simulation of Urban MObility
GNEChange_Edge Class Reference

#include <GNEChange_Edge.h>

Inheritance diagram for GNEChange_Edge:
Inheritance graph
Collaboration diagram for GNEChange_Edge:
Collaboration graph

Public Member Functions

 GNEChange_Edge (GNEEdge *edge, bool forward)
 Constructor for creating/deleting an edge. More...
 
virtual FXuint size () const
 return actual size More...
 
 ~GNEChange_Edge ()
 Destructor. More...
 
inherited from GNEChange

get undo Name

FXString undoName () const
 return undoName More...
 
FXString redoName () const
 get Redo name More...
 
void undo ()
 undo action More...
 
void redo ()
 redo action More...
 

Protected Attributes

bool myForward
 we group antagonistic commands (create junction/delete junction) and keep them apart by this flag More...
 
GNENet * myNet
 the net to which operations shall be applied or which shall be informed about gui updates (we are not responsible for the pointer) More...
 

Private Attributes

std::vector< GNEAdditional * > myAdditionalChilds
 we need to preserve the list of additionals vinculated with this edge More...
 
std::map< GNELane *, std::vector< GNEAdditional * > > myAdditionalLanes
 we need to preserve additional vinculated with the lanes of edge More...
 
std::vector< GNEAdditional * > myAdditionalParents
 we need to preserve the list of additional sets in which this edge is a child More...
 
std::map< GNELane *, std::vector< GNEAdditional * > > myAdditionalsLanes
 we need to preserve the additional sets in which the edge of lanes are childs More...
 
GNEEdge * myEdge
 full information regarding the edge that is to be created/deleted More...
 

Detailed Description

A network change in which a single edge is created or deleted

Definition at line 54 of file GNEChange_Edge.h.

Constructor & Destructor Documentation

GNEChange_Edge::GNEChange_Edge ( GNEEdge *  edge,
bool  forward 
)

Constructor for creating/deleting an edge.

constructor for creating an edge

Parameters
[in]edgeThe edge to be created/deleted
[in]forwardWhether to create/delete (true/false)

Definition at line 51 of file GNEChange_Edge.cpp.

GNEChange_Edge::~GNEChange_Edge ( )

Destructor.

Definition at line 61 of file GNEChange_Edge.cpp.

References GNEReferenceCounter::decRef(), myEdge, and GNEReferenceCounter::unreferenced().

Member Function Documentation

void GNEChange_Edge::redo ( )
virtual
FXString GNEChange_Edge::redoName ( ) const
virtual

get Redo name

Reimplemented from GNEChange.

Definition at line 117 of file GNEChange_Edge.cpp.

References GNEChange::myForward, SUMO_TAG_EDGE, and toString().

FXuint GNEChange::size ( ) const
virtualinherited

return actual size

Definition at line 57 of file GNEChange.cpp.

void GNEChange_Edge::undo ( )
virtual
FXString GNEChange_Edge::undoName ( ) const
virtual

return undoName

Reimplemented from GNEChange.

Definition at line 107 of file GNEChange_Edge.cpp.

References GNEChange::myForward, SUMO_TAG_EDGE, and toString().

Field Documentation

std::vector<GNEAdditional*> GNEChange_Edge::myAdditionalChilds
private

we need to preserve the list of additionals vinculated with this edge

Definition at line 91 of file GNEChange_Edge.h.

Referenced by redo(), and undo().

std::map<GNELane*, std::vector<GNEAdditional*> > GNEChange_Edge::myAdditionalLanes
private

we need to preserve additional vinculated with the lanes of edge

Definition at line 97 of file GNEChange_Edge.h.

std::vector<GNEAdditional*> GNEChange_Edge::myAdditionalParents
private

we need to preserve the list of additional sets in which this edge is a child

Definition at line 94 of file GNEChange_Edge.h.

std::map<GNELane*, std::vector<GNEAdditional*> > GNEChange_Edge::myAdditionalsLanes
private

we need to preserve the additional sets in which the edge of lanes are childs

Definition at line 100 of file GNEChange_Edge.h.

GNEEdge* GNEChange_Edge::myEdge
private

full information regarding the edge that is to be created/deleted

Note
we assume shared responsibility for the pointer (via reference counting)

Definition at line 88 of file GNEChange_Edge.h.

Referenced by redo(), undo(), and ~GNEChange_Edge().

GNENet* GNEChange::myNet
protectedinherited

the net to which operations shall be applied or which shall be informed about gui updates (we are not responsible for the pointer)

Definition at line 82 of file GNEChange.h.

Referenced by GNEChange_Junction::redo(), GNEChange_Selection::redo(), GNEChange_Lane::redo(), GNEChange_Additional::redo(), redo(), GNEChange_Crossing::redo(), GNEChange_Junction::undo(), GNEChange_Selection::undo(), GNEChange_Lane::undo(), GNEChange_Additional::undo(), undo(), and GNEChange_Crossing::undo().


The documentation for this class was generated from the following files: