BooleanDatatypeWriter class
Writer for boolean HDF5 datatypes (stored as 8-bit enumeration)
This class handles writing datatype messages for boolean values. Booleans are stored as 8-bit enumerations with two members:
- FALSE = 0
- TRUE = 1
The writer follows HDF5 datatype message format version 1 for enum class (8).
Example usage:
// Create a boolean writer
final writer = BooleanDatatypeWriter();
final message = writer.writeMessage();
final size = writer.getSize(); // Returns 1
// Encode boolean values
final trueValue = writer.encodeValue(true); // Returns 1
final falseValue = writer.encodeValue(false); // Returns 0
- Inheritance
-
- Object
- DatatypeWriter
- BooleanDatatypeWriter
Constructors
- BooleanDatatypeWriter({Endian endian = Endian.little})
- Create a writer for boolean datatype
Properties
- datatypeClass → Hdf5DatatypeClass
-
Get the HDF5 datatype class
no setteroverride
- endian → Endian
-
Get the byte order for this datatype
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
decodeValue(
int value) → bool - Decode an integer value to boolean
-
encodeValue(
bool value) → int - Encode a boolean value to its integer representation
-
getSize(
) → int -
Get the size of the datatype in bytes
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
writeMessage(
) → List< int> -
Write the datatype message bytes
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited