|
using System;
using System.Collections.Generic;
using System.Text;
namespace UndoRedo
{
/// <summary>
/// This class serves as the basis for all undoable actions in the software.
/// </summary>
public abstract class UndoableAction
{
/// <summary>
/// Get the name of the action
/// </summary>
public abstract string Name
{
get;
}
/// <summary>
/// Get the description of the undoable action
/// </summary>
public abstract string Description
{
get;
}
/// <summary>
/// Performs the action
/// </summary>
/// <param name="redo">TRUE indicates that the action is redone</param>
public abstract void Do(bool redo);
/// <summary>
/// Undo the action
/// </summary>
public abstract void Undo();
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
My name is Liron Levi and I'm developing software for fun & profit for 15 years already.