Web Analytics Made Easy - Statcounter
Skip to content

Class SBCUndoStack#

ClassList > SBCUndoStack

This class describes an undo stack.

  • #include "SBCUndoStack.hpp"

Public Functions#

Type Name
SBCUndoStack ()
Constructors and destructors.
SB_DECLARE_DATA (SBCUndoStack)
void beginHolding (const std::string & name)
Begins holding.
void beginUndoCommandGroup (const std::string & name)
Begins a new command group to the current command group.
void clear ()
Clears the stack.
void connectUndoSignalToSlot (SBCReferenceTarget * observer, void(SBCReferenceTarget::*)(SBCUndoEvent *) functionPointer)
Connects the undo signal to the slot of the observer.
void disableHolding ()
Pauses holding.
void disableUndoRedo ()
Disables undo and redo.
void disconnectUndoSignalFromSlot (SBCReferenceTarget * observer, void(SBCReferenceTarget::*)(SBCUndoEvent *) functionPointer)
Disconnects the undo signal to the slot of the observer.
void enableHolding ()
Resumes holding.
void enableUndoRedo ()
Enables undo and redo.
void endHolding ()
Ends holding.
void endUndoCommandGroup ()
Ends a new command group to the current command group.
SBCContainerVector< SBCUndoCommand * > * getCommandVector () const
Returns a vector of undo commands.
unsigned int getDisablingUndoRedoCounter ()
Returns the counter for disabling undo and redo.
unsigned int getNextRedoIndex () const
Returns the next redo index.
void hold (SBCUndoCommand * undoCommand)
Adds a new command to the current command group.
void hold (void * object)
Holds an object allocated on the heap.
void hold (SBPointerTarget * pointerTarget)
Holds a pointer target allocated on the heap.
void holdArray (void * array)
Holds an array allocated on the heap.
bool isHolding () const
Storing commands.
bool isRedoing () const
Returns true while redoing.
bool isUndoing () const
Returns true while undoing.
virtual void print (unsigned int offset=0) const
Prints debugging information.
void redo ()
Redo one command.
void undo ()
Undo and redo.
bool undoSignalIsConnectedToSlot (SBCReferenceTarget * observer, void(SBCReferenceTarget::*)(SBCUndoEvent *) functionPointer) const
Returns whether the undo signal is connected to the slot of the observer.
virtual ~SBCUndoStack ()
Destructor.

Protected Attributes#

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

Public Functions Documentation#

function SBCUndoStack#

Constructors and destructors.

SBCUndoStack::SBCUndoStack () 

Default constructor


function SB_DECLARE_DATA#

SBCUndoStack::SB_DECLARE_DATA (
    SBCUndoStack
) 

function beginHolding#

Begins holding.

void SBCUndoStack::beginHolding (
    const std::string & name
) 


function beginUndoCommandGroup#

Begins a new command group to the current command group.

void SBCUndoStack::beginUndoCommandGroup (
    const std::string & name
) 


function clear#

Clears the stack.

void SBCUndoStack::clear () 


function connectUndoSignalToSlot#

Connects the undo signal to the slot of the observer.

void SBCUndoStack::connectUndoSignalToSlot (
    SBCReferenceTarget * observer,
    void(SBCReferenceTarget::*)( SBCUndoEvent *) functionPointer
) 


function disableHolding#

Pauses holding.

void SBCUndoStack::disableHolding () 


function disableUndoRedo#

Disables undo and redo.

void SBCUndoStack::disableUndoRedo () 


function disconnectUndoSignalFromSlot#

Disconnects the undo signal to the slot of the observer.

void SBCUndoStack::disconnectUndoSignalFromSlot (
    SBCReferenceTarget * observer,
    void(SBCReferenceTarget::*)( SBCUndoEvent *) functionPointer
) 


function enableHolding#

Resumes holding.

void SBCUndoStack::enableHolding () 


function enableUndoRedo#

Enables undo and redo.

void SBCUndoStack::enableUndoRedo () 


function endHolding#

Ends holding.

void SBCUndoStack::endHolding () 


function endUndoCommandGroup#

Ends a new command group to the current command group.

void SBCUndoStack::endUndoCommandGroup () 


function getCommandVector#

Returns a vector of undo commands.

SBCContainerVector < SBCUndoCommand * > * SBCUndoStack::getCommandVector () const


function getDisablingUndoRedoCounter#

Returns the counter for disabling undo and redo.

unsigned int SBCUndoStack::getDisablingUndoRedoCounter () 


function getNextRedoIndex#

Returns the next redo index.

unsigned int SBCUndoStack::getNextRedoIndex () const


function hold [1/3]#

Adds a new command to the current command group.

void SBCUndoStack::hold (
    SBCUndoCommand * undoCommand
) 


function hold [2/3]#

Holds an object allocated on the heap.

void SBCUndoStack::hold (
    void * object
) 


function hold [3/3]#

Holds a pointer target allocated on the heap.

void SBCUndoStack::hold (
    SBPointerTarget * pointerTarget
) 


function holdArray#

Holds an array allocated on the heap.

void SBCUndoStack::holdArray (
    void * array
) 


function isHolding#

Storing commands.

bool SBCUndoStack::isHolding () const

Returns true while holding


function isRedoing#

Returns true while redoing.

bool SBCUndoStack::isRedoing () const


function isUndoing#

Returns true while undoing.

bool SBCUndoStack::isUndoing () const


function print#

Prints debugging information.

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


function redo#

Redo one command.

void SBCUndoStack::redo () 


function undo#

Undo and redo.

void SBCUndoStack::undo () 

Undo one command


function undoSignalIsConnectedToSlot#

Returns whether the undo signal is connected to the slot of the observer.

bool SBCUndoStack::undoSignalIsConnectedToSlot (
    SBCReferenceTarget * observer,
    void(SBCReferenceTarget::*)( SBCUndoEvent *) functionPointer
) const


function ~SBCUndoStack#

Destructor.

virtual SBCUndoStack::~SBCUndoStack () 


Protected Attributes Documentation#

variable dataPointer#

A pointer to the private data.

SBCUndoStackData* SBCUndoStack::dataPointer;