ITT Rule IDL Version 7.0 User Manual Page 241

  • Download
  • Add to my manuals
  • Print
  • Page
    / 430
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 240
Chapter 9: Creating a File Reader 241
iTool Developer’s Guide Creating a New File Reader
Note
Any property registered with a call to the RegisterProperty method must be listed as
a keyword to the GetProperty method either of the visualization class or one of its
superclasses.
Note
A file reader need not register any properties at all, if the read operation is simple.
Many of the standard iTool image file readers work without registering any
properties.
See “IDLitReader::GetProperty” (IDL Reference Guide) for additional details.
Example GetProperty Method
PRO ExampleReader::GetProperty, _REF_EXTRA = _extra
IF (N_ELEMENTS(_extra) GT 0) THEN $
self->IDLitReader::GetProperty, _EXTRA = _extra
END
Discussion
The GetProperty method first defines the keywords it will accept. There must be a
keyword for each property of the file reader. Since the file reader we are creating has
no properties of its own, there are no keywords explicitly defined. The keyword
inheritance mechanism allows properties to be retrieved from the
ExampleReader
class’ superclasses without knowing the names of the properties.
Since our
ExampleReader class has no properties of its own, we simply call the
superclass’ GetProperty method, passing in all of the keywords stored in the
_extra
structure.
Creating a SetProperty Method
The file reader SetProperty method stores property values in the file reader object’s
instance data. It should set the specified property value, either by storing the value
directly in the visualization object’s instance data or by calling another class’
SetProperty method.
Page view 240
1 2 ... 236 237 238 239 240 241 242 243 244 245 246 ... 429 430

Comments to this Manuals

No comments