rwlogo
Rogue Wave Views 5.5.1

Rogue Wave Views
Application Framework Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvDvCommand Class Reference

Application Framework command class. More...

#include <ilviews/appframe/command.h>

Inheritance diagram for IlvDvCommand:
IlvDvSerializable

List of all members.

Public Member Functions

 IlvDvCommand (const IlvDvCommand &source)
 Copies the constructor.
 IlvDvCommand (const char *name=0)
 Initializes a new command.
virtual ~IlvDvCommand ()
 IlvDvCommand destructor.
virtual IlBoolean bringChanges () const
 Query for the impact of the command on the document.
virtual IlBoolean canUndo () const
 Query for undo capability.
virtual IlvDvCommand * copy () const =0
 Returns a copy of the command object.
virtual void doIt ()=0
 Called when the command must be executed.
virtual void undo ()=0

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:
name The 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:
source The 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.