Eclipse SUMO - Simulation of Urban MObility
GNEChange_Children Class Reference

#include <GNEChange_Children.h>

Inheritance diagram for GNEChange_Children:
Collaboration diagram for GNEChange_Children:

Public Types

enum  Operation { MOVE_FRONT = 0, MOVE_BACK = 1 }
 

Public Member Functions

 GNEChange_Children (GNEDemandElement *demandElementParent, GNEDemandElement *demandElementChild, const Operation operation)
 Constructor for creating/deleting an additional element. More...
 
virtual FXuint size () const
 return actual size More...
 
 ~GNEChange_Children ()
 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

GNEDemandElementmyChildDemandElement
 demand element which position will be edited edited More...
 
std::vector< GNEDemandElement * > myEditedChildElements
 element childrens after apply operation More...
 
const Operation myOperation
 
const std::vector< GNEDemandElement * > myOriginalChildElements
 copy of child demand elementss before apply operation More...
 
GNEDemandElementmyParentDemandElement
 full information regarding the parent demand element element that will be modified More...
 

Detailed Description

A network change in which a additional element is created or deleted

Definition at line 40 of file GNEChange_Children.h.

Member Enumeration Documentation

◆ Operation

Enumerator
MOVE_FRONT 
MOVE_BACK 

Definition at line 45 of file GNEChange_Children.h.

Constructor & Destructor Documentation

◆ GNEChange_Children()

GNEChange_Children::GNEChange_Children ( GNEDemandElement demandElementParent,
GNEDemandElement demandElementChild,
const Operation  operation 
)

Constructor for creating/deleting an additional element.

Parameters
[in]additionalThe additional element to be created/deleted
[in]forwardWhether to create/delete (true/false)

Definition at line 37 of file GNEChange_Children.cpp.

◆ ~GNEChange_Children()

GNEChange_Children::~GNEChange_Children ( )

Destructor.

Definition at line 64 of file GNEChange_Children.cpp.

References GNEReferenceCounter::decRef(), and myParentDemandElement.

Member Function Documentation

◆ redo()

◆ redoName()

FXString GNEChange_Children::redoName ( ) const
virtual

get Redo name

Reimplemented from GNEChange.

Definition at line 163 of file GNEChange_Children.cpp.

References GNEAttributeCarrier::getTagStr(), GNEChange::myForward, myOperation, and myParentDemandElement.

◆ size()

FXuint GNEChange::size ( ) const
virtualinherited

return actual size

Definition at line 44 of file GNEChange.cpp.

◆ undo()

◆ undoName()

FXString GNEChange_Children::undoName ( ) const
virtual

return undoName

Reimplemented from GNEChange.

Definition at line 139 of file GNEChange_Children.cpp.

References GNEAttributeCarrier::getTagStr(), myChildDemandElement, GNEChange::myForward, and myOperation.

Field Documentation

◆ myChildDemandElement

GNEDemandElement* GNEChange_Children::myChildDemandElement
private

demand element which position will be edited edited

Definition at line 81 of file GNEChange_Children.h.

Referenced by redo(), undo(), and undoName().

◆ myEditedChildElements

std::vector<GNEDemandElement*> GNEChange_Children::myEditedChildElements
private

element childrens after apply operation

Definition at line 90 of file GNEChange_Children.h.

Referenced by redo(), and undo().

◆ myForward

◆ myNet

◆ myOperation

const Operation GNEChange_Children::myOperation
private

Definition at line 84 of file GNEChange_Children.h.

Referenced by redo(), redoName(), undo(), and undoName().

◆ myOriginalChildElements

const std::vector<GNEDemandElement*> GNEChange_Children::myOriginalChildElements
private

copy of child demand elementss before apply operation

Definition at line 87 of file GNEChange_Children.h.

Referenced by redo(), and undo().

◆ myParentDemandElement

GNEDemandElement* GNEChange_Children::myParentDemandElement
private

full information regarding the parent demand element element that will be modified

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

Definition at line 78 of file GNEChange_Children.h.

Referenced by redo(), redoName(), undo(), and ~GNEChange_Children().


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