Eclipse SUMO - Simulation of Urban MObility
GNEUndoList Class Reference

#include <GNEUndoList.h>

Inheritance diagram for GNEUndoList:
[legend]
Collaboration diagram for GNEUndoList:
[legend]

Data Structures

class  Iterator
 FOX declaration. More...
 
class  RedoIterator
 redo iterator More...
 
class  UndoIterator
 undo iterator More...
 

Public Member Functions

void abortAllChangeGroups ()
 reverts and discards ALL active chained change groups More...
 
void abortLastChangeGroup ()
 reverts last active chained change group More...
 
void add (GNEChange *command, bool doit=false, bool merge=true)
 Add new command, executing it if desired. The new command will be merged with the previous command if merge is TRUE and we're not at a marked position and the commands are mergeable. Otherwise the new command will be appended after the last undo command in the currently active undo group. If the new command is successfully merged, it will be deleted. Furthermore, all redo commands will be deleted since it is no longer possible to redo from this point. More...
 
void begin (GUIIcon icon, const std::string &description)
 Begin undo command sub-group with current supermode. This begins a new group of commands that are treated as a single command. Must eventually be followed by a matching end() after recording the sub-commands. The new sub-group will be appended to its parent group's undo list when end() is called. More...
 
void begin (Supermode supermode, GUIIcon icon, const std::string &description)
 Begin undo command sub-group specifying supermode. This begins a new group of commands that are treated as a single command. Must eventually be followed by a matching end() after recording the sub-commands. The new sub-group will be appended to its parent group's undo list when end() is called. More...
 
bool busy () const
 Return TRUE if currently inside undo or redo operation; this is useful to avoid generating another undo command while inside an undo operation. More...
 
void changeAttribute (GNEChange_Attribute *change)
 special method for change attributes, avoid empty changes, always execute More...
 
void clear ()
 
int currentCommandGroupSize () const
 get size of current CommandGroup More...
 
void end ()
 End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise, the sub-group will be added as a new command into parent group. More...
 
Supermode getRedoSupermode () const
 get redo supermode More...
 
Supermode getUndoSupermode () const
 get undo supermode More...
 
 GNEUndoList (GNEApplicationWindow *parent)
 constructor More...
 
bool hasCommandGroup () const
 Check if undoList has command group. More...
 
void redo ()
 redo the last command group More...
 
std::string redoName () const
 Return name of the first redo command available; if no Redo command available this will return the empty string. More...
 
void undo ()
 undo the last command group More...
 
std::string undoName () const
 Return name of the first undo command available; if no undo command available this will return the empty string. More...
 
 ~GNEUndoList ()
 destructor More...
 
FOX-callbacks

undo change

long onCmdUndo (FXObject *, FXSelector, void *)
 
long onUpdUndo (FXObject *, FXSelector, void *)
 event after Undo More...
 
long onCmdRedo (FXObject *, FXSelector, void *)
 redo change More...
 
long onUpdRedo (FXObject *, FXSelector, void *)
 event after Redo More...
 

Protected Member Functions

void abortCurrentSubGroup ()
 Abort the current command sub-group being compiled. All commands already added to the sub-groups undo list will be discarded. Intermediate command groups will be left intact. More...
 
bool canRedo () const
 Can we redo more commands. More...
 
bool canUndo () const
 Can we undo more commands. More...
 
void cut ()
 Cut the redo list. This is automatically invoked when a new undo command is added. More...
 

Private Attributes

std::stack< GNEChangeGroup * > myChangeGroups
 
GNEApplicationWindow *const myGNEApplicationWindowParent
 
bool myWorking
 Currently busy with undo or redo. More...
 

declare friend class

GNEChangeundoList
 undo list command (can be access by GNEUndoList) More...
 
GNEChangeredoList
 redo list command (can be access by GNEUndoList) More...
 
GNEChangeGroupgroup
 group (can be access by GNEUndoList) More...
 
int size () const
 Return the size of the command group. More...
 
const std::string & getDescription ()
 get description More...
 
Supermode getGroupSupermode () const
 get supermode associated with this ChangeGroup More...
 
GUIIcon getGroupIcon () const
 get icon associated with this ChangeGroup More...
 
bool empty () const
 Return TRUE if empty. More...
 
const std::string myDescription
 description of command More...
 
const Supermode myGroupSupermode
 supermode associated with this ChangeGroup More...
 
GUIIcon myIcon
 icon associated with this ChangeGroup More...
 

friend class

GNEChangenext
 
Supermode getSupermode () const
 get supermode More...
 
bool canMerge () const
 Return TRUE if this command can be merged with previous undo commands. This is useful to combine e.g. multiple consecutive single-character text changes into a single block change. The default implementation returns FALSE. More...
 
bool mergeWith (GNEChange *command)
 Called by the undo system to try and merge the new incoming command with this command; should return TRUE if merging was possible. The default implementation returns FALSE. More...
 
void restoreHierarchicalContainers ()
 restore container (only use in undo() function) More...
 
template<typename T >
void addElementInParentsAndChildren (T *element)
 add given element into parents and children (only use in redo() function) More...
 
template<typename T >
void removeElementFromParentsAndChildren (T *element)
 remove given element from parents and children (only use in redo() function) More...
 
const Supermode mySupermode
 supermode related with this change More...
 
bool myForward
 we group antagonistic commands (create junction/delete junction) and keep them apart by this flag More...
 
const bool mySelectedElement
 flag for check if element is selected More...
 
const GNEHierarchicalContainer myOriginalHierarchicalContainer
 Hierarchical container with parent and children. More...
 
std::map< GNEHierarchicalElement *, GNEHierarchicalContainermyHierarchicalContainers
 map with hierarchical container of all parent and children elements More...
 

Detailed Description

Definition at line 42 of file GNEUndoList.h.

Constructor & Destructor Documentation

◆ GNEUndoList()

GNEUndoList::GNEUndoList ( GNEApplicationWindow parent)

constructor

Definition at line 126 of file GNEUndoList.cpp.

◆ ~GNEUndoList()

GNEUndoList::~GNEUndoList ( )

destructor

Definition at line 132 of file GNEUndoList.cpp.

Member Function Documentation

◆ abortAllChangeGroups()

void GNEUndoList::abortAllChangeGroups ( )

reverts and discards ALL active chained change groups

Definition at line 300 of file GNEUndoList.cpp.

References abortCurrentSubGroup(), hasCommandGroup(), and myChangeGroups.

Referenced by GNEViewNet::abortOperation(), clear(), GNEContainerFrame::createPath(), GNEPersonFrame::createPath(), GNEApplicationWindow::onCmdOpenTLSPrograms(), and GNEApplicationWindow::onCmdReloadTLSPrograms().

Here is the caller graph for this function:

◆ abortCurrentSubGroup()

void GNEUndoList::abortCurrentSubGroup ( )
protected

Abort the current command sub-group being compiled. All commands already added to the sub-groups undo list will be discarded. Intermediate command groups will be left intact.

Definition at line 527 of file GNEUndoList.cpp.

References GNEChangeGroup::group, and myWorking.

Referenced by abortAllChangeGroups(), and abortLastChangeGroup().

Here is the caller graph for this function:

◆ abortLastChangeGroup()

void GNEUndoList::abortLastChangeGroup ( )

