BjdataConfig class final
How BJData is written.
Every encoding entry point takes one of these, so the settings can be declared once and passed around rather than threaded through call sites individually. The defaults target the current specification revision with Structure-of-Arrays packing enabled.
Decoding accepts everything this library understands, so none of these settings affect it.
Constructors
- BjdataConfig({BjdataVersion version = BjdataVersion.draft4, BjdataSoaLayout soa = BjdataSoaLayout.rowMajor, bool multiDimensional = true, bool compactTypes = true})
-
Creates a configuration, defaulting to draft 4 with row-major
Structure-of-Arrays packing.
const
Properties
- compactTypes → bool
-
Whether a value may be written as a type other than the one its Dart type
implies, when that is smaller.
final
- effectiveSoa → BjdataSoaLayout
-
The layout actually used, once version has had its say.
no setter
- hashCode → int
-
The hash code for this object.
no setteroverride
- multiDimensional → bool
-
Whether a container may be counted by a dimension array (
#[Nx Ny ...]) rather than by a single integer.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- soa → BjdataSoaLayout
-
The layout used for lists that are uniform tables of records.
final
- version → BjdataVersion
-
The specification revision to stay within.
final
Methods
-
copyWith(
{BjdataVersion? version, BjdataSoaLayout? soa, bool? multiDimensional, bool? compactTypes}) → BjdataConfig - A copy of this configuration with the given settings replaced.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Constants
- draft3 → const BjdataConfig
- Output a BJData draft 3 reader can parse, with no Structure-of-Arrays containers.
- draft4 → const BjdataConfig
- Output written to draft 4, which is what the defaults already do.