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 (GNENet *net, 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...
 
GNENetmyNet
 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< GNEAdditionalSet * > myAdditionalSetParents
 we need to preserve the list of additional sets in which this edge is a child More...
 
std::map< GNELane *, std::vector< GNEAdditionalSet * > > myAdditionalSetsLanes
 we need to preserve the additional sets in which the edge of lanes are childs More...
 
GNEEdgemyEdge
 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 55 of file GNEChange_Edge.h.

Constructor & Destructor Documentation

§ GNEChange_Edge()

GNEChange_Edge::GNEChange_Edge ( GNENet net,
GNEEdge edge,
bool  forward 
)

Constructor for creating/deleting an edge.

Parameters
[in]netThe net on which to apply changes
[in]edgeThe edge to be created/deleted
[in]forwardWhether to create/delete (true/false)

Definition at line 52 of file GNEChange_Edge.cpp.

§ ~GNEChange_Edge()

GNEChange_Edge::~GNEChange_Edge ( )

Destructor.

Definition at line 69 of file GNEChange_Edge.cpp.

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

Member Function Documentation

§ redo()

§ redoName()

FXString GNEChange_Edge::redoName ( ) const
virtual

get Redo name

Reimplemented from GNEChange.

Definition at line 205 of file GNEChange_Edge.cpp.

References GNEChange::myForward.

§ size()

FXuint GNEChange::size ( ) const
virtualinherited

return actual size

Definition at line 57 of file GNEChange.cpp.

§ undo()

§ undoName()

FXString GNEChange_Edge::undoName ( ) const
virtual

return undoName

Reimplemented from GNEChange.

Definition at line 196 of file GNEChange_Edge.cpp.

References GNEChange::myForward.

Field Documentation

§ myAdditionalChilds

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

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

Definition at line 93 of file GNEChange_Edge.h.

Referenced by redo(), and undo().

§ myAdditionalLanes

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

we need to preserve additional vinculated with the lanes of edge

Definition at line 99 of file GNEChange_Edge.h.

Referenced by redo(), and undo().

§ myAdditionalSetParents

std::vector<GNEAdditionalSet*> GNEChange_Edge::myAdditionalSetParents
private

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

Definition at line 96 of file GNEChange_Edge.h.

Referenced by redo(), and undo().

§ myAdditionalSetsLanes

std::map<GNELane*, std::vector<GNEAdditionalSet*> > GNEChange_Edge::myAdditionalSetsLanes
private

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

Definition at line 102 of file GNEChange_Edge.h.

Referenced by redo(), and undo().

§ myEdge

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 90 of file GNEChange_Edge.h.

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

§ myForward

§ myNet

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_Selection::redo(), GNEChange_Additional::redo(), GNEChange_Junction::redo(), GNEChange_Lane::redo(), redo(), GNEChange_Selection::undo(), GNEChange_Junction::undo(), GNEChange_Additional::undo(), GNEChange_Lane::undo(), and undo().


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