19 const std::string
FILE_NAME(
"dataset_integer.h5");
30 for (
size_t i = 0; i < data.size(); ++i) {
48 std::vector<int> read_data;
54 dataset.
read(read_data);
56 for (
size_t i = 0; i < read_data.size(); ++i) {
57 std::cout << read_data[i] <<
" ";
70 std::cerr << err.
what() << std::endl;
void read(T &array) const
const size_t size_dataset
const std::string FILE_NAME("dataset_integer.h5")
static DataSpace From(const ScalarValue &scalar_value)
const std::string DATASET_NAME("dset")
void write(const T &buffer)
static const int ReadWrite
Open flag: Read Write access.
static const int Truncate
Open flag: Truncate a file if already existing.
static const int ReadOnly
Open flag: Read only access.
DataSet getDataSet(const std::string &dataset_name, const DataSetAccessProps &accessProps=DataSetAccessProps()) const
get an existing dataset in the current file
const char * what() const override
get the current exception error message
Basic HighFive Exception class.
DataSet createDataSet(const std::string &dataset_name, const DataSpace &space, const DataType &type, const DataSetCreateProps &createProps=DataSetCreateProps(), const DataSetAccessProps &accessProps=DataSetAccessProps())
createDataSet Create a new dataset in the current file of datatype type and of size space ...
static const int Create
Open flag: Create non existing file.