Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages  

DDFModule Class Reference

The primary class for reading ISO 8211 files. More...

#include <iso8211.h>

List of all members.


Public Members

 DDFModule ()
The constructor.

 ~DDFModule ()
The destructor.

int Open ( const char * pszFilename )
Open a ISO 8211 (DDF) file for reading. More...

void Close ()
Close an ISO 8211 file.

void Dump ( FILE * fp )
Write out module info to debugging file. More...

DDFRecordReadRecord ( void )
Read one record from the file. More...

void Rewind ( long nOffset = -1 )
Return to first record. More...

DDFFieldDefnFindFieldDefn ( const char * )
Fetch the definition of the named field. More...

int GetFieldCount ()
Fetch the number of defined fields.

DDFFieldDefnGetField (int)
Fetch a field definition by index. More...


Detailed Description

The primary class for reading ISO 8211 files.

This class contains all the information read from the DDR record, and is used to read records from the file.


Member Function Documentation

int DDFModule::Open (const char * pszFilename)

Open a ISO 8211 (DDF) file for reading.

If the open succeeds the data descriptive record (DDR) will have been read, and all the field and subfield definitions will be available.

Parameters:
pszFilename - The name of the file to open.

Returns:
FALSE if the open fails or TRUE if it succeeds. Errors messages are issued internally with CPLError().

void DDFModule::Dump (FILE * fp)

Write out module info to debugging file.

A variety of information about the module is written to the debugging file. This includes all the field and subfield definitions read from the header.

Parameters:
fp - The standard io file handle to write to. ie. stderr.

DDFRecord * DDFModule::ReadRecord (void)

Read one record from the file.

Returns:
A pointer to a DDFRecord object is returned, or NULL if a read error, or end of file occurs. The returned record is owned by the module, and should not be deleted by the application. The record is only valid untill the next ReadRecord() at which point it is overwritten.

void DDFModule::Rewind (long nOffset = -1)

Return to first record.

The next call to ReadRecord() will read the first data record in the file.

Parameters:
nOffset - the offset in the file to return to. By default this is -1, a special value indicating that reading should return to the first data record. Otherwise it is an absolute byte offset in the file.

DDFFieldDefn * DDFModule::FindFieldDefn (const char * pszFieldName)

Fetch the definition of the named field.

This function will scan the DDFFieldDefn's on this module, to find one with the indicated field name.

Parameters:
pszFieldName - The name of the field to search for. The comparison is case insensitive.

Returns:
A pointer to the request DDFFieldDefn object is returned, or NULL if none matching the name are found. The return object remains owned by the DDFModule, and should not be deleted by application code.

DDFFieldDefn * DDFModule::GetField (int i)

Fetch a field definition by index.

Parameters:
i - (from 0 to GetFieldCount() - 1.
Returns:
the returned field pointer or NULL if the index is out of range.

The documentation for this classwas generated from the following files:
Generated at Wed Sep 22 10:32:06 1999 for SDTS_AL by doxygen  written by Dimitri van Heesch, © 1997-1999