reverts last active chained change group

Definition at line 311 of file GNEUndoList.cpp.

References abortCurrentSubGroup(), and myChangeGroups.

Referenced by GNEAdditionalDialog::acceptChanges(), GNEDemandElementDialog::acceptChanges(), GNEAdditionalDialog::cancelChanges(), GNEDemandElementDialog::cancelChanges(), GNEAdditionalDialog::resetChanges(), and GNEDemandElementDialog::resetChanges().

Here is the caller graph for this function:

◆ add()

void GNEUndoList::add ( GNEChange command,
bool  doit = false,
bool  merge = true 
)

Add new command, executing it if desired. The new command will be merged with the previous command if merge is TRUE and we're not at a marked position and the commands are mergeable. Otherwise the new command will be appended after the last undo command in the currently active undo group. If the new command is successfully merged, it will be deleted. Furthermore, all redo commands will be deleted since it is no longer possible to redo from this point.

Definition at line 322 of file GNEUndoList.cpp.

References GNEChange::canMerge(), cut(), GNEChangeGroup::group, GNEChange::mergeWith(), myWorking, GNEChange::next, GNEChange::redo(), and GNEChangeGroup::undoList.

Referenced by GNETAZFrame::addOrRemoveTAZMember(), GNEAdditionalHandler::buildAccess(), GNEAdditionalHandler::buildBusStop(), GNEAdditionalHandler::buildCalibratorFlow(), GNEAdditionalHandler::buildChargingStation(), GNEAdditionalHandler::buildClosingLaneReroute(), GNEAdditionalHandler::buildClosingReroute(), GNEConnectorFrame::buildConnection(), GNERouteHandler::buildContainer(), GNERouteHandler::buildContainerFlow(), GNEAdditionalHandler::buildContainerStop(), GNEDataHandler::buildDataInterval(), GNEDataHandler::buildDataSet(), GNEAdditionalHandler::buildDestProbReroute(), GNEAdditionalHandler::buildDetectorE1Instant(), GNEAdditionalHandler::buildDetectorE3(), GNEAdditionalHandler::buildDetectorEntry(), GNEAdditionalHandler::buildDetectorExit(), GNEAdditionalHandler::buildE1Detector(), GNEAdditionalHandler::buildEdgeCalibrator(), GNEDataHandler::buildEdgeData(), GNEDataHandler::buildEdgeRelationData(), GNERouteHandler::buildEmbeddedRoute(), GNERouteHandler::buildFlow(), GNERouteHandler::buildFlowOverRoute(), GNEAdditionalHandler::buildLaneCalibrator(), GNEAdditionalHandler::buildMultiLaneDetectorE2(), GNEAdditionalHandler::buildOverheadWire(), GNEAdditionalHandler::buildParkingArea(), GNEAdditionalHandler::buildParkingAreaReroute(), GNEAdditionalHandler::buildParkingSpace(), GNERouteHandler::buildPerson(), GNERouteHandler::buildPersonFlow(), GNERouteHandler::buildPersonTrip(), GNEAdditionalHandler::buildPOI(), GNEAdditionalHandler::buildPOIGeo(), GNEAdditionalHandler::buildPOILane(), GNEAdditionalHandler::buildPolygon(), GNEAdditionalHandler::buildRerouter(), GNEAdditionalHandler::buildRerouterInterval(), GNERouteHandler::buildRide(), GNERouteHandler::buildRoute(), GNEAdditionalHandler::buildRouteProbe(), GNEAdditionalHandler::buildRouteProbReroute(), GNEAdditionalHandler::buildSingleLaneDetectorE2(), GNERouteHandler::buildStop(), GNEAdditionalHandler::buildTAZ(), GNEDataHandler::buildTAZRelationData(), GNEAdditionalHandler::buildTAZSink(), GNEAdditionalHandler::buildTAZSource(), GNEAdditionalHandler::buildTractionSubstation(), GNEAdditionalHandler::buildTrainStop(), GNERouteHandler::buildTranship(), GNERouteHandler::buildTransport(), GNERouteHandler::buildTrip(), GNEAdditionalHandler::buildVaporizer(), GNEAdditionalHandler::buildVariableSpeedSign(), GNEAdditionalHandler::buildVariableSpeedSignStep(), GNERouteHandler::buildVehicleOverRoute(), GNERouteHandler::buildVType(), GNERouteHandler::buildVTypeDistribution(), GNERouteHandler::buildWalk(), changeAttribute(), GNEConnection::changeTLIndex(), GNENet::cleanInvalidDemandElements(), GNENet::cleanUnusedRoutes(), GNENet::createEdge(), GNENet::createJunction(), GNENet::deleteAdditional(), GNENet::deleteConnection(), GNENet::deleteCrossing(), GNENet::deleteDemandElement(), GNENet::deleteEdge(), GNENet::deleteGenericData(), GNENet::deleteJunction(), GNENet::deleteLane(), GNEContainer::disableAttribute(), GNEPerson::disableAttribute(), GNEStop::disableAttribute(), GNEVehicle::disableAttribute(), GNETAZFrame::dropTAZMembers(), GNENet::duplicateLane(), GNEVType::editVTypeDistribution(), GNEContainer::enableAttribute(), GNEPerson::enableAttribute(), GNEStop::enableAttribute(), GNEVehicle::enableAttribute(), GNELaneAreaDetector::fixAdditionalProblem(), GNEOverheadWire::fixAdditionalProblem(), GNEVehicleTypeDialog::GNEVehicleTypeDialog(), GNEJunction::invalidateTLS(), GNENet::joinRoutes(), GNENet::joinSelectedJunctions(), GNEJunction::markAsModified(), GNERerouterIntervalDialog::onCmdAddClosingLaneReroute(), GNERerouterIntervalDialog::onCmdAddClosingReroute(), GNERerouterIntervalDialog::onCmdAddDestProbReroute(), GNEViewNet::onCmdAddJoinTLS(), GNERerouterIntervalDialog::onCmdAddParkingAreaReroute(), GNERerouterIntervalDialog::onCmdAddRouteProbReroute(), GNEVariableSpeedSignDialog::onCmdAddStep(), GNERerouterIntervalDialog::onCmdClickedClosingLaneReroute(), GNERerouterIntervalDialog::onCmdClickedClosingReroute(), GNERerouterIntervalDialog::onCmdClickedDestProbReroute(), GNECalibratorDialog::onCmdClickedFlow(), GNERerouterDialog::onCmdClickedInterval(), GNERerouterIntervalDialog::onCmdClickedParkingAreaReroute(), GNECalibratorDialog::onCmdClickedRoute(), GNERerouterIntervalDialog::onCmdClickedRouteProbReroute(), GNEVariableSpeedSignDialog::onCmdClickedStep(), GNECalibratorDialog::onCmdClickedVehicleType(), GNEElementTree::onCmdMoveItemDown(), GNEElementTree::onCmdMoveItemUp(), GNEApplicationWindow::onCmdOpenEdgeTypes(), GNEApplicationWindow::onCmdReloadEdgeTypes(), GNETLSEditorFrame::parseTLSPrograms(), GNERerouter::rebuildRerouterSymbols(), GNEVariableSpeedSign::rebuildVSSSymbols(), GNEJunction::removeConnectionsFrom(), GNEJunction::removeConnectionsTo(), GNEJunction::removeTLSConnections(), GNEJunction::replaceIncomingConnections(), GNENet::replaceIncomingEdge(), GNENet::replaceJunctionByGeometry(), GNECrossing::setAttribute(), GNEJunction::setAttribute(), GNEWalkingArea::setAttribute(), GNEJunction::setJunctionType(), GNEJunction::setLogicValid(), GNEEdge::setNumLanes(), and GNENet::splitEdge().

