Class DataIO
Defined in File DirectoryDataIO.hpp
Nested Relationships
Nested Types
Class Documentation
-
class DataIO
Public Functions
-
DataIO(std::string filename, std::ios_base::openmode ios_mode = std::ios::in | std::ios::out)
-
~DataIO()
-
YAML::Node loadMeta()
Get all meta data as YAML node.
- Returns:
YAML::Node
-
std::vector<size_t> loadShape()
Load the shape from file.
- Returns:
std::vector<size_t>
-
std::string loadType()
Returns type of the elements.
if(dataIOTypeName<float>() == io.loadType()) { data = io.load<float>(); }
- Returns:
std::string
- Template Parameters:
T –
- Returns:
boost::shared_array<T>
Load data and write shape to “shape”.
- Template Parameters:
T – type of the data. Can be obtained by reading the meta data first
- Parameters:
shape – shape of the data
- Returns:
boost::shared_array<T> returned data
Save multidiomensional data of type T and shape “shape”.
- Template Parameters:
T – typename of data elements
- Parameters:
shape – multidimensional shape
data – data buffer
-
int version() const
Version of the IO. Update in cpp to signal a version change.
- Returns:
int the version
-
struct Header
-
DataIO(std::string filename, std::ios_base::openmode ios_mode = std::ios::in | std::ios::out)