BinaryRecordReader.construct_reader_deepMethod
construct_reader_deep(S,array_specs)

Generates a Base.read(io::IOStream, ::Type{S}) method that can used read type S, which is not an isbitstype. If the class in question has other fields that made of up of other non-isbitstypes a full specification put in place in the array_spec. The syntax for types is SubTypeName__fieldname.

Example

julia> struct C
            lat::Float32
            time::Matrix{Int32}
        end
julia> struct B
            fun::UInt8
            funMat::Matrix{UInt16}
        end
julia> struct A
            long::Float32
            COG::UInt16
            funky::AnotherSimpleRecMat
            data::Matrix{SimpleRecMat}
        end

julia> construct_reader_deep(A, (data=(5,5), B__funMat=(2,2), C__time =(3,3)))

The above will generate three read methods for all the three types defined.

See also: construct_reader_shallow, @construct_reader

BinaryRecordReader.construct_reader_shallowMethod
construct_reader_shallow(S,array_specs)

Generates a Base.read(io::IOStream, ::Type{S}) method that can used read type S, which is not an isbitstype. The named tuble, array_spec, is used to define the dimensionality of the field in question.

Example

julia> struct CompoundStruct
           long::Float32
           COG::UInt16
           data::Matrix{Float64}
       end
julia> construct_reader_shallow(CompoundStruct, (data=(10,10),))

The above will generate a suitable read method assuming that the data field is a 10x10 matrix.

See also: construct_reader_deep, @construct_reader

BinaryRecordReader.@construct_readerMacro
@construct_reader S array_specs

Generates a Base.read(io::IOStream, ::Type{S}) method that can used read type S, which is not an isbitstype.

Example

julia> struct CompoundStruct
           long::Float32
           COG::UInt16
           data::Matrix{Float64}
       end
julia> @construct_reader CompoundStruct (data=(10,10),)

The above will generate a suitable read method assuming that the data field is a 10x10 matrix.

See also: construct_reader_deep, @construct_reader