◆ addElementInParentsAndChildren()

template<typename T >
void GNEChange::addElementInParentsAndChildren ( T *  element)
inlineprotectedinherited

add given element into parents and children (only use in redo() function)

Definition at line 128 of file GNEChange.h.

References GNEHierarchicalContainer::getChildren(), GNEHierarchicalContainer::getParents(), and GNEChange::myOriginalHierarchicalContainer.

Referenced by GNEChange_Additional::redo(), GNEChange_DemandElement::redo(), GNEChange_Edge::redo(), GNEChange_GenericData::redo(), and GNEChange_Lane::redo().

Here is the caller graph for this function:

◆ begin() [1/2]

void GNEUndoList::begin ( GUIIcon  icon,
const std::string &  description 
)

Begin undo command sub-group with current supermode. This begins a new group of commands that are treated as a single command. Must eventually be followed by a matching end() after recording the sub-commands. The new sub-group will be appended to its parent group's undo list when end() is called.

Definition at line 202 of file GNEUndoList.cpp.

References begin(), GNEViewNetHelper::EditModes::currentSupermode, GNEViewNet::getEditModes(), GNEApplicationWindow::getViewNet(), myGNEApplicationWindowParent, and NETWORK.

Referenced by GNEViewNet::addRestrictedLane(), GNENet::addReversedEdge(), GNENet::adjustPersonPlans(), begin(), GNEAdditionalHandler::buildAccess(), GNEAdditionalHandler::buildBusStop(), GNEAdditionalHandler::buildCalibratorFlow(), GNEAdditionalHandler::buildChargingStation(), GNEAdditionalHandler::buildClosingLaneReroute(), GNEAdditionalHandler::buildClosingReroute(), GNEConnectorFrame::buildConnection(), GNERouteHandler::buildContainer(), GNERouteHandler::buildContainerFlow(), GNEAdditionalHandler::buildContainerStop(), GNEDataHandler::buildDataInterval(), GNEDataHandler::buildDataSet(), GNEAdditionalHandler::buildDestProbReroute(), GNEAdditionalHandler::buildDetectorE1Instant(), GNEAdditionalHandler::buildDetectorE3(), GNEAdditionalHandler::buildDetectorEntry(), GNEAdditionalHandler::buildDetectorExit(), GNEAdditionalHandler::buildE1Detector(), GNEAdditionalHandler::buildEdgeCalibrator(), GNEDataHandler::buildEdgeData(), GNEDataHandler::buildEdgeRelationData(), GNERouteHandler::buildEmbeddedRoute(), GNERouteHandler::buildFlow(), GNERouteHandler::buildFlowOverRoute(), GNEAdditionalHandler::buildLaneCalibrator(), GNEAdditionalHandler::buildMultiLaneDetectorE2(), GNEAdditionalHandler::buildOverheadWire(), GNEAdditionalHandler::buildParkingArea(), GNEAdditionalHandler::buildParkingAreaReroute(), GNEAdditionalHandler::buildParkingSpace(), GNERouteHandler::buildPerson(), GNERouteHandler::buildPersonFlow(), GNERouteHandler::buildPersonTrip(), GNEAdditionalHandler::buildPOI(), GNEAdditionalHandler::buildPOIGeo(), GNEAdditionalHandler::buildPOILane(), GNEAdditionalHandler::buildPolygon(), GNEAdditionalHandler::buildRerouter(), GNEAdditionalHandler::buildRerouterInterval(), GNERouteHandler::buildRide(), GNERouteHandler::buildRoute(), GNEAdditionalHandler::buildRouteProbe(), GNEAdditionalHandler::buildRouteProbReroute(), GNEAdditionalHandler::buildSingleLaneDetectorE2(), GNERouteHandler::buildStop(), GNEAdditionalHandler::buildTAZ(), GNEDataHandler::buildTAZRelationData(), GNEAdditionalHandler::buildTAZSink(), GNEAdditionalHandler::buildTAZSource(), GNEAdditionalHandler::buildTractionSubstation(), GNEAdditionalHandler::buildTrainStop(), GNERouteHandler::buildTranship(), GNERouteHandler::buildTransport(), GNERouteHandler::buildTrip(), GNEAdditionalHandler::buildVaporizer(), GNEAdditionalHandler::buildVariableSpeedSign(), GNEAdditionalHandler::buildVariableSpeedSignStep(), GNERouteHandler::buildVehicleOverRoute(), GNERouteHandler::buildVType(), GNERouteHandler::buildVTypeDistribution(), GNERouteHandler::buildWalk(), GNEPoly::changeFirstGeometryPoint(), GNEConnection::changeTLIndex(), GNENet::cleanInvalidCrossings(), GNENet::cleanInvalidDemandElements(), GNENet::cleanUnusedRoutes(), GNENet::clearAdditionalElements(), GNENet::clearDataElements(), GNENet::clearDemandElements(), GNENet::clearJunctionConnections(), GNEPoly::closePolygon(), GNEAccess::commitMoveShape(), GNEEntryExitDetector::commitMoveShape(), GNEInductionLoopDetector::commitMoveShape(), GNEInstantInductionLoopDetector::commitMoveShape(), GNELaneAreaDetector::commitMoveShape(), GNEMultiEntryExitDetector::commitMoveShape(), GNEOverheadWire::commitMoveShape(), GNEParkingSpace::commitMoveShape(), GNERerouter::commitMoveShape(), GNEStoppingPlace::commitMoveShape(), GNETAZ::commitMoveShape(), GNETractionSubstation::commitMoveShape(), GNEVariableSpeedSign::commitMoveShape(), GNEContainer::commitMoveShape(), GNEPerson::commitMoveShape(), GNEPersonTrip::commitMoveShape(), GNERide::commitMoveShape(), GNEStop::commitMoveShape(), GNETranship::commitMoveShape(), GNETransport::commitMoveShape(), GNEVehicle::commitMoveShape(), GNEWalk::commitMoveShape(), GNEConnection::commitMoveShape(), GNECrossing::commitMoveShape(), GNEEdge::commitMoveShape(), GNEJunction::commitMoveShape(), GNELane::commitMoveShape(), GNEWalkingArea::commitMoveShape(), GNEPOI::commitMoveShape(), GNEPoly::commitMoveShape(), GNENet::createEdge(), GNEContainerFrame::createPath(), GNEPersonFrame::createPath(), GNENet::createRoundabout(), GNENet::deleteAdditional(), GNENet::deleteConnection(), GNENet::deleteCrossing(), GNENet::deleteDataInterval(), GNENet::deleteDataSet(), GNENet::deleteDemandElement(), GNENet::deleteEdge(), GNENet::deleteGenericData(), GNEPoly::deleteGeometryPoint(), GNENet::deleteJunction(), GNENet::deleteLane(), GNENet::duplicateLane(), GNEEdge::editEndpoint(), GNETLSEditorFrame::editJunction(), GNEVType::editVTypeDistribution(), GNEFixDemandElements::FixRouteOptions::fixElements(), GNEFixDemandElements::FixVehicleOptions::fixElements(), GNEFixDemandElements::FixStopPositionOptions::fixElements(), GNEFixDemandElements::FixPersonPlanOptions::fixElements(), GNEFixNetworkElements::FixEdgeOptions::fixElements(), GNEFixNetworkElements::FixCrossingOptions::fixElements(), getRedoSupermode(), getUndoSupermode(), GNEApplicationWindow::handleEvent_NetworkLoaded(), GNESelectorFrame::handleIDs(), GNEViewNet::hotkeyDel(), GNEAdditionalDialog::initChanges(), GNEDemandElementDialog::initChanges(), GNENet::joinRoutes(), GNENet::joinSelectedJunctions(), GNENet::mergeJunctions(), GNEFixAdditionalElements::onCmdAccept(), GNEMultipleParametersDialog::onCmdAccept(), GNESingleParametersDialog::onCmdAccept(), GNEViewNet::onCmdAddJoinTLS(), GNEViewNet::onCmdAddReversedEdge(), GNEViewNet::onCmdAddReversedEdgeDisconnected(), GNEViewNet::onCmdAddTLS(), GNERoute::GNERoutePopupMenu::onCmdApplyDistance(), GNEViewNet::onCmdClearConnections(), GNEViewNet::onCmdClosePolygon(), GNEViewNet::onCmdDuplicateLane(), GNEViewNet::onCmdEgeApplyTemplate(), GNEViewNet::onCmdLaneReachability(), GNEElementTree::onCmdMoveItemDown(), GNEElementTree::onCmdMoveItemUp(), GNEApplicationWindow::onCmdOpenAdditionals(), GNEApplicationWindow::onCmdOpenDataElements(), GNEApplicationWindow::onCmdOpenDemandElements(), GNEApplicationWindow::onCmdOpenEdgeTypes(), GNEViewNet::onCmdOpenPolygon(), GNEApplicationWindow::onCmdOpenTLSPrograms(), GNEApplicationWindow::onCmdReloadAdditionals(), GNEApplicationWindow::onCmdReloadDataElements(), GNEApplicationWindow::onCmdReloadDemandElements(), GNEApplicationWindow::onCmdReloadEdgeTypes(), GNEApplicationWindow::onCmdReloadTLSPrograms(), GNEViewNet::onCmdResetConnections(), GNEViewNet::onCmdResetEdgeEndpoint(), GNEViewNet::onCmdResetEdgeEndPoints(), GNEViewNet::onCmdResetEndPoints(), GNEViewNet::onCmdResetJunctionShape(), GNEViewNet::onCmdResetLaneCustomShape(), GNEViewNet::onCmdResetLength(), GNEViewNet::onCmdResetOppositeLane(), GNEViewNet::onCmdReverseEdge(), GNEFrameAttributeModules::AttributesEditorRow::onCmdSelectCheckButton(), GNEViewNet::onCmdSelectPolygonElements(), GNEViewNet::onCmdSetCustomGeometryPoint(), GNEFlowEditor::onCmdSetFlowAttribute(), GNEViewNet::onCmdSimplifyShape(), GNEViewNet::onCmdSmoothEdges(), GNEViewNet::onCmdSmoothEdgesElevation(), GNEViewNet::onCmdStraightenEdges(), GNEViewNet::onCmdStraightenEdgesElevation(), GNEViewNet::onCmdTransformPOI(), GNEPoly::openPolygon(), GNEVType::overwriteVType(), GNECreateEdgeFrame::processClick(), GNERerouter::rebuildRerouterSymbols(), GNEVariableSpeedSign::rebuildVSSSymbols(), GNETAZ::removeGeometryPoint(), GNEConnection::removeGeometryPoint(), GNECrossing::removeGeometryPoint(), GNEEdge::removeGeometryPoint(), GNEJunction::removeGeometryPoint(), GNELane::removeGeometryPoint(), GNEPoly::removeGeometryPoint(), GNEViewNet::removeRestrictedLane(), GNEDeleteFrame::removeSelectedAttributeCarriers(), GNENet::removeSolitaryJunctions(), GNENet::replaceIncomingEdge(), GNENet::replaceJunctionByGeometry(), GNEAdditionalDialog::resetChanges(), GNEDemandElementDialog::resetChanges(), GNENet::resetJunctionConnections(), GNEViewNet::restrictLane(), GNENet::reverseEdge(), GNENet::selectRoundabout(), GNEPersonTrip::setAttribute(), GNERide::setAttribute(), GNERoute::setAttribute(), GNEStop::setAttribute(), GNETranship::setAttribute(), GNETransport::setAttribute(), GNEWalk::setAttribute(), GNEConnection::setAttribute(), GNEEdge::setAttribute(), GNEJunction::setAttribute(), GNEJunction::setJunctionType(), GNEEdge::setNumLanes(), GNEPoly::simplifyShape(), GNENet::splitEdge(), GNENet::splitEdgesBidi(), GNENet::splitJunction(), GNERouteHandler::transformToContainer(), GNERouteHandler::transformToContainerFlow(), GNERouteHandler::transformToFlow(), GNERouteHandler::transformToPerson(), GNERouteHandler::transformToPersonFlow(), GNERouteHandler::transformToRouteFlow(), GNERouteHandler::transformToTrip(), and GNERouteHandler::transformToVehicle().

