76 if( getenv(
"DDF_MAXDUMP") != NULL )
77 nMaxRepeat = atoi(getenv(
"DDF_MAXDUMP"));
79 fprintf( fp,
" DDFField:\n" );
81 fprintf( fp,
" DataSize = %d\n",
nDataSize );
83 fprintf( fp,
" Data = `" );
87 fprintf( fp,
"\\%02X", ((
unsigned char *)
pachData)[i] );
99 int iOffset = 0, nLoopCount;
101 for( nLoopCount = 0; nLoopCount <
GetRepeatCount(); nLoopCount++ )
103 if( nLoopCount > nMaxRepeat )
105 fprintf( fp,
" ...\n" );
120 iOffset += nBytesConsumed;
153 int *pnMaxBytes,
int iSubfieldIndex )
158 if( poSFDefn == NULL )
167 while( iSubfieldIndex >= 0 )
174 if( poThisSFDefn == poSFDefn && iSubfieldIndex == 0 )
176 if( pnMaxBytes != NULL )
184 iOffset += nBytesConsumed;
233 int iOffset = 0, iRepeatCount = 1;
243 nBytesConsumed = poThisSFDefn->
GetWidth();
249 iOffset += nBytesConsumed;
251 return iRepeatCount - 1;
281 int *pnInstanceSize )
285 const char *pachWrkData;
287 if( nInstance < 0 || nInstance >= nRepeatCount )
297 if( pnInstanceSize != 0 )
306 int nBytesRemaining1=0, nBytesRemaining2=0;
318 if( pnInstanceSize != NULL )
321 int nLastSubfieldWidth;
322 const char *pachLastData;
328 poLastSubfield->
GetDataLength( pachLastData, nBytesRemaining2,
329 &nLastSubfieldWidth );
332 nBytesRemaining1 - (nBytesRemaining2 - nLastSubfieldWidth);
void Initialize(ossimDDFFieldDefn *, const char *pszData, int nSize)
Information from the DDR defining one field.
int GetDataSize()
Return the number of bytes in the data block returned by GetData().
const char * GetName()
Fetch a pointer to the field name (tag).
const char * GetSubfieldData(ossimDDFSubfieldDefn *, int *=NULL, int=0)
Fetch raw data pointer for a particular subfield of this field.
int GetRepeatCount()
How many times do the subfields of this record repeat? This will always be one for non-repeating fie...
int GetFixedWidth()
Get the width of this field.
const char * GetData()
Return the pointer to the entire data block for this record.
const char * GetInstanceData(int nInstance, int *pnSize)
Get field instance data and size.
int GetSubfieldCount()
Get the number of subfields.
void Dump(FILE *fp)
Write out field contents to debugging file.
int GetDataLength(const char *, int, int *)
Scan for the end of variable length data.
int GetWidth()
Get the subfield width (zero for variable).
void DumpData(const char *pachData, int nMaxBytes, FILE *fp)
Dump subfield value to debugging file.
int IsRepeating()
Fetch repeating flag.
ossimDDFSubfieldDefn * GetSubfield(int i)
Fetch a subfield by index.
Information from the DDR record describing one subfield of a DDFFieldDefn.
ossimDDFFieldDefn * poDefn