NanoByte.Common
Public Member Functions | Protected Member Functions | List of all members
NanoByte.Common.Undo.SimpleCommand Class Referenceabstract

An undo command that automatically tracks when Execute and Undo can be called. More...

Inheritance diagram for NanoByte.Common.Undo.SimpleCommand:
NanoByte.Common.Undo.IUndoCommand NanoByte.Common.Undo.CollectionCommand< T > NanoByte.Common.Undo.CompositeCommand NanoByte.Common.Undo.ReplaceInList< T > NanoByte.Common.Undo.SetInList< T > NanoByte.Common.Undo.SetLocalizableString NanoByte.Common.Undo.SetValueCommand< T > NanoByte.Common.Undo.AddToCollection< T > NanoByte.Common.Undo.RemoveFromCollection< T >

Public Member Functions

void Execute ()
 Performs the desired action. More...
 
virtual void Undo ()
 Undoes the changes made by Execute. More...
 

Protected Member Functions

abstract void OnExecute ()
 Template method to perform the desired action. More...
 
abstract void OnUndo ()
 Template method to undo the changes made by OnExecute. More...
 

Detailed Description

An undo command that automatically tracks when Execute and Undo can be called.

Member Function Documentation

◆ Execute()

void NanoByte.Common.Undo.SimpleCommand.Execute ( )
inline

Performs the desired action.

Implements NanoByte.Common.Undo.IUndoCommand.

◆ OnExecute()

abstract void NanoByte.Common.Undo.SimpleCommand.OnExecute ( )
protectedpure virtual

◆ OnUndo()

abstract void NanoByte.Common.Undo.SimpleCommand.OnUndo ( )
protectedpure virtual

◆ Undo()

virtual void NanoByte.Common.Undo.SimpleCommand.Undo ( )
inlinevirtual

Undoes the changes made by Execute.

Implements NanoByte.Common.Undo.IUndoCommand.


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