190 Chapter 7: Creating an Operation
Example: Data Resample Operation iTool Developer’s Guide
IF ARG_PRESENT(y) THEN $
y = self._y
IF ARG_PRESENT(z) THEN $
z = self._z
IF ARG_PRESENT(method) THEN $
method = self._method
; Superclass properties.
IF (N_ELEMENTS(_extra) gt 0) THEN $
self->IDLitDataOperation::GetProperty, _EXTRA = _extra
END
Discussion
The GetProperty method for our operation supports four properties named X, Y, Z,
and METHOD, stored in instance data fields of the same name (with an underscore
prepended). If any of these properties is specified in the call to the GetProperty
method, its value is retrieved from the appropriate instance data field. Any other
properties included in the method call are passed to the superclass’ GetProperty
method.
SetProperty Method
PRO example1_opresample::SetProperty, $
X = x, $
Y = y, $
Z = z, $
METHOD = method, $
_REF_EXTRA = _extra
; My properties.
IF N_ELEMENTS(x) THEN $
IF (x NE 0) THEN self._x = x
IF N_ELEMENTS(y) THEN $
IF (y NE 0) THEN self._y = y
IF N_ELEMENTS(z) THEN $
IF (z NE 0) THEN self._z = z
IF N_ELEMENTS(method) THEN $
self._method = method
; Superclass properties.
IF (N_ELEMENTS(_extra) gt 0) THEN $
Comments to this Manuals