Go to the documentation of this file.
19 const std::string
FILE_NAME(
"create_dataset_string_example.h5");
30 std::vector<std::string> string_list;
31 string_list.push_back(
"Hello World !");
32 string_list.push_back(
"This string list is mapped to a dataset of "
33 "variable length string");
34 string_list.push_back(
35 "Encoding is done in UTF-8 - 你好 - Здравствуйте!");
36 string_list.push_back(
"May the force be with you");
37 string_list.push_back(
"Enjoy !");
45 dataset.
write(string_list);
48 std::vector<std::string> result_string_list;
49 dataset.
read(result_string_list);
51 for (
size_t i = 0; i < result_string_list.size(); ++i) {
52 std::cout <<
":" << i <<
" " << result_string_list[i] <<
"\n";
57 std::cerr << err.
what() << std::endl;
const std::string FILE_NAME("create_dataset_string_example.h5")
void read(T &array) const
static DataSpace From(const ScalarValue &scalar_value)
const std::string DATASET_NAME("story")
void write(const T &buffer)
static const int Create
Open flag: Create non existing file.
const char * what() const override
get the current exception error message
Basic HighFive Exception class.
static const int ReadWrite
Open flag: Read Write access.
static const int Truncate
Open flag: Truncate a file if already existing.
lvr2
Author(s): Thomas Wiemann
, Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Wed Mar 2 2022 00:37:24