SUMO - Simulation of Urban MObility
GNEUndoList Class Reference

#include <GNEUndoList.h>

Inheritance diagram for GNEUndoList:
Inheritance graph
Collaboration diagram for GNEUndoList:
Collaboration graph

Data Structures

class  CommandGroup
 

Public Member Functions

 GNEUndoList (GNEApplicationWindow *parent)
 constructor More...
 
bool hasCommandGroup () const
 
void p_abort ()
 reverts and discards ALL active command groups More...
 
void p_add (GNEChange_Attribute *cmd)
 special method, avoid empty changes, always execute More...
 
void p_begin (const std::string &description)
 
void p_clear ()
 
void p_end ()
 
long p_onUpdRedo (FXObject *, FXSelector, void *)
 
long p_onUpdUndo (FXObject *, FXSelector, void *)
 
void redo ()
 redo the last command group More...
 
void undo ()
 undo the last command group More...
 

Private Attributes

std::stack< CommandGroup * > myCommandGroups
 
GNEApplicationWindow *const myParent
 

Detailed Description

Definition at line 55 of file GNEUndoList.h.

Constructor & Destructor Documentation

GNEUndoList::GNEUndoList ( GNEApplicationWindow parent)
inline

constructor

Definition at line 63 of file GNEUndoList.h.

References p_abort(), p_add(), p_begin(), p_clear(), p_end(), p_onUpdRedo(), p_onUpdUndo(), redo(), and undo().

Member Function Documentation

bool GNEUndoList::hasCommandGroup ( ) const
inline
void GNEUndoList::p_abort ( )

reverts and discards ALL active command groups

Definition at line 96 of file GNEUndoList.cpp.

References hasCommandGroup(), and myCommandGroups.

Referenced by GNEViewNet::abortOperation(), GNEUndoList(), GNEConnector::onCmdCancel(), GNETLSEditor::onCmdCancel(), and p_clear().

void GNEUndoList::p_add ( GNEChange_Attribute cmd)

special method, avoid empty changes, always execute

Definition at line 120 of file GNEUndoList.cpp.

References GNEChange_Attribute::trueChange().

Referenced by GNEUndoList(), GNELane::setAttribute(), and GNEEdge::setAttribute().

void GNEUndoList::p_clear ( )

clears the undo list (implies abort)

Definition at line 89 of file GNEUndoList.cpp.

References p_abort().

Referenced by GNEApplicationWindow::closeAllWindows(), GNEApplicationWindow::continueWithUnsavedChanges(), and GNEUndoList().

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

Definition at line 147 of file GNEUndoList.cpp.

References hasCommandGroup(), and myCommandGroups.

Referenced by GNEUndoList().

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

Definition at line 129 of file GNEUndoList.cpp.

References hasCommandGroup(), and myCommandGroups.

Referenced by GNEUndoList().

void GNEUndoList::redo ( )

redo the last command group

Definition at line 113 of file GNEUndoList.cpp.

References myParent, and GNEApplicationWindow::updateControls().

Referenced by GNEUndoList().

void GNEUndoList::undo ( )

undo the last command group

Definition at line 106 of file GNEUndoList.cpp.

References myParent, and GNEApplicationWindow::updateControls().

Referenced by GNEUndoList().

Field Documentation

std::stack<CommandGroup*> GNEUndoList::myCommandGroups
private

Definition at line 136 of file GNEUndoList.h.

Referenced by hasCommandGroup(), p_abort(), p_end(), p_onUpdRedo(), and p_onUpdUndo().

GNEApplicationWindow* const GNEUndoList::myParent
private

Definition at line 139 of file GNEUndoList.h.

Referenced by redo(), and undo().


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