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

GNEDemandElementmyDemandElementChild
 demand element which position will be edited edited More...
 
GNEDemandElementmyDemandElementParent
 full information regarding the demand element parent element that will be modified More...
 
std::vector< GNEDemandElement * > myEditedElementChildren
 element childrens after apply operation More...
 
const Operation myOperation
 
const std::vector< GNEDemandElement * > myOriginalElementChildren
 copy of demand element childrens before apply operation More...
 

Detailed Description

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

Definition at line 41 of file GNEChange_Children.h.

Member Enumeration Documentation

◆ Operation

Enumerator
MOVE_FRONT 
MOVE_BACK 

Definition at line 46 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 38 of file GNEChange_Children.cpp.

◆ ~GNEChange_Children()

GNEChange_Children::~GNEChange_Children ( )

Destructor.

Definition at line 65 of file GNEChange_Children.cpp.

References GNEReferenceCounter::decRef(), and myDemandElementParent.

Member Function Documentation

◆ redo()

◆ redoName()

FXString GNEChange_Children::redoName ( ) const
virtual

get Redo name

Reimplemented from GNEChange.

Definition at line 164 of file GNEChange_Children.cpp.

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

◆ size()

FXuint GNEChange::size ( ) const
virtualinherited

return actual size

Definition at line 45 of file GNEChange.cpp.

Referenced by GNELane::isValid().

◆ undo()

◆ undoName()

FXString GNEChange_Children::undoName ( ) const
virtual

return undoName

Reimplemented from GNEChange.

Definition at line 140 of file GNEChange_Children.cpp.

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

Field Documentation

◆ myDemandElementChild

GNEDemandElement* GNEChange_Children::myDemandElementChild
private

demand element which position will be edited edited

Definition at line 82 of file GNEChange_Children.h.

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

◆ myDemandElementParent

GNEDemandElement* GNEChange_Children::myDemandElementParent
private

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

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

Definition at line 79 of file GNEChange_Children.h.

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

◆ myEditedElementChildren

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

element childrens after apply operation

Definition at line 91 of file GNEChange_Children.h.

Referenced by redo(), and undo().

◆ myForward

◆ myNet

◆ myOperation

const Operation GNEChange_Children::myOperation
private

Definition at line 85 of file GNEChange_Children.h.

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

◆ myOriginalElementChildren

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

copy of demand element childrens before apply operation

Definition at line 88 of file GNEChange_Children.h.

Referenced by redo(), and undo().


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