Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.


Harris Geospatial / Docs Center / Using IDL / IDLTaskFromProcedure

IDL

IDLTaskFromProcedure

IDLTaskFromProcedure

IDLTask uses the IDLTaskFromProcedure class if the base_class key in the task template is set to IDLTaskFromProcedure. This class calls the user-defined IDL procedure referenced by the ROUTINE property when IDLTask::Execute is called.

Note: For instructions on writing a custom task that wraps an IDL procedure, see Example: User-Defined Procedure in the Custom Tasks topic.

It translates the IDLParameter values to the keywords in the user-defined IDL procedure during execution. As such, the procedure must use only keywords, not positional parameters.

This class is also inherited by objects that override the PreExecute, DoExecute, or PostExecute methods, in order to add functionality to the custom task without having to update the procedure.

To overload the behavior of IDLTaskFromProcedure, write a new class that implements PreExecute, DoExecute, or PostExecute. Then add IDLTaskFromProcedure as a superclass of the new class. In the task template, base_class would refer to the new class instead of IDLTaskFromProcedure.

IDLTaskFromProcedure inherits from IDLTask. When creating your own base class, you can call IDLTask methods and properties to retrieve information on items such as task parameters.

Syntax


This class serves as a default implementation for wrapping an IDL procedure as an IDLTask. It can be used as-is or sub-classed to enhance the behavior, for example, adding more input parameter validation.

Methods


Properties


IDLTaskFromProcedure inherits all properties from IDLTask.

ROUTINE

The name of the procedure that is wrapped by this task.


IDLTaskFromProcedure::PreExecute


The PreExecute method is called first when IDLTask::Execute runs. It performs the following actions:

  • Resets all output parameters to !NULL.
  • Updates input parameter values from keywords set on IDLTask::Execute.
  • Validates that all required parameters are set.

Syntax


In most cases, the PreExecute method is called by IDLTask::Execute. The only time it should be called explicitly is when a base class other than IDLTaskFromProcedure overrides IDLTask::Execute. When called explicitly, the syntax is as follows:

Obj->[IDLTaskFromProcedure::]PreExecute, _REF_EXTRA=refExtra

Routine Signature


To overload an object class in order to add more functionality to PreExecute, implement a method with the following signature:

PRO class::PreExecute, _REF_EXTRA=refExtra

IDLTaskFromProcedure::DoExecute


The DoExecute method is called by IDLTask::Execute after a successful call to the PreExecute method. The DoExecute method maps all input parameter values to keywords to call the procedure named by the ROUTINE property.

Syntax


In most cases, the DoExecute method is called by IDLTask::Execute. The only time it should be called explicitly is when a base class other than IDLTaskFromProcedure overrides IDLTask::Execute. When called explicitly, the syntax is as follows:

Obj->[IDLTaskFromProcedure::]DoExecute

Routine Signature


To overload an object class in order to add more functionality to DoExecute, implement a method with the following signature:

PRO class::DoExecute

IDLTaskFromProcedure::PostExecute


The PostExecute method is called by IDLTask::Execute after a successful call to the DoExecute method. The PostExecute method copies the values from the output parameters to the matching keywords that were passed into IDLTask::Execute.

Syntax


In most cases, the PostExecute method is called by IDLTask::Execute. The only time it should be called explicitly is when a base class other than IDLTaskFromProcedure overrides IDLTask::Execute. When called explicitly, the syntax is as follows:

Obj->[IDLTaskFromProcedure::]PostExecute, _REF_EXTRA=refExtra

Routine Signature


To overload an object class in order to add more functionality to PreExecute, implement a method with the following signature:

PRO class::PostExecute, _REF_EXTRA=refExtra

Version History


8.5.2 Introduced



© 2017 Exelis Visual Information Solutions, Inc. |  Legal
My Account    |    Buy    |    Contact Us