◆ begin() [2/2]

void GNEUndoList::begin ( Supermode  supermode,
GUIIcon  icon,
const std::string &  description 
)

Begin undo command sub-group specifying supermode. This begins a new group of commands that are treated as a single command. Must eventually be followed by a matching end() after recording the sub-commands. The new sub-group will be appended to its parent group's undo list when end() is called.

Definition at line 212 of file GNEUndoList.cpp.

References cut(), GNEChangeGroup::GNEChangeGroup(), GNEChangeGroup::group, myChangeGroups, and myWorking.

◆ busy()

bool GNEUndoList::busy ( ) const

Return TRUE if currently inside undo or redo operation; this is useful to avoid generating another undo command while inside an undo operation.

Definition at line 415 of file GNEUndoList.cpp.

References myWorking.

◆ canMerge()

bool GNEChange::canMerge ( ) const
inherited

Return TRUE if this command can be merged with previous undo commands. This is useful to combine e.g. multiple consecutive single-character text changes into a single block change. The default implementation returns FALSE.

Definition at line 74 of file GNEChange.cpp.

Referenced by add().

Here is the caller graph for this function:

◆ canRedo()

bool GNEUndoList::canRedo ( ) const
protected

Can we redo more commands.

Definition at line 556 of file GNEUndoList.cpp.

References GNEChangeGroup::redoList.

Referenced by onUpdRedo().

Here is the caller graph for this function:

◆ canUndo()

bool GNEUndoList::canUndo ( ) const
protected

Can we undo more commands.

Definition at line 550 of file GNEUndoList.cpp.

References GNEChangeGroup::undoList.

Referenced by onUpdUndo().

Here is the caller graph for this function:

◆ changeAttribute()

void GNEUndoList::changeAttribute ( GNEChange_Attribute change)

