Rogue Wave Views
Manager Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions
IlvManagerCommand Class Referenceabstract

Manager command class. More...

#include <ilviews/manager/commands.h>

Inheritance diagram for IlvManagerCommand:
IlvCommand IlvAction IlvAddObjectCommand IlvAddObjectsCommand IlvAddTransformCommand IlvChangeLayerCommand IlvDeleteObjectCommand IlvDeleteObjectsCommand IlvGroupObjectCommand IlvPushObjectsCommand IlvReshapeObjectCommand IlvRotateObjectCommand IlvSetTransformCommand IlvSetViewGeometryCommand IlvSymmetryObjectCommand IlvTranslateObjectCommand IlvTranslateViewCommand

Public Member Functions

 IlvManagerCommand (IlvManager *manager)
 Constructor. More...
 
IlvManagergetManager () const
 Returns the manager. More...
 

Detailed Description

Manager command class.

Library: ilvmgr

The class IlvManagerCommand is a subclass of IlvCommand that makes the undo mechanism provided in earlier versions of Rogue Wave Views compatible with the command history mechanism provided in Rogue Wave Views 4.0. It is provided for compatibility purposes only. New command classes should inherit directly from IlvCommand and not from IlvManagerCommand. With the command history mechanism, we recommend that you let the manager and the commands store the various states and apply the modifications in the appropriate order, instead of instantiating commands and adding them to the command history. Doing so will allow you to encapsulate the result of commands in a more efficient way and redo them more easily.
For example, if you want to change the layer of an object and record this change, we suggest that you proceed like this:

myManager->addCommand(new IlvChangeLayerCommand(myManager, newLayer, 1, &myObject);

and not as shown below, which is more complex and inaccurate:

int myOldLayer = myManager->getLayer(myObject);
myManager->remove(myObject, IlFalse);
myManager->addObject(myObject, newLayer);
myManager->addCommand(new IlvChangerLayerCommand(myManager, newLayer, 1, &myObject, &myOldLayer, 0));
See also
IlvGrapher, IlvManager, IlvCommandHistory

Constructor & Destructor Documentation

§ IlvManagerCommand()

IlvManagerCommand::IlvManagerCommand ( IlvManager manager)

Constructor.

Creates a new instance of IlvManagerCommand for a given manager.

Parameters
managerA pointer to the manager.

Member Function Documentation

§ getManager()

IlvManager* IlvManagerCommand::getManager ( ) const

Returns the manager.

Returns
The manager for which this command has been created.

© Copyright 2018, 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.