ITT Rule IDL Version 7.0 ユーザーズマニュアル

ページ / 430
230
Chapter 9: Creating a File Reader
Overview of iTool File Readers
iTool Developer’s Guide
Overview of iTool File Readers
file reader is an iTool component object class that defines how data stored in a file 
should be imported into the iTool environment. File readers have mechanisms for 
determining the type of data stored in a file, which allows them to create IDLitData 
objects from the stored data. Some file readers implement a graphical user interface 
allowing the user to specify the format of data before importing into the iTool; others 
read a well-defined file type and operate more or less automatically. Some examples 
of iTool file readers are:
the ASCII file reader, which uses the IDL ASCII_TEMPLATE and 
READ_ASCII functions to allow the user to define the format of data in a text 
file,
various image file readers, which allow the user to import data stored in JPEG, 
BMP, PNG, and other well-defined image format files,
a generic binary file reader, which allows the user to specify the format of files 
containing binary data.
A number of standard file readers are predefined and included in the IDL iTools 
package as described in 
The File Reader Creation Process
To create a new iTool file reader, you will do the following:
Choose an iTool file reader class on which your new operation will be based. 
In almost all cases, you will base your new operation on the IDLitReader class, 
which handles registration of standard file properties and provides standard 
messaging features.
Provide methods to check the type of data stored in the file and place the 
retrieved data in a data object.
Set data object properties.
 describes the process of creating a new file reader based on the 
IDLitReader class.