special method for change attributes, avoid empty changes, always execute

Definition at line 357 of file GNEUndoList.cpp.

References add(), and GNEChange_Attribute::trueChange().

Referenced by GNEMultiEntryExitDetector::commitMoveShape(), GNERerouter::commitMoveShape(), GNETAZ::commitMoveShape(), GNETractionSubstation::commitMoveShape(), GNEVariableSpeedSign::commitMoveShape(), GNEStop::commitMoveShape(), GNEConnection::commitMoveShape(), GNECrossing::commitMoveShape(), GNEEdge::commitMoveShape(), GNEJunction::commitMoveShape(), GNELane::commitMoveShape(), GNEWalkingArea::commitMoveShape(), GNEPOI::commitMoveShape(), GNEPoly::commitMoveShape(), GNEVType::editVTypeDistribution(), GNENet::joinSelectedJunctions(), GNENet::mergeJunctions(), GNERoute::GNERoutePopupMenu::onCmdApplyDistance(), GNEViewNet::onCmdSetCustomGeometryPoint(), GNETAZ::removeGeometryPoint(), GNEConnection::removeGeometryPoint(), GNECrossing::removeGeometryPoint(), GNEEdge::removeGeometryPoint(), GNEJunction::removeGeometryPoint(), GNELane::removeGeometryPoint(), GNEPoly::removeGeometryPoint(), GNENet::replaceIncomingEdge(), GNEAccess::setAttribute(), GNEBusStop::setAttribute(), GNECalibrator::setAttribute(), GNECalibratorFlow::setAttribute(), GNEChargingStation::setAttribute(), GNEClosingLaneReroute::setAttribute(), GNEClosingReroute::setAttribute(), GNEContainerStop::setAttribute(), GNEDestProbReroute::setAttribute(), GNEEntryExitDetector::setAttribute(), GNEInductionLoopDetector::setAttribute(), GNEInstantInductionLoopDetector::setAttribute(), GNELaneAreaDetector::setAttribute(), GNEMultiEntryExitDetector::setAttribute(), GNEOverheadWire::setAttribute(), GNEParkingArea::setAttribute(), GNEParkingAreaReroute::setAttribute(), GNEParkingSpace::setAttribute(), GNERerouter::setAttribute(), GNERerouterInterval::setAttribute(), GNERouteProbe::setAttribute(), GNERouteProbReroute::setAttribute(), GNETAZ::setAttribute(), GNETAZSourceSink::setAttribute(), GNETractionSubstation::setAttribute(), GNEVaporizer::setAttribute(), GNEVariableSpeedSign::setAttribute(), GNEVariableSpeedSignStep::setAttribute(), GNEDataInterval::setAttribute(), GNEDataSet::setAttribute(), GNEEdgeData::setAttribute(), GNEEdgeRelData::setAttribute(), GNETAZRelData::setAttribute(), GNEContainer::setAttribute(), GNEPerson::setAttribute(), GNEPersonTrip::setAttribute(), GNERide::setAttribute(), GNERoute::setAttribute(), GNEStop::setAttribute(), GNETranship::setAttribute(), GNETransport::setAttribute(), GNEVehicle::setAttribute(), GNEVType::setAttribute(), GNEVTypeDistribution::setAttribute(), GNEWalk::setAttribute(), GNEConnection::setAttribute(), GNEEdge::setAttribute(), GNELane::setAttribute(), GNEPOI::setAttribute(), GNEPoly::setAttribute(), GNEEdge::setNumLanes(), GNENet::splitEdge(), and GNENet::splitJunction().

◆ clear()

void GNEUndoList::clear ( )

Definition at line 277 of file GNEUndoList.cpp.

References abortAllChangeGroups(), GNEChangeGroup::group, GNEChange::next, GNEChangeGroup::redoList, and GNEChangeGroup::undoList.

Referenced by GNEApplicationWindow::clearUndoList(), and GNENet::computeAndUpdate().

Here is the caller graph for this function:

◆ currentCommandGroupSize()

int GNEUndoList::currentCommandGroupSize ( ) const

get size of current CommandGroup

Definition at line 367 of file GNEUndoList.cpp.

References myChangeGroups.

Referenced by GNEAdditionalDialog::initChanges(), and GNEDemandElementDialog::initChanges().

Here is the caller graph for this function:

◆ cut()

void GNEUndoList::cut ( )
protected

Cut the redo list. This is automatically invoked when a new undo command is added.

Definition at line 515 of file GNEUndoList.cpp.

References GNEChange::next, and GNEChangeGroup::redoList.

Referenced by add(), and begin().

Here is the caller graph for this function:

◆ empty()

bool GNEChangeGroup::empty ( ) const
inherited

Return TRUE if empty.

Definition at line 97 of file GNEChangeGroup.cpp.

References GNEChangeGroup::undoList.

Referenced by end().

Here is the caller graph for this function:

◆ end()

void GNEUndoList::end ( )

End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise, the sub-group will be added as a new command into parent group.

Note
A matching begin() must have been called previously.

Definition at line 232 of file GNEUndoList.cpp.

References DATA_SELECT, DEMAND_SELECT, GNEChangeGroup::empty(), GNEViewNet::getEditModes(), GNESelectorFrame::getSelectionInformation(), GNEViewParent::getSelectorFrame(), GNEApplicationWindow::getViewNet(), GNEViewNet::getViewParent(), GNEChangeGroup::group, myChangeGroups, myGNEApplicationWindowParent, myWorking, NETWORK_SELECT, GNEChange::next, GNEChangeGroup::undoList, GNESelectorFrame::SelectionInformation::updateInformationLabel(), and GNEViewNet::updateViewNet().

