20 const std::string
FILE_NAME(
"create_attribute.h5");
41 std::string string_list(
"very important Dataset !");
49 std::vector<int> version;
60 std::vector<std::string> all_attributes_keys =
62 for (std::vector<std::string>::const_iterator it =
63 all_attributes_keys.begin();
64 it < all_attributes_keys.end(); ++it) {
65 std::cout <<
"attribute: " << *it << std::endl;
70 std::cerr << err.
what() << std::endl;
const std::string DATASET_NAME("my_dataset")
static DataSpace From(const ScalarValue &scalar_value)
static const int ReadWrite
Open flag: Read Write access.
static const int Truncate
Open flag: Truncate a file if already existing.
std::vector< std::string > listAttributeNames() const
list all attribute name of the node / group
create an HDF5 DataType from a C++ type
const char * what() const override
get the current exception error message
Attribute createAttribute(const std::string &attribute_name, const DataSpace &space, const DataType &type)
create a new attribute with the name attribute_name
void write(const T &buffer)
Basic HighFive Exception class.
const std::string ATTRIBUTE_NAME_VERSION("version_string")
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 ...
const std::string ATTRIBUTE_NAME_NOTE("note")
const std::string FILE_NAME("create_attribute.h5")
static const int Create
Open flag: Create non existing file.