Struct Iso8211SubfieldFormat
Describes the format of an ISO 8211 subfield.
public readonly record struct Iso8211SubfieldFormat : IEquatable<Iso8211SubfieldFormat>
- Implements
- Inherited Members
Remarks
The format type and width determine how subfield data is encoded in data records. Common format types used in S-57 ENC files include:
AorA(n)— ASCII character data (variable or fixed length)I(n)— Integer as ASCII digitsR(n)— Real number as ASCIIb11— Unsigned 8-bit integer (1 byte)b12— Unsigned 16-bit integer (2 bytes)b14— Unsigned 32-bit integer (4 bytes)b21— Signed 8-bit integer (1 byte)b22— Signed 16-bit integer (2 bytes)b24— Signed 32-bit integer (4 bytes)
Properties
ByteSize
Gets the size in bytes of this subfield for binary types.
public int ByteSize { get; }
Property Value
Remarks
For binary types, this equals Width. For character-based types, this equals Width when fixed-length, or 0 when variable-length.
FormatType
Gets the format type of this subfield.
public Iso8211SubfieldFormatType FormatType { get; init; }
Property Value
IsFixedWidth
Gets whether this subfield has a fixed width.
public bool IsFixedWidth { get; }
Property Value
IsVariableLength
Gets whether this subfield has variable length (terminated by a delimiter).
public bool IsVariableLength { get; }
Property Value
Width
Gets the width (size) of this subfield in characters or bytes, or 0 for variable-length fields.
public int Width { get; init; }
Property Value
Remarks
For character-based formats (CharacterData, Integer, Real), this is the number of characters. A value of 0 indicates variable-length data terminated by a unit terminator (0x1F) or field terminator (0x1E).
For binary formats (UnsignedInteger, SignedInteger), this is the number of bytes.
Methods
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.