Referenced by GNEAdditionalDialog::acceptChanges(), GNEDemandElementDialog::acceptChanges(), GNEViewNet::addRestrictedLane(), GNENet::addReversedEdge(), GNENet::adjustPersonPlans(), GNEAdditionalHandler::buildAccess(), GNEAdditionalHandler::buildBusStop(), GNEAdditionalHandler::buildCalibratorFlow(), GNEAdditionalHandler::buildChargingStation(), GNEAdditionalHandler::buildClosingLaneReroute(), GNEAdditionalHandler::buildClosingReroute(), GNERouteHandler::buildContainer(), GNERouteHandler::buildContainerFlow(), GNEAdditionalHandler::buildContainerStop(), GNEDataHandler::buildDataInterval(), GNEDataHandler::buildDataSet(), GNEAdditionalHandler::buildDestProbReroute(), GNEAdditionalHandler::buildDetectorE1Instant(), GNEAdditionalHandler::buildDetectorE3(), GNEAdditionalHandler::buildDetectorEntry(), GNEAdditionalHandler::buildDetectorExit(), GNEAdditionalHandler::buildE1Detector(), GNEAdditionalHandler::buildEdgeCalibrator(), GNEDataHandler::buildEdgeData(), GNEDataHandler::buildEdgeRelationData(), GNERouteHandler::buildEmbeddedRoute(), GNERouteHandler::buildFlow(), GNERouteHandler::buildFlowOverRoute(), GNEAdditionalHandler::buildLaneCalibrator(), GNEAdditionalHandler::buildMultiLaneDetectorE2(), GNEAdditionalHandler::buildOverheadWire(), GNEAdditionalHandler::buildParkingArea(), GNEAdditionalHandler::buildParkingAreaReroute(), GNEAdditionalHandler::buildParkingSpace(), GNERouteHandler::buildPerson(), GNERouteHandler::buildPersonFlow(), GNERouteHandler::buildPersonTrip(), GNEAdditionalHandler::buildPOI(), GNEAdditionalHandler::buildPOIGeo(), GNEAdditionalHandler::buildPOILane(), GNEAdditionalHandler::buildPolygon(), GNEAdditionalHandler::buildRerouter(), GNEAdditionalHandler::buildRerouterInterval(), GNERouteHandler::buildRide(), GNERouteHandler::buildRoute(), GNEAdditionalHandler::buildRouteProbe(), GNEAdditionalHandler::buildRouteProbReroute(), GNEAdditionalHandler::buildSingleLaneDetectorE2(), GNERouteHandler::buildStop(), GNEAdditionalHandler::buildTAZ(), GNEDataHandler::buildTAZRelationData(), GNEAdditionalHandler::buildTAZSink(), GNEAdditionalHandler::buildTAZSource(), GNEAdditionalHandler::buildTractionSubstation(), GNEAdditionalHandler::buildTrainStop(), GNERouteHandler::buildTranship(), GNERouteHandler::buildTransport(), GNERouteHandler::buildTrip(), GNEAdditionalHandler::buildVaporizer(), GNEAdditionalHandler::buildVariableSpeedSign(), GNEAdditionalHandler::buildVariableSpeedSignStep(), GNERouteHandler::buildVehicleOverRoute(), GNERouteHandler::buildVType(), GNERouteHandler::buildVTypeDistribution(), GNERouteHandler::buildWalk(), GNEPoly::changeFirstGeometryPoint(), GNEConnection::changeTLIndex(), GNENet::cleanInvalidCrossings(), GNENet::cleanInvalidDemandElements(), GNENet::cleanUnusedRoutes(), GNENet::clearAdditionalElements(), GNENet::clearDataElements(), GNENet::clearDemandElements(), GNENet::clearJunctionConnections(), GNEPoly::closePolygon(), GNEAccess::commitMoveShape(), GNEEntryExitDetector::commitMoveShape(), GNEInductionLoopDetector::commitMoveShape(), GNEInstantInductionLoopDetector::commitMoveShape(), GNELaneAreaDetector::commitMoveShape(), GNEMultiEntryExitDetector::commitMoveShape(), GNEOverheadWire::commitMoveShape(), GNEParkingSpace::commitMoveShape(), GNERerouter::commitMoveShape(), GNEStoppingPlace::commitMoveShape(), GNETAZ::commitMoveShape(), GNETractionSubstation::commitMoveShape(), GNEVariableSpeedSign::commitMoveShape(), GNEContainer::commitMoveShape(), GNEPerson::commitMoveShape(), GNEPersonTrip::commitMoveShape(), GNERide::commitMoveShape(), GNEStop::commitMoveShape(), GNETranship::commitMoveShape(), GNETransport::commitMoveShape(), GNEVehicle::commitMoveShape(), GNEWalk::commitMoveShape(), GNEConnection::commitMoveShape(), GNECrossing::commitMoveShape(), GNEEdge::commitMoveShape(), GNEJunction::commitMoveShape(), GNELane::commitMoveShape(), GNEWalkingArea::commitMoveShape(), GNEPOI::commitMoveShape(), GNEPoly::commitMoveShape(), GNENet::createEdge(), GNEContainerFrame::createPath(), GNEPersonFrame::createPath(), GNENet::createRoundabout(), GNENet::deleteAdditional(), GNENet::deleteConnection(), GNENet::deleteCrossing(), GNENet::deleteDataInterval(), GNENet::deleteDataSet(), GNENet::deleteDemandElement(), GNENet::deleteEdge(), GNENet::deleteGenericData(), GNEPoly::deleteGeometryPoint(), GNENet::deleteJunction(), GNENet::deleteLane(), GNENet::duplicateLane(), GNEEdge::editEndpoint(), GNEVType::editVTypeDistribution(), GNEFixDemandElements::FixRouteOptions::fixElements(), GNEFixDemandElements::FixVehicleOptions::fixElements(), GNEFixDemandElements::FixStopPositionOptions::fixElements(), GNEFixDemandElements::FixPersonPlanOptions::fixElements(), GNEFixNetworkElements::FixEdgeOptions::fixElements(), GNEFixNetworkElements::FixCrossingOptions::fixElements(), GNEApplicationWindow::handleEvent_NetworkLoaded(), GNESelectorFrame::handleIDs(), GNEViewNet::hotkeyDel(), GNENet::joinRoutes(), GNENet::joinSelectedJunctions(), GNENet::mergeJunctions(), GNEFixAdditionalElements::onCmdAccept(), GNEMultipleParametersDialog::onCmdAccept(), GNESingleParametersDialog::onCmdAccept(), GNEViewNet::onCmdAddJoinTLS(), GNEViewNet::onCmdAddReversedEdge(), GNEViewNet::onCmdAddReversedEdgeDisconnected(), GNEViewNet::onCmdAddTLS(), GNERoute::GNERoutePopupMenu::onCmdApplyDistance(), GNEViewNet::onCmdClearConnections(), GNEViewNet::onCmdClosePolygon(), GNEViewNet::onCmdDuplicateLane(), GNEViewNet::onCmdEgeApplyTemplate(), GNEViewNet::onCmdLaneReachability(), GNEElementTree::onCmdMoveItemDown(), GNEElementTree::onCmdMoveItemUp(), GNEApplicationWindow::onCmdOpenAdditionals(), GNEApplicationWindow::onCmdOpenDataElements(), GNEApplicationWindow::onCmdOpenDemandElements(), GNEApplicationWindow::onCmdOpenEdgeTypes(), GNEViewNet::onCmdOpenPolygon(), GNEApplicationWindow::onCmdOpenTLSPrograms(), GNEApplicationWindow::onCmdReloadAdditionals(), GNEApplicationWindow::onCmdReloadDataElements(), GNEApplicationWindow::onCmdReloadDemandElements(), GNEApplicationWindow::onCmdReloadEdgeTypes(), GNEApplicationWindow::onCmdReloadTLSPrograms(), GNEViewNet::onCmdResetConnections(), GNEViewNet::onCmdResetEdgeEndpoint(), GNEViewNet::onCmdResetEdgeEndPoints(), GNEViewNet::onCmdResetEndPoints(), GNEViewNet::onCmdResetJunctionShape(), GNEViewNet::onCmdResetLaneCustomShape(), GNEViewNet::onCmdResetLength(), GNEViewNet::onCmdResetOppositeLane(), GNEViewNet::onCmdReverseEdge(), GNEFrameAttributeModules::AttributesEditorRow::onCmdSelectCheckButton(), GNEViewNet::onCmdSelectPolygonElements(), GNEViewNet::onCmdSetCustomGeometryPoint(), GNEFlowEditor::onCmdSetFlowAttribute(), GNEViewNet::onCmdSimplifyShape(), GNEViewNet::onCmdSmoothEdges(), GNEViewNet::onCmdSmoothEdgesElevation(), GNEViewNet::onCmdStraightenEdges(), GNEViewNet::onCmdStraightenEdgesElevation(), GNEViewNet::onCmdTransformPOI(), GNEPoly::openPolygon(), GNEVType::overwriteVType(), GNECreateEdgeFrame::processClick(), GNERerouter::rebuildRerouterSymbols(), GNEVariableSpeedSign::rebuildVSSSymbols(), GNETAZ::removeGeometryPoint(), GNEConnection::removeGeometryPoint(), GNECrossing::removeGeometryPoint(), GNEEdge::removeGeometryPoint(), GNEJunction::removeGeometryPoint(), GNELane::removeGeometryPoint(), GNEPoly::removeGeometryPoint(), GNEViewNet::removeRestrictedLane(), GNEDeleteFrame::removeSelectedAttributeCarriers(), GNENet::removeSolitaryJunctions(), GNENet::replaceIncomingEdge(), GNENet::replaceJunctionByGeometry(), GNENet::resetJunctionConnections(), GNEViewNet::restrictLane(), GNENet::reverseEdge(), GNENet::selectRoundabout(), GNEPersonTrip::setAttribute(), GNERide::setAttribute(), GNERoute::setAttribute(), GNEStop::setAttribute(), GNETranship::setAttribute(), GNETransport::setAttribute(), GNEWalk::setAttribute(), GNEConnection::setAttribute(), GNEEdge::setAttribute(), GNEJunction::setAttribute(), GNEJunction::setJunctionType(), GNEEdge::setNumLanes(), GNEPoly::simplifyShape(), GNENet::splitEdge(), GNENet::splitEdgesBidi(), GNENet::splitJunction(), GNERouteHandler::transformToContainer(), GNERouteHandler::transformToContainerFlow(), GNERouteHandler::transformToFlow(), GNERouteHandler::transformToPerson(), GNERouteHandler::transformToPersonFlow(), GNERouteHandler::transformToRouteFlow(), GNERouteHandler::transformToTrip(), and GNERouteHandler::transformToVehicle().

