I am writing a code that reads a binary file and populates an OrderedDict. I have custom types that i made such as:
mutable struct WBGAIN
R::Float32
B::Float32
end
when i try to do something like this:
using DataStructures: OrderedDict
function readheader(fname)
h = OrderedDict()
fhtypes = OrderedDict( # File header
:HeadSize => UInt16,
:Compression => UInt16,
:Version => UInt16,
:WBgain1 => WBGAIN)
end
I get an error saying that the type WBGAIN is not supported by OrderedDict. Is there a way to put custom types into an OrderedDict?