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 (const GNEAttributeCarrier *AC, const std::string &description)
 Begin undo command sub-group with current supermode. (used for ACs 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 (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 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...
 
std::string myTimeStamp
 timeStamp HH:MM:SS More...
 
int size () const
 Return the size of the command group. More...
 
const std::string & getDescription ()
 get description More...
 
const std::string & getTimeStamp ()
 get timeStamp 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...
 
const 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 128 of file GNEUndoList.cpp.

◆ ~GNEUndoList()

GNEUndoList::~GNEUndoList ( )

destructor

Definition at line 134 of file GNEUndoList.cpp.

Member Function Documentation

◆ abortAllChangeGroups()

void GNEUndoList::abortAllChangeGroups ( )

reverts and discards ALL active chained change groups

Definition at line 308 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 525 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 319 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 330 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(), GNERouteHandler::buildContainerStop(), GNEAdditionalHandler::buildContainerStop(), GNEDataHandler::buildDataInterval(), GNEDataHandler::buildDataSet(), GNEAdditionalHandler::buildDestProbReroute(), GNEAdditionalHandler::buildDetectorE1Instant(), GNEAdditionalHandler::buildDetectorE3(), GNEAdditionalHandler::buildDetectorEntry(), GNEAdditionalHandler::buildDetectorExit(), GNEAdditionalHandler::buildE1Detector(), GNEAdditionalHandler::buildEdgeCalibrator(), GNEDataHandler::buildEdgeData(), GNEMeanDataHandler::buildEdgeMeanData(), GNEDataHandler::buildEdgeRelationData(), GNERouteHandler::buildEmbeddedRoute(), GNERouteHandler::buildFlow(), GNERouteHandler::buildFlowJunctions(), GNERouteHandler::buildFlowOverRoute(), GNERouteHandler::buildFlowTAZs(), GNEAdditionalHandler::buildJpsObstacle(), GNEAdditionalHandler::buildJpsWalkableArea(), GNEAdditionalHandler::buildLaneCalibrator(), GNEMeanDataHandler::buildLaneMeanData(), GNEAdditionalHandler::buildMultiLaneDetectorE2(), GNEAdditionalHandler::buildOverheadWire(), GNEAdditionalHandler::buildParkingArea(), GNEAdditionalHandler::buildParkingAreaReroute(), GNEAdditionalHandler::buildParkingSpace(), GNERouteHandler::buildPerson(), GNERouteHandler::buildPersonFlow(), GNERouteHandler::buildPersonStop(), GNERouteHandler::buildPersonTrip(), GNEAdditionalHandler::buildPOI(), GNEAdditionalHandler::buildPOIGeo(), GNEAdditionalHandler::buildPOILane(), GNEAdditionalHandler::buildPolygon(), GNEAdditionalHandler::buildRerouter(), GNEAdditionalHandler::buildRerouterInterval(), GNERouteHandler::buildRide(), GNERouteHandler::buildRoute(), GNERouteHandler::buildRouteDistribution(), 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(), GNERouteHandler::buildTripJunctions(), GNERouteHandler::buildTripTAZs(), GNEAdditionalHandler::buildVaporizer(), GNEAdditionalHandler::buildVariableSpeedSign(), GNEAdditionalHandler::buildVariableSpeedSignStep(), GNERouteHandler::buildVehicleOverRoute(), GNERouteHandler::buildVType(), GNERouteHandler::buildVTypeDistribution(), GNERouteHandler::buildWalk(), GNEChange_Attribute::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(), GNENet::deleteMeanData(), GNEStop::disableAttribute(), GNEStopPlan::disableAttribute(), GNEDemandElementFlow::disableFlowAttribute(), GNETAZFrame::dropTAZMembers(), GNENet::duplicateLane(), GNEChange_Distribution::editValue(), GNEStop::enableAttribute(), GNEStopPlan::enableAttribute(), GNEDemandElementFlow::enableFlowAttribute(), GNELaneAreaDetector::fixAdditionalProblem(), GNEOverheadWire::fixAdditionalProblem(), GNEVehicleTypeDialog::GNEVehicleTypeDialog(), GNEJunction::invalidateTLS(), GNENet::joinRoutes(), GNENet::joinSelectedJunctions(), 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::TLSDefinition::onCmdSaveChanges(), GNETLSEditorFrame::parseTLSPrograms(), GNERerouter::rebuildRerouterSymbols(), GNEVariableSpeedSign::rebuildVSSSymbols(), GNEJunction::removeConnectionsFrom(), GNEJunction::removeConnectionsTo(), GNEChange_Distribution::removeKey(), GNEJunction::removeTLSConnections(), GNEJunction::replaceIncomingConnections(), GNENet::replaceIncomingEdge(), GNENet::replaceJunctionByGeometry(), GNEJunction::setAttribute(), GNEJunction::setJunctionType(), 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 124 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/3]

void GNEUndoList::begin ( const GNEAttributeCarrier AC,
const std::string &  description 
)

Begin undo command sub-group with current supermode. (used for ACs 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 214 of file GNEUndoList.cpp.

References begin(), GNETagProperties::getGUIIcon(), and GNEAttributeCarrier::getTagProperty().

◆ begin() [2/3]

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 204 of file GNEUndoList.cpp.

References 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(), GNERouteHandler::buildContainerStop(), GNEAdditionalHandler::buildContainerStop(), GNEDataHandler::buildDataInterval(), GNEDataHandler::buildDataSet(), GNEAdditionalHandler::buildDestProbReroute(), GNEAdditionalHandler::buildDetectorE1Instant(), GNEAdditionalHandler::buildDetectorE3(), GNEAdditionalHandler::buildDetectorEntry(), GNEAdditionalHandler::buildDetectorExit(), GNEAdditionalHandler::buildE1Detector(), GNEAdditionalHandler::buildEdgeCalibrator(), GNEDataHandler::buildEdgeData(), GNEMeanDataHandler::buildEdgeMeanData(), GNEDataHandler::buildEdgeRelationData(), GNERouteHandler::buildEmbeddedRoute(), GNERouteHandler::buildFlow(), GNERouteHandler::buildFlowJunctions(), GNERouteHandler::buildFlowOverRoute(), GNERouteHandler::buildFlowTAZs(), GNEAdditionalHandler::buildJpsObstacle(), GNEAdditionalHandler::buildJpsWalkableArea(), GNEAdditionalHandler::buildLaneCalibrator(), GNEMeanDataHandler::buildLaneMeanData(), GNEAdditionalHandler::buildMultiLaneDetectorE2(), GNEAdditionalHandler::buildOverheadWire(), GNEAdditionalHandler::buildParkingArea(), GNEAdditionalHandler::buildParkingAreaReroute(), GNEAdditionalHandler::buildParkingSpace(), GNERouteHandler::buildPerson(), GNERouteHandler::buildPersonFlow(), GNERouteHandler::buildPersonStop(), GNERouteHandler::buildPersonTrip(), GNEAdditionalHandler::buildPOI(), GNEAdditionalHandler::buildPOIGeo(), GNEAdditionalHandler::buildPOILane(), GNEAdditionalHandler::buildPolygon(), GNEAdditionalHandler::buildRerouter(), GNEAdditionalHandler::buildRerouterInterval(), GNERouteHandler::buildRide(), GNERouteHandler::buildRoute(), GNERouteHandler::buildRouteDistribution(), 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(), GNERouteHandler::buildTripJunctions(), GNERouteHandler::buildTripTAZs(), GNEAdditionalHandler::buildVaporizer(), GNEAdditionalHandler::buildVariableSpeedSign(), GNEAdditionalHandler::buildVariableSpeedSignStep(), GNERouteHandler::buildVehicleOverRoute(), GNERouteHandler::buildVType(), GNERouteHandler::buildVTypeDistribution(), GNERouteHandler::buildWalk(), GNEChange_Attribute::changeAttribute(), GNEPoly::changeFirstGeometryPoint(), GNEConnection::changeTLIndex(), GNENet::cleanInvalidCrossings(), GNENet::cleanInvalidDemandElements(), GNENet::cleanUnusedRoutes(), GNENet::clearAdditionalElements(), GNENet::clearDataElements(), GNENet::clearDemandElements(), GNENet::clearJunctionConnections(), GNENet::clearMeanDataElements(), 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(), GNEStopPlan::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::deleteMeanData(), GNENet::duplicateLane(), GNEEdge::editEndpoint(), GNETLSEditorFrame::editJunction(), GNEChange_Distribution::editValue(), GNEFixDemandElements::FixRouteOptions::fixElements(), GNEFixDemandElements::FixVehicleOptions::fixElements(), GNEFixDemandElements::FixStopPositionOptions::fixElements(), GNEFixDemandElements::FixPersonPlanOptions::fixElements(), GNEFixNetworkElements::FixEdgeOptions::fixElements(), GNEFixNetworkElements::FixCrossingOptions::fixElements(), getRedoSupermode(), getUndoSupermode(), GNESelectorFrame::handleIDs(), GNEViewNet::hotkeyDel(), GNEAdditionalDialog::initChanges(), GNEDemandElementDialog::initChanges(), GNENet::joinRoutes(), GNENet::joinSelectedJunctions(), GNEApplicationWindow::loadAdditionalElements(), GNEApplicationWindow::loadDataElements(), GNEApplicationWindow::loadDemandElements(), GNEApplicationWindow::loadMeanDataElements(), GNENet::mergeJunctions(), GNEFixAdditionalElements::onCmdAccept(), GNEFixElementsDialog::onCmdAccept(), GNEMultipleParametersDialog::onCmdAccept(), GNESingleParametersDialog::onCmdAccept(), GNEViewNet::onCmdAddJoinTLS(), GNEViewNet::onCmdAddReverse(), 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(), GNEFrameAttributeModules::AttributesEditorRow::onCmdOpenAllowDialog(), GNEFrameAttributeModules::AttributesEditorRow::onCmdOpenColorDialog(), GNEApplicationWindow::onCmdOpenDataElements(), GNEApplicationWindow::onCmdOpenDemandElements(), GNEApplicationWindow::onCmdOpenEdgeTypes(), GNEApplicationWindow::onCmdOpenMeanDatas(), GNEViewNet::onCmdOpenPolygon(), GNEApplicationWindow::onCmdOpenTLSPrograms(), GNEApplicationWindow::onCmdReloadAdditionals(), GNEApplicationWindow::onCmdReloadDataElements(), GNEApplicationWindow::onCmdReloadDemandElements(), GNEApplicationWindow::onCmdReloadEdgeTypes(), GNEApplicationWindow::onCmdReloadMeanDatas(), GNEApplicationWindow::onCmdReloadTLSPrograms(), GNEViewNet::onCmdResetConnections(), GNEViewNet::onCmdResetEdgeEndpoint(), GNEViewNet::onCmdResetEdgeEndPoints(), GNEViewNet::onCmdResetEndPoints(), GNEViewNet::onCmdResetJunctionShape(), GNEViewNet::onCmdResetLaneCustomShape(), GNEViewNet::onCmdResetLength(), GNEViewNet::onCmdResetOppositeLane(), GNEViewNet::onCmdReverse(), GNEViewNet::onCmdReverseEdge(), GNEFrameAttributeModules::AttributesEditorRow::onCmdSelectCheckButton(), GNEViewNet::onCmdSelectPolygonElements(), GNEViewNet::onCmdSetCustomGeometryPoint(), GNEFlowEditor::onCmdSetFlowAttribute(), GNEDistributionFrame::DistributionRow::onCmdSetKey(), 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(), GNEChange_Distribution::removeKey(), GNEViewNet::removeRestrictedLane(), GNEDeleteFrame::removeSelectedAttributeCarriers(), GNENet::removeSolitaryJunctions(), GNENet::replaceIncomingEdge(), GNENet::replaceJunctionByGeometry(), GNEAdditionalDialog::resetChanges(), GNEDemandElementDialog::resetChanges(), GNENet::resetJunctionConnections(), GNEViewNet::restrictLane(), GNENet::reverseEdge(), GNENet::selectRoundabout(), GNERoute::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::transformToFlowJunctions(), GNERouteHandler::transformToFlowTAZs(), GNERouteHandler::transformToPerson(), GNERouteHandler::transformToPersonFlow(), GNERouteHandler::transformToRouteFlow(), GNERouteHandler::transformToTrip(), GNERouteHandler::transformToTripJunctions(), GNERouteHandler::transformToTripTAZs(), and GNERouteHandler::transformToVehicle().

◆ begin() [3/3]

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 220 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 413 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 554 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 548 of file GNEUndoList.cpp.

References GNEChangeGroup::undoList.

Referenced by onUpdUndo().

Here is the caller graph for this function:

◆ clear()

void GNEUndoList::clear ( )

Definition at line 285 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 365 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 513 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 111 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 240 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(), GNERouteHandler::buildContainerStop(), GNEAdditionalHandler::buildContainerStop(), GNEDataHandler::buildDataInterval(), GNEDataHandler::buildDataSet(), GNEAdditionalHandler::buildDestProbReroute(), GNEAdditionalHandler::buildDetectorE1Instant(), GNEAdditionalHandler::buildDetectorE3(), GNEAdditionalHandler::buildDetectorEntry(), GNEAdditionalHandler::buildDetectorExit(), GNEAdditionalHandler::buildE1Detector(), GNEAdditionalHandler::buildEdgeCalibrator(), GNEDataHandler::buildEdgeData(), GNEMeanDataHandler::buildEdgeMeanData(), GNEDataHandler::buildEdgeRelationData(), GNERouteHandler::buildEmbeddedRoute(), GNERouteHandler::buildFlow(), GNERouteHandler::buildFlowJunctions(), GNERouteHandler::buildFlowOverRoute(), GNERouteHandler::buildFlowTAZs(), GNEAdditionalHandler::buildJpsObstacle(), GNEAdditionalHandler::buildJpsWalkableArea(), GNEAdditionalHandler::buildLaneCalibrator(), GNEMeanDataHandler::buildLaneMeanData(), GNEAdditionalHandler::buildMultiLaneDetectorE2(), GNEAdditionalHandler::buildOverheadWire(), GNEAdditionalHandler::buildParkingArea(), GNEAdditionalHandler::buildParkingAreaReroute(), GNEAdditionalHandler::buildParkingSpace(), GNERouteHandler::buildPerson(), GNERouteHandler::buildPersonFlow(), GNERouteHandler::buildPersonStop(), GNERouteHandler::buildPersonTrip(), GNEAdditionalHandler::buildPOI(), GNEAdditionalHandler::buildPOIGeo(), GNEAdditionalHandler::buildPOILane(), GNEAdditionalHandler::buildPolygon(), GNEAdditionalHandler::buildRerouter(), GNEAdditionalHandler::buildRerouterInterval(), GNERouteHandler::buildRide(), GNERouteHandler::buildRoute(), GNERouteHandler::buildRouteDistribution(), 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(), GNERouteHandler::buildTripJunctions(), GNERouteHandler::buildTripTAZs(), GNEAdditionalHandler::buildVaporizer(), GNEAdditionalHandler::buildVariableSpeedSign(), GNEAdditionalHandler::buildVariableSpeedSignStep(), GNERouteHandler::buildVehicleOverRoute(), GNERouteHandler::buildVType(), GNERouteHandler::buildVTypeDistribution(), GNERouteHandler::buildWalk(), GNEChange_Attribute::changeAttribute(), GNEPoly::changeFirstGeometryPoint(), GNEConnection::changeTLIndex(), GNENet::cleanInvalidCrossings(), GNENet::cleanInvalidDemandElements(), GNENet::cleanUnusedRoutes(), GNENet::clearAdditionalElements(), GNENet::clearDataElements(), GNENet::clearDemandElements(), GNENet::clearJunctionConnections(), GNENet::clearMeanDataElements(), 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(), GNEStopPlan::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::deleteMeanData(), GNENet::duplicateLane(), GNEEdge::editEndpoint(), GNEChange_Distribution::editValue(), GNEFixDemandElements::FixRouteOptions::fixElements(), GNEFixDemandElements::FixVehicleOptions::fixElements(), GNEFixDemandElements::FixStopPositionOptions::fixElements(), GNEFixDemandElements::FixPersonPlanOptions::fixElements(), GNEFixNetworkElements::FixEdgeOptions::fixElements(), GNEFixNetworkElements::FixCrossingOptions::fixElements(), GNESelectorFrame::handleIDs(), GNEViewNet::hotkeyDel(), GNENet::joinRoutes(), GNENet::joinSelectedJunctions(), GNEApplicationWindow::loadAdditionalElements(), GNEApplicationWindow::loadDataElements(), GNEApplicationWindow::loadDemandElements(), GNEApplicationWindow::loadMeanDataElements(), GNENet::mergeJunctions(), GNEFixAdditionalElements::onCmdAccept(), GNEFixElementsDialog::onCmdAccept(), GNEMultipleParametersDialog::onCmdAccept(), GNESingleParametersDialog::onCmdAccept(), GNEViewNet::onCmdAddJoinTLS(), GNEViewNet::onCmdAddReverse(), 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(), GNEFrameAttributeModules::AttributesEditorRow::onCmdOpenAllowDialog(), GNEFrameAttributeModules::AttributesEditorRow::onCmdOpenColorDialog(), GNEApplicationWindow::onCmdOpenDataElements(), GNEApplicationWindow::onCmdOpenDemandElements(), GNEApplicationWindow::onCmdOpenEdgeTypes(), GNEApplicationWindow::onCmdOpenMeanDatas(), GNEViewNet::onCmdOpenPolygon(), GNEApplicationWindow::onCmdOpenTLSPrograms(), GNEApplicationWindow::onCmdReloadAdditionals(), GNEApplicationWindow::onCmdReloadDataElements(), GNEApplicationWindow::onCmdReloadDemandElements(), GNEApplicationWindow::onCmdReloadEdgeTypes(), GNEApplicationWindow::onCmdReloadMeanDatas(), GNEApplicationWindow::onCmdReloadTLSPrograms(), GNEViewNet::onCmdResetConnections(), GNEViewNet::onCmdResetEdgeEndpoint(), GNEViewNet::onCmdResetEdgeEndPoints(), GNEViewNet::onCmdResetEndPoints(), GNEViewNet::onCmdResetJunctionShape(), GNEViewNet::onCmdResetLaneCustomShape(), GNEViewNet::onCmdResetLength(), GNEViewNet::onCmdResetOppositeLane(), GNEViewNet::onCmdReverse(), GNEViewNet::onCmdReverseEdge(), GNEFrameAttributeModules::AttributesEditorRow::onCmdSelectCheckButton(), GNEViewNet::onCmdSelectPolygonElements(), GNEViewNet::onCmdSetCustomGeometryPoint(), GNEFlowEditor::onCmdSetFlowAttribute(), GNEDistributionFrame::DistributionRow::onCmdSetKey(), 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(), GNEChange_Distribution::removeKey(), GNEViewNet::removeRestrictedLane(), GNEDeleteFrame::removeSelectedAttributeCarriers(), GNENet::removeSolitaryJunctions(), GNENet::replaceIncomingEdge(), GNENet::replaceJunctionByGeometry(), GNENet::resetJunctionConnections(), GNEViewNet::restrictLane(), GNENet::reverseEdge(), GNENet::selectRoundabout(), GNERoute::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::transformToFlowJunctions(), GNERouteHandler::transformToFlowTAZs(), GNERouteHandler::transformToPerson(), GNERouteHandler::transformToPersonFlow(), GNERouteHandler::transformToRouteFlow(), GNERouteHandler::transformToTrip(), GNERouteHandler::transformToTripJunctions(), GNERouteHandler::transformToTripTAZs(), and GNERouteHandler::transformToVehicle().

◆ getDescription()

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

get description

Definition at line 75 of file GNEChangeGroup.cpp.

References GNEChangeGroup::myDescription.

◆ getGroupIcon()

GUIIcon GNEChangeGroup::getGroupIcon ( ) const
inherited

get icon associated with this ChangeGroup

Definition at line 93 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 87 of file GNEChangeGroup.cpp.

References GNEChangeGroup::myGroupSupermode.

◆ getRedoSupermode()

Supermode GNEUndoList::getRedoSupermode ( ) const

get redo supermode

Definition at line 391 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:

◆ getTimeStamp()

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

get timeStamp

Definition at line 81 of file GNEChangeGroup.cpp.

References GNEChangeGroup::myTimeStamp.

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

Here is the caller graph for this function:

◆ getUndoSupermode()

Supermode GNEUndoList::getUndoSupermode ( ) const

get undo supermode

Definition at line 375 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 407 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 466 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 419 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 473 of file GNEUndoList.cpp.

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

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 426 of file GNEUndoList.cpp.

References canUndo(), hasCommandGroup(), GNEApplicationWindow::isUndoRedoEnabled(), myChangeGroups, myGNEApplicationWindowParent, TL, 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 161 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 194 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 167 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 143 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 138 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 184 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 95 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 79 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 212 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_MeanData::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_MeanData::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_MeanData::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(), GNEChange_MeanData::undoName(), and GNEChange_TLS::undoName().

◆ myGNEApplicationWindowParent

GNEApplicationWindow* const GNEUndoList::myGNEApplicationWindowParent
private

Definition at line 236 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 82 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 221 of file GNEChange.h.

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

◆ myIcon

const GUIIcon GNEChangeGroup::myIcon
protectedinherited

icon associated with this ChangeGroup

Definition at line 85 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 209 of file GNEChange.h.

Referenced by GNEChange::getSupermode().

◆ myTimeStamp

std::string GNEChangeGroup::myTimeStamp
privateinherited

timeStamp HH:MM:SS

Definition at line 98 of file GNEChangeGroup.h.

Referenced by GNEChangeGroup::getTimeStamp().

◆ myWorking

bool GNEUndoList::myWorking
private

Currently busy with undo or redo.

Definition at line 230 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: