AKWs in HDF5 backend

This commit is contained in:
Daniel Schwabeneder 2020-02-25 09:40:05 +01:00
parent 648c5ac587
commit d78bb56316

View File

@ -109,7 +109,7 @@ _hdf5_datapath(subpath::String) = "$_hdf5_dataroot/$subpath"
_hdf5_map_str2telem(k::String) = HDF5PLOT_MAP_STR2TELEM[k] _hdf5_map_str2telem(k::String) = HDF5PLOT_MAP_STR2TELEM[k]
_hdf5_map_str2telem(v::Vector) = HDF5PLOT_MAP_STR2TELEM[v[1]] _hdf5_map_str2telem(v::Vector) = HDF5PLOT_MAP_STR2TELEM[v[1]]
function _hdf5_merge!(dest::Dict, src::Dict) function _hdf5_merge!(dest, src)
for (k, v) in src for (k, v) in src
if isa(v, Axis) if isa(v, Axis)
_hdf5_merge!(dest[k].plotattributes, v.plotattributes) _hdf5_merge!(dest[k].plotattributes, v.plotattributes)
@ -295,7 +295,7 @@ function _hdf5plot_gwrite(grp, k::String, v::Tuple)
end end
#NOTE: _hdf5plot_overwritetype overwrites "Array" type with "Tuple". #NOTE: _hdf5plot_overwritetype overwrites "Array" type with "Tuple".
end end
function _hdf5plot_gwrite(grp, k::String, plotattributes::Dict) function _hdf5plot_gwrite(grp, k::String, plotattributes::AKW)
# @warn("Cannot write dict: $k=$plotattributes") # @warn("Cannot write dict: $k=$plotattributes")
end end
function _hdf5plot_gwrite(grp, k::String, v::AbstractRange) function _hdf5plot_gwrite(grp, k::String, v::AbstractRange)
@ -376,7 +376,7 @@ function _hdf5plot_gwrite(grp, k::String, v::Subplot)
_hdf5plot_writetype(grp, Subplot) _hdf5plot_writetype(grp, Subplot)
return return
end end
function _hdf5plot_write(grp, plotattributes::Dict) function _hdf5plot_write(grp, plotattributes::AKW)
for (k, v) in plotattributes for (k, v) in plotattributes
kstr = string(k) kstr = string(k)
_hdf5plot_gwrite(grp, kstr, v) _hdf5plot_gwrite(grp, kstr, v)
@ -567,7 +567,7 @@ function _hdf5plot_read(grp, k::String)
end end
#Read in values in group to populate plotattributes: #Read in values in group to populate plotattributes:
function _hdf5plot_read(grp, plotattributes::Dict) function _hdf5plot_read(grp, plotattributes::AKW)
gnames = names(grp) gnames = names(grp)
for k in gnames for k in gnames
try try