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 ()
void connectUndoSignalToSlot (SBCReferenceTarget * observer, void(SBCReferenceTarget::*)(SBCUndoEvent *) functionPointer)
void disableHolding ()
Pauses holding.
void disableUndoRedo ()
Disables undo and redo.
void disconnectUndoSignalFromSlot (SBCReferenceTarget * observer, void(SBCReferenceTarget::*)(SBCUndoEvent *) functionPointer)
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
unsigned int getDisablingUndoRedoCounter ()
Returns the counter for disabling undo and redo.
unsigned int getNextRedoIndex () const
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
void redo ()
Redo one command.
void undo ()
Undo and redo.
bool undoSignalIsConnectedToSlot (SBCReferenceTarget * observer, void(SBCReferenceTarget::*)(SBCUndoEvent *) functionPointer) const
virtual ~SBCUndoStack ()
Destructor.

Protected Attributes#

Type Name
SBCUndoStackData * dataPointer

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#

void SBCUndoStack::clear () 

function connectUndoSignalToSlot#

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#

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#

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

function getDisablingUndoRedoCounter#

Returns the counter for disabling undo and redo.

unsigned int SBCUndoStack::getDisablingUndoRedoCounter () 


function getNextRedoIndex#

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#

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#

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

function ~SBCUndoStack#

Destructor.

virtual SBCUndoStack::~SBCUndoStack () 


Protected Attributes Documentation#

variable dataPointer#

SBCUndoStackData* dataPointer;