ITT Rule IDL Version 7.0 User Manual Page 156

  • Download
  • Add to my manuals
  • Print
  • Page
    / 430
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 155
156 Chapter 7: Creating an Operation
Creating a New Data-Centric Operation iTool Developer’s Guide
Note
Your operation class may have multiple superclasses. In general, each superclass’
Init method should be invoked by your class’ Init method.
Error Checking
Rather than simply calling the superclass Init method, it is a good idea to check
whether the call to the superclass Init method succeeded. The following statement
checks the value returned by the superclass Init method; if the returned value is 0
(indicating failure), the current Init method also immediately returns with a value of
0:
IF ( self->
SomeOperationClass
::Init(_EXTRA = _extra) EQ 0) THEN $
RETURN, 0
This convention is used in all operation classes included with IDL. We strongly
suggest that you include similar checks in your own class definition files.
Keywords to the Init Method
Properties of the operation class can be set in the Init method by specifying the
property names and values as IDL keyword-value pairs. In addition to any keywords
implemented directly in the Init method of the superclass on which you base your
class, the properties of the IDLitOperation class and the IDLitComponent class are
available to any operation class. See “IDLitOperation Properties” and
“IDLitComponent Properties” (IDL Reference Guide).
Note
Always use keyword inheritance (the _EXTRA keyword) to pass keyword
parameters through to the superclass. (See “Keyword Inheritance” (Chapter 5,
Application Programming) for details on IDLs keyword inheritance mechanism.)
Standard Base Class
While you can create your new operation class from any existing operation class, in
many cases, data-centric operation classes you create will be subclassed directly from
the base class IDLitDataOperation:
IF (self->IDLitDataOperation::Init(_EXTRA = _extra) EQ 0) $
THEN RETURN, 0
The IDLitDataOperation class provides the base iTool functionality used in the data-
centric operation classes created by ITT Visual Information Solutions. See
“Subclassing from the IDLitDataOperation Class on page 153 for details.
Page view 155
1 2 ... 151 152 153 154 155 156 157 158 159 160 161 ... 429 430

Comments to this Manuals

No comments