OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
|
The primary class for reading ISO 8211 files. More...
#include <ossimIso8211.h>
Public Member Functions | |
ossimDDFModule () | |
The constructor. More... | |
~ossimDDFModule () | |
The destructor. More... | |
int | Open (const char *pszFilename, int bFailQuietly=false) |
Open a ISO 8211 (DDF) file for reading. More... | |
int | Create (const char *pszFilename) |
void | Close () |
Close an ISO 8211 file. More... | |
int | Initialize (char chInterchangeLevel='3', char chLeaderIden='L', char chCodeExtensionIndicator='E', char chVersionNumber='1', char chAppIndicator=' ', const char *pszExtendedCharSet=" ! ", int nSizeFieldLength=3, int nSizeFieldPos=4, int nSizeFieldTag=4) |
void | Dump (FILE *fp) |
Write out module info to debugging file. More... | |
ossimDDFRecord * | ReadRecord (void) |
Read one record from the file. More... | |
void | Rewind (long nOffset=-1) |
Return to first record. More... | |
ossimDDFFieldDefn * | FindFieldDefn (const char *) |
Fetch the definition of the named field. More... | |
int | GetFieldCount () |
Fetch the number of defined fields. More... | |
ossimDDFFieldDefn * | GetField (int) |
Fetch a field definition by index. More... | |
void | AddField (ossimDDFFieldDefn *poNewFDefn) |
Add new field definition. More... | |
int | GetFieldControlLength () |
void | AddCloneRecord (ossimDDFRecord *) |
void | RemoveCloneRecord (ossimDDFRecord *) |
FILE * | GetFP () |
Private Attributes | |
FILE * | fpDDF |
int | bReadOnly |
long | nFirstRecordOffset |
char | _interchangeLevel |
char | _inlineCodeExtensionIndicator |
char | _versionNumber |
char | _appIndicator |
int | _fieldControlLength |
char | _extendedCharSet [4] |
long | _recLength |
char | _leaderIden |
long | _fieldAreaStart |
long | _sizeFieldLength |
long | _sizeFieldPos |
long | _sizeFieldTag |
int | nFieldDefnCount |
ossimDDFFieldDefn ** | papoFieldDefns |
ossimDDFRecord * | poRecord |
int | nCloneCount |
int | nMaxCloneCount |
ossimDDFRecord ** | papoClones |
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.
Definition at line 88 of file ossimIso8211.h.
ossimDDFModule::ossimDDFModule | ( | ) |
The constructor.
Definition at line 46 of file ossimDdfmodule.cpp.
References _appIndicator, _extendedCharSet, _fieldAreaStart, _fieldControlLength, _inlineCodeExtensionIndicator, _interchangeLevel, _leaderIden, _recLength, _sizeFieldLength, _sizeFieldPos, _sizeFieldTag, _versionNumber, bReadOnly, fpDDF, nCloneCount, nFieldDefnCount, nMaxCloneCount, papoClones, papoFieldDefns, and poRecord.
ossimDDFModule::~ossimDDFModule | ( | ) |
void ossimDDFModule::AddCloneRecord | ( | ossimDDFRecord * | poRecord | ) |
Definition at line 647 of file ossimDdfmodule.cpp.
References nCloneCount, nMaxCloneCount, ossimCPLRealloc(), papoClones, and poRecord.
Referenced by ossimDDFRecord::Clone(), and ossimDDFRecord::CloneOn().
void ossimDDFModule::AddField | ( | ossimDDFFieldDefn * | poNewFDefn | ) |
Add new field definition.
Field definitions may only be added to DDFModules being used for writing, not those being used for reading. Ownership of the DDFFieldDefn object is taken by the DDFModule.
poNewFDefn | definition to be added to the module. |
Definition at line 611 of file ossimDdfmodule.cpp.
References nFieldDefnCount, ossimCPLRealloc(), and papoFieldDefns.
void ossimDDFModule::Close | ( | ) |
Close an ISO 8211 file.
Definition at line 99 of file ossimDdfmodule.cpp.
References fpDDF, nCloneCount, nFieldDefnCount, nMaxCloneCount, papoClones, papoFieldDefns, and poRecord.
Referenced by ossimAdrgHeader::parse(), and ~ossimDDFModule().
int ossimDDFModule::Create | ( | const char * | pszFilename | ) |
Definition at line 381 of file ossimDdfmodule.cpp.
References _appIndicator, _extendedCharSet, _fieldAreaStart, _fieldControlLength, _inlineCodeExtensionIndicator, _interchangeLevel, _leaderIden, _recLength, _sizeFieldLength, _sizeFieldPos, _sizeFieldTag, _versionNumber, bReadOnly, fpDDF, ossimDDFFieldDefn::GenerateDDREntry(), nFieldDefnCount, OSSIM_DDF_FIELD_TERMINATOR, ossimNotify(), ossimNotifyLevel_WARN, and papoFieldDefns.
void ossimDDFModule::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.
fp | The standard io file handle to write to. ie. stderr. |
Definition at line 493 of file ossimDdfmodule.cpp.
References _appIndicator, _extendedCharSet, _fieldAreaStart, _fieldControlLength, _inlineCodeExtensionIndicator, _interchangeLevel, _leaderIden, _recLength, _sizeFieldLength, _sizeFieldPos, _sizeFieldTag, _versionNumber, ossimDDFFieldDefn::Dump(), nFieldDefnCount, and papoFieldDefns.
ossimDDFFieldDefn * ossimDDFModule::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.
pszFieldName | The name of the field to search for. The comparison is case insensitive. |
Definition at line 535 of file ossimDdfmodule.cpp.
References ossimDDFFieldDefn::GetName(), nFieldDefnCount, and papoFieldDefns.
Referenced by ossimDDFRecord::CloneOn().
ossimDDFFieldDefn * ossimDDFModule::GetField | ( | int | i | ) |
Fetch a field definition by index.
i | (from 0 to GetFieldCount() - 1. |
Definition at line 631 of file ossimDdfmodule.cpp.
References nFieldDefnCount, and papoFieldDefns.
|
inline |
Definition at line 122 of file ossimIso8211.h.
References _fieldControlLength.
Referenced by ossimDDFFieldDefn::Initialize().
|
inline |
Fetch the number of defined fields.
Definition at line 117 of file ossimIso8211.h.
References nFieldDefnCount.
|
inline |
Definition at line 127 of file ossimIso8211.h.
References fpDDF.
Referenced by ossimDDFRecord::Read().
int ossimDDFModule::Initialize | ( | char | chInterchangeLevel = '3' , |
char | chLeaderIden = 'L' , |
||
char | chCodeExtensionIndicator = 'E' , |
||
char | chVersionNumber = '1' , |
||
char | chAppIndicator = ' ' , |
||
const char * | pszExtendedCharSet = " ! " , |
||
int | nSizeFieldLength = 3 , |
||
int | nSizeFieldPos = 4 , |
||
int | nSizeFieldTag = 4 |
||
) |
Definition at line 353 of file ossimDdfmodule.cpp.
References _appIndicator, _extendedCharSet, _inlineCodeExtensionIndicator, _interchangeLevel, _leaderIden, _sizeFieldLength, _sizeFieldPos, _sizeFieldTag, and _versionNumber.
int ossimDDFModule::Open | ( | const char * | pszFilename, |
int | bFailQuietly = false |
||
) |
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.
pszFilename | The name of the file to open. |
bFailQuietly | If false a CPL Error is issued for non-8211 files, otherwise quietly return NULL. |
Definition at line 164 of file ossimDdfmodule.cpp.
Referenced by ossimAdrgHeader::parse().
ossimDDFRecord * ossimDDFModule::ReadRecord | ( | void | ) |
Read one record from the file.
Definition at line 585 of file ossimDdfmodule.cpp.
References poRecord, and ossimDDFRecord::Read().
Referenced by ossimAdrgHeader::parse().
void ossimDDFModule::RemoveCloneRecord | ( | ossimDDFRecord * | poRecord | ) |
Definition at line 670 of file ossimDdfmodule.cpp.
References nCloneCount, papoClones, and poRecord.
Referenced by ossimDDFRecord::CloneOn(), and ossimDDFRecord::~ossimDDFRecord().
void ossimDDFModule::Rewind | ( | long | nOffset = -1 | ) |
Return to first record.
The next call to ReadRecord() will read the first data record in the file.
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. |
Definition at line 702 of file ossimDdfmodule.cpp.
References ossimDDFRecord::Clear(), fpDDF, nFirstRecordOffset, and poRecord.
|
private |
Definition at line 137 of file ossimIso8211.h.
Referenced by Create(), Dump(), Initialize(), and ossimDDFModule().
|
private |
Definition at line 139 of file ossimIso8211.h.
Referenced by Create(), Dump(), Initialize(), and ossimDDFModule().
|
private |
Definition at line 143 of file ossimIso8211.h.
Referenced by Create(), Dump(), and ossimDDFModule().
|
private |
Definition at line 138 of file ossimIso8211.h.
Referenced by Create(), Dump(), GetFieldControlLength(), and ossimDDFModule().
|
private |
Definition at line 135 of file ossimIso8211.h.
Referenced by Create(), Dump(), Initialize(), and ossimDDFModule().
|
private |
Definition at line 134 of file ossimIso8211.h.
Referenced by Create(), Dump(), Initialize(), and ossimDDFModule().
|
private |
Definition at line 142 of file ossimIso8211.h.
Referenced by Create(), Dump(), Initialize(), and ossimDDFModule().
|
private |
Definition at line 141 of file ossimIso8211.h.
Referenced by Create(), Dump(), and ossimDDFModule().
|
private |
Definition at line 144 of file ossimIso8211.h.
Referenced by Create(), Dump(), Initialize(), and ossimDDFModule().
|
private |
Definition at line 145 of file ossimIso8211.h.
Referenced by Create(), Dump(), Initialize(), and ossimDDFModule().
|
private |
Definition at line 146 of file ossimIso8211.h.
Referenced by Create(), Dump(), Initialize(), and ossimDDFModule().
|
private |
Definition at line 136 of file ossimIso8211.h.
Referenced by Create(), Dump(), Initialize(), and ossimDDFModule().
|
private |
Definition at line 131 of file ossimIso8211.h.
Referenced by Create(), and ossimDDFModule().
|
private |
Definition at line 130 of file ossimIso8211.h.
Referenced by Close(), Create(), GetFP(), ossimDDFModule(), and Rewind().
|
private |
Definition at line 154 of file ossimIso8211.h.
Referenced by AddCloneRecord(), Close(), ossimDDFModule(), and RemoveCloneRecord().
|
private |
Definition at line 149 of file ossimIso8211.h.
Referenced by AddField(), Close(), Create(), Dump(), FindFieldDefn(), GetField(), GetFieldCount(), and ossimDDFModule().
|
private |
Definition at line 132 of file ossimIso8211.h.
Referenced by Rewind().
|
private |
Definition at line 155 of file ossimIso8211.h.
Referenced by AddCloneRecord(), Close(), and ossimDDFModule().
|
private |
Definition at line 156 of file ossimIso8211.h.
Referenced by AddCloneRecord(), Close(), ossimDDFModule(), and RemoveCloneRecord().
|
private |
Definition at line 150 of file ossimIso8211.h.
Referenced by AddField(), Close(), Create(), Dump(), FindFieldDefn(), GetField(), and ossimDDFModule().
|
private |
Definition at line 152 of file ossimIso8211.h.
Referenced by AddCloneRecord(), Close(), ossimDDFModule(), ReadRecord(), RemoveCloneRecord(), and Rewind().