Sourceforge.net - The VCF's Project Host
   The VCF Website Home   |   Online Discussion Forums   |   Sourceforge.net Project Page   

VCF::AbstractCommand Class Reference

A partial implementation of the Command interface. More...

#include <vcf/ApplicationKit/AbstractCommand.h>

Inheritance diagram for VCF::AbstractCommand:

VCF::Object VCF::Command VCF::CommandGroup List of all members.

Public Member Functions

 AbstractCommand ()
virtual ~AbstractCommand ()
virtual UndoRedoStackgetOwningStack ()
 returns the UndoRedoStack that owns this command.
virtual void setOwningStack (UndoRedoStack *stack)
 sets the owning UndoRedoStack for this command
virtual String getName ()
 The name of this command.
virtual void setName (const String &name)
 sets the name of this command
virtual bool isUndoable ()
 Is this command undoable ?

Protected Attributes

UndoRedoStackstack_
String commandName_
bool isUndoable_

Detailed Description

A partial implementation of the Command interface.

Useful for using as a base class when creating your own Command based classes.


Constructor & Destructor Documentation

VCF::AbstractCommand::AbstractCommand  ) 
 

virtual VCF::AbstractCommand::~AbstractCommand  )  [virtual]
 


Member Function Documentation

virtual String VCF::AbstractCommand::getName  )  [inline, virtual]
 

The name of this command.

Frequently the name is the basis for the display text that is shown in the "Edit | Undo" or "Edit | Redo" menu items.

Returns:
String the name of this command

Implements VCF::Command.

virtual UndoRedoStack* VCF::AbstractCommand::getOwningStack  )  [inline, virtual]
 

returns the UndoRedoStack that owns this command.

Returns:
UndoRedoStack a pointer to the current UndoRedoStack instance for this command object.

Implements VCF::Command.

virtual bool VCF::AbstractCommand::isUndoable  )  [inline, virtual]
 

Is this command undoable ?

Returns:
bool true if the command's undo()/redo() methods can be safely called, otherwise false. Commands that return false for this method are usually not added to the UndoRedoStack though they will be executed.

Implements VCF::Command.

virtual void VCF::AbstractCommand::setName const String name  )  [inline, virtual]
 

sets the name of this command

Implements VCF::Command.

virtual void VCF::AbstractCommand::setOwningStack UndoRedoStack stack  )  [inline, virtual]
 

sets the owning UndoRedoStack for this command

Parameters:
UndoRedoStack the UndoRedoStack that will own this command

Implements VCF::Command.


Member Data Documentation

String VCF::AbstractCommand::commandName_ [protected]
 

bool VCF::AbstractCommand::isUndoable_ [protected]
 

UndoRedoStack* VCF::AbstractCommand::stack_ [protected]
 


The documentation for this class was generated from the following file:
   Comments or Suggestions?    License Information