Web Analytics Made Easy - Statcounter
Skip to content

Class SBCUndoEvent#

ClassList > SBCUndoEvent

This class describes an event of the undo manager.

  • #include <SBCUndoEvent.hpp>

Public Types#

Type Name
enum Type
Available undo event types.

Public Functions#

Type Name
SBCUndoEvent (Type type, SBCUndoCommand * undoCommand, SBCUndoStack * undoStack)
Constructs the undo event.
Type getType () const
Returns the undo event type.
SBCUndoCommand * getUndoCommand () const
Returns a pointer to the undo command.
SBCUndoStack * getUndoStack () const
Returns a pointer to the undo stack.
virtual void print (unsigned int offset=0) const
Print debugging information.
virtual ~SBCUndoEvent ()
Destructs the undo event.

Public Static Functions#

Type Name
std::string getTypeString (Type type)
Returns the undo event type as a string.

Protected Attributes#

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

Public Types Documentation#

enum Type#

Available undo event types.

enum SBCUndoEvent::Type {
    Undefined = 0,
    CommandAdded = 1,
    CommandRemoved = 2,
    CommandDisabled = 3,
    NextCommandIndexChanged = 4
};


Public Functions Documentation#

function SBCUndoEvent#

Constructs the undo event.

SBCUndoEvent::SBCUndoEvent (
    Type type,
    SBCUndoCommand * undoCommand,
    SBCUndoStack * undoStack
) 

Constructs an undo event.

Initializes a new undo event with the specified type, command, and stack.

Parameters:

  • type The type of the undo event.
  • command Pointer to the associated undo command.
  • stack Pointer to the undo stack.

function getType#

Returns the undo event type.

Type SBCUndoEvent::getType () const

Returns the type of the undo event.

Returns:

The undo event type, or Undefined if unavailable.


function getUndoCommand#

Returns a pointer to the undo command.

SBCUndoCommand * SBCUndoEvent::getUndoCommand () const

Returns the associated undo command.

Returns:

Pointer to the undo command, or nullptr if none.


function getUndoStack#

Returns a pointer to the undo stack.

SBCUndoStack * SBCUndoEvent::getUndoStack () const

Returns the associated undo stack.

Returns:

Pointer to the undo stack, or nullptr if none.


function print#

Print debugging information.

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

Prints debugging information for the undo event.

Parameters:

  • offset Number of tab characters to prepend to each line of output.

function ~SBCUndoEvent#

Destructs the undo event.

virtual SBCUndoEvent::~SBCUndoEvent () 

Destroys the undo event.


Public Static Functions Documentation#

function getTypeString#

Returns the undo event type as a string.

static std::string SBCUndoEvent::getTypeString (
    Type type
) 

Returns the string representation of an undo event type.

Parameters:

  • type The undo event type to convert.

Returns:

The name of the event type as a string.


Protected Attributes Documentation#

variable dataPointer#

A pointer to the private data.

SBCUndoEventData* SBCUndoEvent::dataPointer;