ITT Rule IDL Version 7.0 Manuel d'utilisateur Page 249

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 430
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 248
Chapter 9: Creating a File Reader 249
iTool Developer’s Guide Example: TIFF File Reader
Init Method
FUNCTION example1_readtiff::Init, _REF_EXTRA = _extra
; Call the superclass Init method
IF (self->IDLitReader::Init(["tiff", "tif"],$
NAME="Tiff Files", $
DESCRIPTION="TIFF File format", $
_EXTRA = _extra) NE 1) THEN $
RETURN, 0
; Initialize the instance data field
self._index = 0
; Register the index property
self->RegisterProperty, 'IMAGE_INDEX', /INTEGER, $
Description='Index of the image to read from the TIFF file.'
RETURN,1
END
Discussion
The first item in our class definition file is the Init method. The Init method’s
function signature is defined first, using the class name example1_readtiff. The
_REF_EXTRA keyword inheritance mechanism allows any keywords specified in a
call to the Init method to be passed through to routines that are called within the Init
method even if we do not know the names of those keywords in advance.
Next, we call the Init method of the superclass. In this case, we are creating a subclass
of the IDLitReader class; this provides us with all of the standard iTool file reader
functionality automatically. Any “extra” keywords specified in the call to our Init
method are passed to the IDLitReader::Init method via the keyword inheritance
mechanism.
We specify a list of accepted filename extensions (
tiff and tif, in this case) via the
Extensions argument. We specify a value for the NAME property of the reader object
(this is displayed in the system preferences dialog) and include a description of the
reader via the DESCRIPTION keyword. Finally, we use the _EXTRA keyword
inheritance mechanism to pass through any keywords provided when the Init method
is called.
Our TIFF reader object has a single instance data field: _index, which is used to store
the index number of the image to read from a multi-image TIFF file. We initialize
this instance data field to 0, and register the IMAGE_INDEX property to provide
access to this field via the property sheet interface.
Vue de la page 248
1 2 ... 244 245 246 247 248 249 250 251 252 253 254 ... 429 430

Commentaires sur ces manuels

Pas de commentaire

Capteurs manuels

Choisissez votre marque de {catégorie} pour le téléchargement des manuels et guides d'utilisation

Liste des marques pour la catégorie des manuels Capteurs
Marques Meilleurs modèles
Industrial-data-systems                               IDS DT220 IDS DT200 Autres catégories
Meteor                               C-80 DMX Controller C240 F Controller C192 Controller Autres catégories
Osco                               MG0-20 Autres catégories
Ameri-King                               AK-451-ELT AK-451-P-ELT Autres catégories
Omega                               CNiS8DV CDTX-90 OS35 FTB600B Autres catégories
Brooks-instrument                               BM50 BM02 Autres catégories
Zytronic                               ZXY110 ZXY200 Autres catégories
Spypoint                               S-MS-1 S-WRL Autres catégories
Chief Manufacturing                               Dual Stud Adapter CTA-111 Single Stud Wall Arm CTA-025 Dual Stud Wall Arm CTA-225 Internal Dual Stud Wall Plate CTA-2536 Autres catégories
Garmin                               GTS 855 GPSMAP 5000 GLO Autres catégories
APC                               150 155 Источник бесперебойного питания 2U REMOTE POWER-OFF DEVICE AP9830 Autres catégories
Teledyne                               MX300-I Trace Oxygen Analyzer 3000TA Trace Oxygen Analyzer 3000TA-XL-EU MX300 Autres catégories
Schumacher                               E-CHARGE VTV-20 IP-75 e-Charge 00-99-000568 Autres catégories
Invacare                               IRC10LX PLATINUM 5 IRC5LXO2 Autres catégories
AOSafety                               Eye Gear Rotational Display A1655 OMNI STAR M-Tac Surgical Respirator N95 Autres catégories
Universal-remote-control-urs                               THZ-100 THZ-100 Rev 03 MRX-4SEN Thermo Control Autres catégories
Firstech, LLC.                               CS-600 DATA CONTROLLER FT-MB164-DC FT-MB211-DC CM6200 Autres catégories
Innotech                               Device Communications Genesis II Digital Controller (v5) Maxim Device Network Cabling Autres catégories
Niles Audio                               TS100 WS110R WS100R Autres catégories
Interlink-electronics                               Ring Sensor 4-Zone FSR Mouse Sensor FSLP Sensor Autres catégories