OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
|
This object represents one field in a DDFRecord. More...
#include <ossimIso8211.h>
Public Member Functions | |
void | Initialize (ossimDDFFieldDefn *, const char *pszData, int nSize) |
void | Dump (FILE *fp) |
Write out field contents to debugging file. More... | |
const char * | GetSubfieldData (ossimDDFSubfieldDefn *, int *=NULL, int=0) |
Fetch raw data pointer for a particular subfield of this field. More... | |
const char * | GetInstanceData (int nInstance, int *pnSize) |
Get field instance data and size. More... | |
const char * | GetData () |
Return the pointer to the entire data block for this record. More... | |
int | GetDataSize () |
Return the number of bytes in the data block returned by GetData(). More... | |
int | GetRepeatCount () |
How many times do the subfields of this record repeat? This will always be one for non-repeating fields. More... | |
ossimDDFFieldDefn * | GetFieldDefn () |
Fetch the corresponding DDFFieldDefn. More... | |
Private Attributes | |
ossimDDFFieldDefn * | poDefn |
int | nDataSize |
const char * | pachData |
This object represents one field in a DDFRecord.
This models an instance of the fields data, rather than it's data definition which is handled by the DDFFieldDefn class. Note that a DDFField doesn't have DDFSubfield children as you would expect. To extract subfield values use GetSubfieldData() to find the right data pointer and then use ExtractIntData(), ExtractFloatData() or ExtractStringData().
Definition at line 492 of file ossimIso8211.h.
void ossimDDFField::Dump | ( | FILE * | fp | ) |
Write out field contents to debugging file.
A variety of information about this field, and all it's subfields is written to the given debugging file handle. Note that field definition information (ala DDFFieldDefn) isn't written.
fp | The standard io file handle to write to. ie. stderr |
Definition at line 71 of file ossimDdffield.cpp.
References ossimDDFSubfieldDefn::DumpData(), ossimDDFSubfieldDefn::GetDataLength(), ossimDDFFieldDefn::GetName(), GetRepeatCount(), ossimDDFFieldDefn::GetSubfield(), ossimDDFFieldDefn::GetSubfieldCount(), min, nDataSize, pachData, and poDefn.
Referenced by ossimDDFRecord::Dump().
|
inline |
Return the pointer to the entire data block for this record.
This is an internal copy, and shouldn't be freed by the application.
Definition at line 509 of file ossimIso8211.h.
References pachData.
Referenced by ossimDDFRecord::Clone(), ossimDDFRecord::CloneOn(), GetInstanceData(), ossimAdrgHeader::parse(), ossimDDFRecord::ResetDirectory(), ossimDDFRecord::ResizeField(), ossimDDFRecord::SetFieldRaw(), and ossimDDFRecord::UpdateFieldRaw().
|
inline |
Return the number of bytes in the data block returned by GetData().
Definition at line 512 of file ossimIso8211.h.
References nDataSize.
Referenced by ossimDDFRecord::Clone(), ossimDDFRecord::CloneOn(), GetInstanceData(), ossimAdrgHeader::parse(), ossimDDFRecord::ResetDirectory(), ossimDDFRecord::ResizeField(), ossimDDFRecord::SetFieldRaw(), and ossimDDFRecord::UpdateFieldRaw().
|
inline |
Fetch the corresponding DDFFieldDefn.
Definition at line 517 of file ossimIso8211.h.
References poDefn.
Referenced by ossimDDFRecord::CloneOn(), ossimDDFRecord::CreateDefaultFieldInstance(), ossimDDFRecord::FindField(), ossimDDFRecord::GetFloatSubfield(), ossimDDFRecord::GetIntSubfield(), ossimDDFRecord::GetStringSubfield(), ossimAdrgHeader::parse(), ossimDDFRecord::ResetDirectory(), ossimDDFRecord::ResizeField(), ossimDDFRecord::SetFieldRaw(), ossimDDFRecord::SetFloatSubfield(), ossimDDFRecord::SetIntSubfield(), and ossimDDFRecord::SetStringSubfield().
const char * ossimDDFField::GetInstanceData | ( | int | nInstance, |
int * | pnInstanceSize | ||
) |
Get field instance data and size.
The returned data pointer and size values are suitable for use with DDFRecord::SetFieldRaw().
nInstance | a value from 0 to GetRepeatCount()-1. |
pnInstanceSize | a location to put the size (in bytes) of the field instance data returned. This size will include the unit terminator (if any), but not the field terminator. This size pointer may be NULL if not needed. |
Definition at line 280 of file ossimDdffield.cpp.
References GetData(), ossimDDFSubfieldDefn::GetDataLength(), GetDataSize(), GetRepeatCount(), ossimDDFFieldDefn::GetSubfield(), ossimDDFFieldDefn::GetSubfieldCount(), GetSubfieldData(), and poDefn.
Referenced by ossimDDFRecord::SetFieldRaw(), ossimDDFRecord::SetFloatSubfield(), ossimDDFRecord::SetIntSubfield(), ossimDDFRecord::SetStringSubfield(), and ossimDDFRecord::UpdateFieldRaw().
int ossimDDFField::GetRepeatCount | ( | ) |
How many times do the subfields of this record repeat? This
will always be one for non-repeating fields.
Definition at line 209 of file ossimDdffield.cpp.
References ossimDDFSubfieldDefn::GetDataLength(), ossimDDFFieldDefn::GetFixedWidth(), ossimDDFFieldDefn::GetSubfield(), ossimDDFFieldDefn::GetSubfieldCount(), ossimDDFSubfieldDefn::GetWidth(), ossimDDFFieldDefn::IsRepeating(), nDataSize, pachData, and poDefn.
Referenced by Dump(), GetInstanceData(), ossimDDFRecord::SetFieldRaw(), and ossimDDFRecord::UpdateFieldRaw().
const char * ossimDDFField::GetSubfieldData | ( | ossimDDFSubfieldDefn * | poSFDefn, |
int * | pnMaxBytes = NULL , |
||
int | iSubfieldIndex = 0 |
||
) |
Fetch raw data pointer for a particular subfield of this field.
The passed DDFSubfieldDefn (poSFDefn) should be acquired from the DDFFieldDefn corresponding with this field. This is normally done once before reading any records. This method involves a series of calls to DDFSubfield::GetDataLength() in order to track through the DDFField data to that belonging to the requested subfield. This can be relatively expensive.
poSFDefn | The definition of the subfield for which the raw data pointer is desired. |
pnMaxBytes | The maximum number of bytes that can be accessed from the returned data pointer is placed in this int, unless it is NULL. |
iSubfieldIndex | The instance of this subfield to fetch. Use zero (the default) for the first instance. |
Definition at line 152 of file ossimDdffield.cpp.
References ossimDDFSubfieldDefn::GetDataLength(), ossimDDFFieldDefn::GetFixedWidth(), ossimDDFFieldDefn::GetSubfield(), ossimDDFFieldDefn::GetSubfieldCount(), nDataSize, pachData, and poDefn.
Referenced by ossimDDFRecord::GetFloatSubfield(), GetInstanceData(), ossimDDFRecord::GetIntSubfield(), ossimDDFRecord::GetStringSubfield(), ossimAdrgHeader::parse(), ossimDDFRecord::SetFloatSubfield(), ossimDDFRecord::SetIntSubfield(), and ossimDDFRecord::SetStringSubfield().
void ossimDDFField::Initialize | ( | ossimDDFFieldDefn * | poDefnIn, |
const char * | pszData, | ||
int | nSize | ||
) |
Definition at line 48 of file ossimDdffield.cpp.
References nDataSize, pachData, and poDefn.
Referenced by ossimDDFRecord::AddField(), ossimDDFRecord::Clone(), ossimDDFRecord::CloneOn(), ossimDDFRecord::ResetDirectory(), and ossimDDFRecord::ResizeField().
|
private |
Definition at line 522 of file ossimIso8211.h.
Referenced by Dump(), GetDataSize(), GetRepeatCount(), GetSubfieldData(), and Initialize().
|
private |
Definition at line 524 of file ossimIso8211.h.
Referenced by Dump(), GetData(), GetRepeatCount(), GetSubfieldData(), and Initialize().
|
private |
Definition at line 520 of file ossimIso8211.h.
Referenced by Dump(), GetFieldDefn(), GetInstanceData(), GetRepeatCount(), GetSubfieldData(), and Initialize().