◆ getDescription()

const std::string & GNEChangeGroup::getDescription ( )
inherited

get description

Definition at line 67 of file GNEChangeGroup.cpp.

References GNEChangeGroup::myDescription.

◆ getGroupIcon()

GUIIcon GNEChangeGroup::getGroupIcon ( ) const
inherited

get icon associated with this ChangeGroup

Definition at line 79 of file GNEChangeGroup.cpp.

References GNEChangeGroup::myIcon.

Referenced by GNEUndoList::Iterator::getIcon().

Here is the caller graph for this function:

◆ getGroupSupermode()

Supermode GNEChangeGroup::getGroupSupermode ( ) const
inherited

get supermode associated with this ChangeGroup

Definition at line 73 of file GNEChangeGroup.cpp.

References GNEChangeGroup::myGroupSupermode.

◆ getRedoSupermode()

Supermode GNEUndoList::getRedoSupermode ( ) const

get redo supermode

Definition at line 393 of file GNEUndoList.cpp.

References begin(), GNEChange::getSupermode(), NETWORK, and GNEChangeGroup::redoList.

Referenced by GNEApplicationWindow::onCmdRedo().

Here is the caller graph for this function:

◆ getSupermode()

Supermode GNEChange::getSupermode ( ) const
inherited

get supermode

Definition at line 68 of file GNEChange.cpp.

References GNEChange::mySupermode.

Referenced by getRedoSupermode(), and getUndoSupermode().

Here is the caller graph for this function:

◆ getUndoSupermode()

Supermode GNEUndoList::getUndoSupermode ( ) const

get undo supermode

Definition at line 377 of file GNEUndoList.cpp.

References begin(), GNEChange::getSupermode(), NETWORK, and GNEChangeGroup::undoList.

Referenced by GNEApplicationWindow::onCmdUndo().

Here is the caller graph for this function:

◆ hasCommandGroup()

bool GNEUndoList::hasCommandGroup ( ) const

Check if undoList has command group.

Definition at line 409 of file GNEUndoList.cpp.

References myChangeGroups.

Referenced by abortAllChangeGroups(), GNEJunction::invalidateTLS(), onUpdRedo(), onUpdUndo(), GNECreateEdgeFrame::processClick(), and GNEJunction::setLogicValid().

Here is the caller graph for this function:

◆ mergeWith()

bool GNEChange::mergeWith ( GNEChange command)
inherited

Called by the undo system to try and merge the new incoming command with this command; should return TRUE if merging was possible. The default implementation returns FALSE.

Definition at line 80 of file GNEChange.cpp.

Referenced by add().

Here is the caller graph for this function:

◆ onCmdRedo()

long GNEUndoList::onCmdRedo ( FXObject *  ,
FXSelector  ,
void *   
)

redo change

Definition at line 468 of file GNEUndoList.cpp.

References redo().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdUndo()

long GNEUndoList::onCmdUndo ( FXObject *  ,
FXSelector  ,
void *   
)

Definition at line 421 of file GNEUndoList.cpp.

References undo().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onUpdRedo()

long GNEUndoList::onUpdRedo ( FXObject *  sender,
FXSelector  ,
void *   
)

event after Redo

Definition at line 475 of file GNEUndoList.cpp.

References canRedo(), hasCommandGroup(), GNEApplicationWindow::isUndoRedoEnabled(), myChangeGroups, myGNEApplicationWindowParent, and redoName().

Referenced by FXDEFMAP(), GNEApplicationWindow::onUpdRedo(), and GNEViewParent::updateUndoRedoButtons().

Here is the caller graph for this function:

◆ onUpdUndo()

long GNEUndoList::onUpdUndo ( FXObject *  sender,
FXSelector  ,
void *   
)

event after Undo

Definition at line 428 of file GNEUndoList.cpp.

References canUndo(), hasCommandGroup(), GNEApplicationWindow::isUndoRedoEnabled(), myChangeGroups, myGNEApplicationWindowParent, and undoName().

Referenced by FXDEFMAP(), GNEApplicationWindow::onUpdUndo(), and GNEViewParent::updateUndoRedoButtons().

Here is the caller graph for this function:

◆ redo()

void GNEUndoList::redo ( )
virtual

redo the last command group

Reimplemented from GNEChangeGroup.

Definition at line 159 of file GNEUndoList.cpp.

References GNEChangeGroup::group, myGNEApplicationWindowParent, myWorking, GNEChange::next, GNEChange::redo(), GNEChangeGroup::redoList, GNEChangeGroup::undoList, GNEApplicationWindow::updateControls(), and WRITE_DEBUG.

Referenced by GNEApplicationWindow::onCmdRedo(), onCmdRedo(), and GNEUndoListDialog::onCmdSelectRow().

Here is the caller graph for this function:

◆ redoName()

std::string GNEUndoList::redoName ( ) const
virtual

Return name of the first redo command available; if no Redo command available this will return the empty string.

Reimplemented from GNEChangeGroup.

Definition at line 192 of file GNEUndoList.cpp.

References GNEChangeGroup::redoList, and GNEChange::redoName().

Referenced by GNEUndoList::Iterator::getDescription(), and onUpdRedo().

Here is the caller graph for this function:

◆ removeElementFromParentsAndChildren()

template<typename T >
void GNEChange::removeElementFromParentsAndChildren ( T *  element)
inlineprotectedinherited

