Views Application Framework Package API Reference Guide |
Views Documentation Home |
Application Framework command class. More...
#include <ilviews/appframe/command.h>
Public Member Functions | |
IlvDvCommand (const char *name=0) | |
Initializes a new IlvDvCommand object. More... | |
IlvDvCommand (const IlvDvCommand &source) | |
Copy constructor. More... | |
virtual | ~IlvDvCommand () |
Destructor. More... | |
virtual IlBoolean | bringChanges () const |
Query for the impact of the command on the document. More... | |
virtual IlBoolean | canUndo () const |
Query for undo capability. More... | |
virtual IlvDvCommand * | copy () const =0 |
Returns a copy of the command object. More... | |
virtual void | doIt ()=0 |
Called when the command must be executed. | |
virtual void | undo ()=0 |
Public Member Functions inherited from IlvDvSerializable | |
virtual void | serialize (IlvDvStream &stream) |
Serializes the object in the stream stream. Typically, the body of the method has the following form: More... | |
Application Framework command class.
Library: ilvappframe
This is the base class for all commands in the Application Framework package.
To define new commands, you need to create a subclass of this class and provide, as a minimum, an implementation for the doIt()
and undo()
methods.
IlvDvCommand::IlvDvCommand | ( | const char * | name = 0 | ) |
Initializes a new IlvDvCommand
object.
The name of this command is a copy of the string name.
If name is set to 0
, the command name is initialized to 0
.
name | The name of the new command. |
IlvDvCommand::IlvDvCommand | ( | const IlvDvCommand & | source | ) |
Copy constructor.
Initializes a new command object by copying the name of source.
source | The command object that is copied. |
|
virtual |
Destructor.
Releases all memory used by the command object.
|
virtual |
Query for the impact of the command on the document.
IlTrue
if the command modifies the document (so that it should be saved after doIt()
is called), and IlFalse
otherwise.IlTrue
.
|
virtual |
Query for undo capability.
IlTrue
if this command can be undone (if unDo()
makes sense), and IlFalse
otherwise.IlTrue
.
|
pure virtual |
Returns a copy of the command object.
|
pure virtual |
Called when the command must be undone.