IDLitDataOperation

Superclasses | Creation | Properties | Methods | Examples | Version History | See Also

The IDLitDataOperation class is a subclass of IDLitOperation that automates data access and automatically records information for the undo-redo system. By automating this functionality, the IDLitDataOperation class eliminates much of the work required to implement a standard subclass of the IDLitOperation class. See IDLitOperation for additional information on iTool operations.

Note
The IDLitDataOperation class is designed for use in operations that affect data values. If you are creating an operation that acts on items other than the data that underlies a visualization, you should base your operation class on the IDLitOperation class.

While the implementation of a standard subclass of an IDLitOperation class requires the developer to provide implementations of the DoAction, UndoOperation, and RedoOperation methods, the IDLitDataOperation class provides these methods automatically. The only method the developer of an IDLitDataOperation class is required to implement is the Execute method, which contains the logic for the specific operation being performed. Depending on the operation being performed, the developer of an IDLitDataOperation may also implement methods to undo the operation, display a user interface before performing the operation, get and set properties specific to the operation, and initialize the IDLitDataOperation object.

When an IDLitDataOperation is requested by a user, the following things occur:

  1. As with any operation, execution commences when the DoAction method is called on this object. When called, the IDLitDataOperation retrieves the currently-selected items. If nothing is selected, the operation returns.
  2. For each selected item, the data objects of the parameters registered as "operation targets" are retrieved.
  3. The data objects are queried for iTool data types that match the types supported by the IDLitDataOperation.

For each data object that includes data of an iTool data type supported by the IDLitDataOperation, the following things occur:

  1. The data from the data object is retrieved.
  2. If the IDLitDataOperation does not have the REVERSIBLE_OPERATION property set, a copy of the data is created and placed into the undo-redo command set.
  3. The Execute method is called, with the retrieved data as its argument.
  4. If the Execute method succeeds and the IDLitDataOperation has the EXPENSIVE_COMPUTATION property set, a copy of the results is placed into the undo-redo command set.
  5. The result of the IDLitDataOperation is placed in the data object. This action will cause all visualization items that use the data object to update when the operation is completed.

Once all selected data items have been processed, the undo-redo command set is placed into the system undo-redo buffer for later use.

For a detailed discussion of both the IDLitOperation and IDLitDataOperation classes, see Creating an Operation (iTool Developer's Guide).

This class is written in the IDL language. Its source code can be found in the file idlitdataoperation__define.pro in the lib/itools/framework subdirectory of the IDL distribution.

Superclasses

IDLitOperation

Note
See the iTools Object Model Diagram (iTool Developer's Guide) for a visual representation of the iTools object model hierarchy.

Creation

See IDLitDataOperation::Init.

Properties

Objects of this class have the following properties. See IDLitDataOperation Properties for details on individual properties.

Methods

This class has the following methods:

In addition, this class inherits the methods of its superclasses (if any).

Examples

See Creating a New Data-Centric Operation (iTool Developer's Guide) for examples using this class and its methods.

Version History

6.0

Introduced

6.2

Added WITHIN_UI property

See Also

IDLitOperation