rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Application Framework Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

List of all members | Public Member Functions
IlvDvCommand Class Referenceabstract

Application Framework command class. More...

#include <ilviews/appframe/command.h>

Inheritance diagram for IlvDvCommand:
IlvDvSerializable

Public Member Functions

 IlvDvCommand (const char *name=0)
 Initializes a new command. More...
 
 IlvDvCommand (const IlvDvCommand &source)
 Copies the constructor. More...
 
virtual ~IlvDvCommand ()
 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 IlvDvCommandcopy () 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...
 

Detailed Description

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.

Constructor & Destructor Documentation

IlvDvCommand::IlvDvCommand ( const char *  name = 0)

Initializes a new command.

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.

Parameters
nameThe name of the new command.
IlvDvCommand::IlvDvCommand ( const IlvDvCommand source)

Copies the constructor.

Initializes a new command object by copying the name of source.

Parameters
sourceThe command object that is copied.
virtual IlvDvCommand::~IlvDvCommand ( )
virtual

IlvDvCommand destructor.

Releases all memory used by the command object.

Member Function Documentation

virtual IlBoolean IlvDvCommand::bringChanges ( ) const
virtual

Query for the impact of the command on the document.

Returns
IlTrue if the command modifies the document (so that it should be saved after doIt is called), and IlFalse otherwise. The default implementation returns IlTrue.
virtual IlBoolean IlvDvCommand::canUndo ( ) const
virtual

Query for undo capability.

Returns
IlTrue if this command can be undone (if unDo makes sense), and IlFalse otherwise.
The default implementation returns IlTrue.
virtual IlvDvCommand* IlvDvCommand::copy ( ) const
pure virtual

Returns a copy of the command object.

Returns
A copy of the command object.
virtual void IlvDvCommand::undo ( )
pure virtual

Called when the command must be undone.


© Copyright 2012, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.