Template Class VariantChannelIO

Class Documentation

template<typename BaseIO>
class VariantChannelIO

Hdf5IO Feature for handling VariantChannel related IO.

This Feature of the Hdf5IO handles the IO of a VariantChannel object.

Example:

MyHdf5IO io;

// example data
using MultiChannel = VariantChannel<float, char, int>;
MultiChannel vchannel, vchannel_in;
Channel<float> samples(100,100);
vchannel = samples;

// writing
io.open("test.h5");
io.save("avariantchannel", vchannel);

// reading
vchannel_in = *io.loadVariantChannel<MultiChannel>("avariantchannel");

// if the type is known you can also load via ChannelIO
vchannel_in = *io.loadChannel<float>("avariantchannel");

Dependencies:

Public Functions

template<typename ...Tp>
void save(std::string groupName, std::string datasetName, const VariantChannel<Tp...> &vchannel) const
template<typename VariantChannelT>
boost::optional<VariantChannelT> load(std::string groupName, std::string datasetName) const
template<typename VariantChannelT>
boost::optional<VariantChannelT> loadVariantChannel(std::string groupName, std::string datasetName) const

Protected Attributes

BaseIO *m_baseIO = static_cast<BaseIO*>(this)
ChannelIO<BaseIO> *m_channel_io = static_cast<ChannelIO<BaseIO>*>(m_baseIO)