remove given element from parents and children (only use in redo() function)

Definition at line 171 of file GNEChange.h.

References GNEHierarchicalContainer::getChildren(), GNEHierarchicalContainer::getParents(), and GNEChange::myOriginalHierarchicalContainer.

Referenced by GNEChange_Additional::redo(), GNEChange_DemandElement::redo(), GNEChange_Edge::redo(), GNEChange_GenericData::redo(), and GNEChange_Lane::redo().

Here is the caller graph for this function:

◆ restoreHierarchicalContainers()

void GNEChange::restoreHierarchicalContainers ( )
protectedinherited

restore container (only use in undo() function)

Definition at line 94 of file GNEChange.cpp.

References GNEChange::myHierarchicalContainers.

Referenced by GNEChange_Additional::undo(), GNEChange_DemandElement::undo(), GNEChange_Edge::undo(), GNEChange_GenericData::undo(), and GNEChange_Lane::undo().

Here is the caller graph for this function:

◆ size()

int GNEChangeGroup::size ( ) const
virtualinherited

Return the size of the command group.

Reimplemented from GNEChange.

Definition at line 129 of file GNEChangeGroup.cpp.

References GNEChangeGroup::GNEChangeGroup(), GNEChange::next, GNEChangeGroup::redoList, GNEChange::size(), and GNEChangeGroup::undoList.

◆ undo()

void GNEUndoList::undo ( )
virtual

undo the last command group

Reimplemented from GNEChangeGroup.

Definition at line 136 of file GNEUndoList.cpp.

References GNEChangeGroup::group, myGNEApplicationWindowParent, myWorking, GNEChange::next, GNEChangeGroup::redoList, GNEChange::undo(), GNEChangeGroup::undoList, GNEApplicationWindow::updateControls(), and WRITE_DEBUG.

Referenced by GNEUndoListDialog::onCmdSelectRow(), GNEApplicationWindow::onCmdUndo(), and onCmdUndo().

Here is the caller graph for this function:

◆ undoName()

std::string GNEUndoList::undoName ( ) const
virtual

Return name of the first undo command available; if no undo command available this will return the empty string.

Reimplemented from GNEChangeGroup.

Definition at line 182 of file GNEUndoList.cpp.

References GNEChangeGroup::undoList, and GNEChange::undoName().

Referenced by onUpdUndo().

Here is the caller graph for this function:

Field Documentation

◆ group

GNEChangeGroup* GNEChangeGroup::group
privateinherited

group (can be access by GNEUndoList)

Definition at line 92 of file GNEChangeGroup.h.

Referenced by abortCurrentSubGroup(), add(), begin(), clear(), end(), redo(), undo(), and GNEChangeGroup::~GNEChangeGroup().

◆ myChangeGroups

std::stack<GNEChangeGroup*> GNEUndoList::myChangeGroups
private

◆ myDescription

const std::string GNEChangeGroup::myDescription
protectedinherited

description of command

Definition at line 76 of file GNEChangeGroup.h.

Referenced by GNEChangeGroup::getDescription(), GNEChangeGroup::redoName(), and GNEChangeGroup::undoName().

◆ myForward

bool GNEChange::myForward
protectedinherited

we group antagonistic commands (create junction/delete junction) and keep them apart by this flag

Definition at line 216 of file GNEChange.h.

Referenced by GNEChange_Additional::redo(), GNEChange_Children::redo(), GNEChange_Connection::redo(), GNEChange_Crossing::redo(), GNEChange_DataInterval::redo(), GNEChange_DataSet::redo(), GNEChange_DemandElement::redo(), GNEChange_Edge::redo(), GNEChange_EdgeType::redo(), GNEChange_GenericData::redo(), GNEChange_Junction::redo(), GNEChange_Lane::redo(), GNEChange_TLS::redo(), GNEChange_Additional::redoName(), GNEChange_Children::redoName(), GNEChange_Connection::redoName(), GNEChange_Crossing::redoName(), GNEChange_DataInterval::redoName(), GNEChange_DataSet::redoName(), GNEChange_DemandElement::redoName(), GNEChange_Edge::redoName(), GNEChange_EdgeType::redoName(), GNEChange_GenericData::redoName(), GNEChange_Junction::redoName(), GNEChange_Lane::redoName(), GNEChange_TLS::redoName(), GNEChange_Additional::undo(), GNEChange_Children::undo(), GNEChange_Connection::undo(), GNEChange_Crossing::undo(), GNEChange_DataInterval::undo(), GNEChange_DataSet::undo(), GNEChange_DemandElement::undo(), GNEChange_Edge::undo(), GNEChange_EdgeType::undo(), GNEChange_GenericData::undo(), GNEChange_Junction::undo(), GNEChange_Lane::undo(), GNEChange_TLS::undo(), GNEChange_Additional::undoName(), GNEChange_Children::undoName(), GNEChange_Connection::undoName(), GNEChange_Crossing::undoName(), GNEChange_DataInterval::undoName(), GNEChange_DataSet::undoName(), GNEChange_DemandElement::undoName(), GNEChange_Edge::undoName(), GNEChange_EdgeType::undoName(), GNEChange_GenericData::undoName(), GNEChange_Junction::undoName(), GNEChange_Lane::undoName(), and GNEChange_TLS::undoName().

◆ myGNEApplicationWindowParent

GNEApplicationWindow* const GNEUndoList::myGNEApplicationWindowParent
private

Definition at line 228 of file GNEUndoList.h.

Referenced by begin(), end(), onUpdRedo(), onUpdUndo(), redo(), and undo().

◆ myGroupSupermode

const Supermode GNEChangeGroup::myGroupSupermode
protectedinherited

supermode associated with this ChangeGroup

Definition at line 79 of file GNEChangeGroup.h.

Referenced by GNEChangeGroup::getGroupSupermode().

◆ myHierarchicalContainers

std::map<GNEHierarchicalElement*, GNEHierarchicalContainer> GNEChange::myHierarchicalContainers
protectedinherited

map with hierarchical container of all parent and children elements

Definition at line 225 of file GNEChange.h.

Referenced by GNEChange::GNEChange(), and GNEChange::restoreHierarchicalContainers().

◆ myIcon

GUIIcon GNEChangeGroup::myIcon
protectedinherited

icon associated with this ChangeGroup

Definition at line 82 of file GNEChangeGroup.h.

Referenced by GNEChangeGroup::getGroupIcon().

◆ myOriginalHierarchicalContainer

const GNEHierarchicalContainer GNEChange::myOriginalHierarchicalContainer
protectedinherited

◆ mySelectedElement

◆ mySupermode

const Supermode GNEChange::mySupermode
protectedinherited

supermode related with this change

Definition at line 213 of file GNEChange.h.

Referenced by GNEChange::getSupermode().

◆ myWorking

bool GNEUndoList::myWorking
private

Currently busy with undo or redo.

Definition at line 222 of file GNEUndoList.h.

Referenced by abortCurrentSubGroup(), add(), begin(), busy(), end(), redo(), and undo().

◆ next

GNEChange* GNEChange::next
privateinherited

◆ redoList

GNEChange* GNEChangeGroup::redoList
privateinherited

◆ undoList

GNEChange* GNEChangeGroup::undoList
privateinherited

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