Web Analytics Made Easy - Statcounter
Skip to content

Class SBCUndoCommand#

ClassList > SBCUndoCommand

This class is the base class of all commands that can undergo undo and redo operations. More...

  • #include "SBCUndoCommand.hpp"

Inherited by the following classes: SBCUndoCommandGroup

Public Functions#

Type Name
SB_DECLARE_DATA (SBCUndoCommand)
virtual std::string getName () const
Returns the undo command's name.
SBCUndoCommand * getParent () const
Returns the undo command's parent.
virtual bool isCommand () const
Returns whether it is an undo command - returns true __
virtual bool isCommandGroup () const
Returns whether it is an undo command group - returns false __
bool isDone () const
Returns whether the undo command is done.
virtual void print (unsigned int offset=0) const
Prints debugging information.
virtual ~SBCUndoCommand ()
Destructs the undo command.

Protected Attributes#

Type Name
SBCUndoCommandData * dataPointer
A pointer to the private data.

Protected Functions#

Type Name
SBCUndoCommand ()
Protected constructor.
SBCUndoCommand (SBCUndoCommandData * dataPointer)
Protected constructor.
virtual void addChild (SBCUndoCommand * undoCommand)
Adds a child undo command to an undo command group, does nothing for an undo command.
virtual unsigned int getNumberOfCommands () const
Returns the number of undo commands in an undo command group or 1 for an undo command.
virtual void redo ()
Redo the operation.
virtual void undo ()
Undo the operation.

Detailed Description#

Short name: SBUndoCommand

Public Functions Documentation#

function SB_DECLARE_DATA#

SBCUndoCommand::SB_DECLARE_DATA (
    SBCUndoCommand
) 

function getName#

Returns the undo command's name.

virtual std::string SBCUndoCommand::getName () const


function getParent#

Returns the undo command's parent.

SBCUndoCommand * SBCUndoCommand::getParent () const


function isCommand#

Returns whether it is an undo command - returns true __

virtual bool SBCUndoCommand::isCommand () const


function isCommandGroup#

Returns whether it is an undo command group - returns false __

virtual bool SBCUndoCommand::isCommandGroup () const


function isDone#

Returns whether the undo command is done.

bool SBCUndoCommand::isDone () const


function print#

Prints debugging information.

virtual void SBCUndoCommand::print (
    unsigned int offset=0
) const


function ~SBCUndoCommand#

Destructs the undo command.

virtual SBCUndoCommand::~SBCUndoCommand () 


Protected Attributes Documentation#

variable dataPointer#

A pointer to the private data.

SBCUndoCommandData* SBCUndoCommand::dataPointer;


Protected Functions Documentation#

function SBCUndoCommand [1/2]#

Protected constructor.

SBCUndoCommand::SBCUndoCommand () 


function SBCUndoCommand [2/2]#

Protected constructor.

SBCUndoCommand::SBCUndoCommand (
    SBCUndoCommandData * dataPointer
) 


function addChild#

Adds a child undo command to an undo command group, does nothing for an undo command.

virtual void SBCUndoCommand::addChild (
    SBCUndoCommand * undoCommand
) 


function getNumberOfCommands#

Returns the number of undo commands in an undo command group or 1 for an undo command.

virtual unsigned int SBCUndoCommand::getNumberOfCommands () const


function redo#

Redo the operation.

virtual void SBCUndoCommand::redo () 


function undo#

Undo the operation.

virtual void SBCUndoCommand::undo ()