v1.0.0-rc.81

This commit is contained in:
2025-09-21 19:27:51 +02:00
parent 3ded4cd3ce
commit 5d9d2de4a4
243 changed files with 3401 additions and 935 deletions
+13 -2
View File
@@ -827,6 +827,17 @@ std::string ExtractFilename(const std::string& str) {
return path.filename();
}
bool HDF5Object::GetBool(const std::string &name) const {
HDF5DataSet dataset(*this, name);
return dataset.ReadScalar<bool>();
}
std::optional<bool> HDF5Object::GetOptBool(const std::string &name) const {
if (Exists(name))
return GetBool(name);
return std::nullopt;
}
float HDF5Object::GetFloat(const std::string &name) const {
HDF5DataSet dataset(*this, name);
return dataset.ReadScalar<float>();
@@ -840,13 +851,13 @@ int64_t HDF5Object::GetInt(const std::string &name) const {
std::optional<float> HDF5Object::GetOptFloat(const std::string &name) const {
if (Exists(name))
return GetFloat(name);
return {};
return std::nullopt;
}
std::optional<int64_t> HDF5Object::GetOptInt(const std::string &name) const {
if (Exists(name))
return GetInt(name);
return {};
return std::nullopt;
}
std::string HDF5Object::GetString(const std::string &name, const std::string &def) const {