#include <iso8211.h>
Public Types | |
| enum | DDFBinaryFormat |
Public Member Functions | |
| const char * | GetName () |
| const char * | GetFormat () |
| DDFDataType | GetType () |
| double | ExtractFloatData (const char *pachData, int nMaxBytes, int *pnConsumedBytes) |
| int | ExtractIntData (const char *pachData, int nMaxBytes, int *pnConsumedBytes) |
| const char * | ExtractStringData (const char *pachData, int nMaxBytes, int *pnConsumedBytes) |
| int | GetDataLength (const char *, int, int *) |
| void | DumpData (const char *pachData, int nMaxBytes, FILE *fp) |
| int | FormatStringValue (char *pachData, int nBytesAvailable, int *pnBytesUsed, const char *pszValue, int nValueLength=-1) |
| int | FormatIntValue (char *pachData, int nBytesAvailable, int *pnBytesUsed, int nNewValue) |
| int | FormatFloatValue (char *pachData, int nBytesAvailable, int *pnBytesUsed, double dfNewValue) |
| int | GetWidth () |
| int | GetDefaultValue (char *pachData, int nBytesAvailable, int *pnBytesUsed) |
| void | Dump (FILE *fp) |
|
|
Binary format: this is the digit immediately following the B or b for binary formats. |
|
|
Write out subfield definition info to debugging file. A variety of information about this field definition is written to the give debugging file handle.
|
|
||||||||||||||||
|
Dump subfield value to debugging file.
|
|
||||||||||||||||
|
Extract a subfield value as a float. Given a pointer to the data for this subfield (from within a DDFRecord) this method will return the floating point data for this subfield. The number of bytes consumed as part of this field can also be fetched. This method may be called for any type of subfield, and will return zero if the subfield is not numeric.
|
|
||||||||||||||||
|
Extract a subfield value as an integer. Given a pointer to the data for this subfield (from within a DDFRecord) this method will return the int data for this subfield. The number of bytes consumed as part of this field can also be fetched. This method may be called for any type of subfield, and will return zero if the subfield is not numeric.
|
|
||||||||||||||||
|
Extract a zero terminated string containing the data for this subfield. Given a pointer to the data for this subfield (from within a DDFRecord) this method will return the data for this subfield. The number of bytes consumed as part of this field can also be fetched. This number may be one longer than the string length if there is a terminator character used. This function will return the raw binary data of a subfield for types other than DDFString, including data past zero chars. This is the standard way of extracting DDFBinaryString subfields for instance.
|
|
||||||||||||||||||||
|
Format float subfield value. Returns a buffer with the passed in float value reformatted in a way suitable for storage in a DDFField for this subfield. |
|
||||||||||||||||||||
|
Format int subfield value. Returns a buffer with the passed in int value reformatted in a way suitable for storage in a DDFField for this subfield. |
|
||||||||||||||||||||||||
|
Format string subfield value. Returns a buffer with the passed in string value reformatted in a way suitable for storage in a DDFField for this subfield. |
|
||||||||||||||||
|
Scan for the end of variable length data. Given a pointer to the data for this subfield (from within a DDFRecord) this method will return the number of bytes which are data for this subfield. The number of bytes consumed as part of this field can also be fetched. This number may be one longer than the length if there is a terminator character used. This method is mainly for internal use, or for applications which want the raw binary data to interpret themselves. Otherwise use one of ExtractStringData(), ExtractIntData() or ExtractFloatData().
|
|
||||||||||||||||
|
Get default data. Returns the default subfield data contents for this subfield definition. For variable length numbers this will normally be "0<unit-terminator>". For variable length strings it will be "<unit-terminator>". For fixed length numbers it is zero filled. For fixed length strings it is space filled. For binary numbers it is binary zero filled.
|
|
|
Get pointer to subfield format string |
|
|
Get pointer to subfield name. |
|
|
Get the general type of the subfield. This can be used to determine which of ExtractFloatData(), ExtractIntData() or ExtractStringData() should be used.
|
|
|
Get the subfield width (zero for variable). |
1.4.6