Skip to content

Commit

Permalink
Add small doc
Browse files Browse the repository at this point in the history
  • Loading branch information
alkino committed Nov 2, 2022
1 parent 1034160 commit 47f5ee4
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 20 deletions.
14 changes: 5 additions & 9 deletions include/highfive/H5Attribute.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ class Attribute: public Object, public PathTraits<Attribute> {
///
DataSpace getMemSpace() const;

///
/// Return the attribute
/// \brief Return the attribute
template <typename T>
T read() const;

Expand All @@ -68,9 +67,7 @@ class Attribute: public Object, public PathTraits<Attribute> {
template <typename T>
void read(T& array) const;

///
/// Read the attribute into a buffer
///
/// \brief Read the attribute into a buffer
template <typename T>
void read(T* array, const DataType& dtype = DataType()) const;

Expand All @@ -84,13 +81,12 @@ class Attribute: public Object, public PathTraits<Attribute> {
template <typename T>
void write(const T& buffer);

///
/// Write a buffer to this attribute
///
/// \brief Write a buffer to this attribute
template <typename T>
void write_raw(const T* buffer, const DataType& dtype = DataType());

AttributeCreateProps getCreateList() const {
/// \brief Get the list of properties for creation of this attribute
AttributeCreateProps getCreatePropertyList() const {
return get_plist<AttributeCreateProps>(*this, H5Aget_create_plist);
}

Expand Down
6 changes: 4 additions & 2 deletions include/highfive/H5DataSet.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,13 @@ class DataSet: public Object,
return getSpace().getElementCount();
}

DataSetCreateProps getCreateList() const {
/// \brief Get the list of properties for creation of this dataset
DataSetCreateProps getCreatePropertyList() const {
return get_plist<DataSetCreateProps>(*this, H5Dget_create_plist);
}

DataSetAccessProps getAccessList() const {
/// \brief Get the list of properties for accession of this dataset
DataSetAccessProps getAccessPropertyList() const {
return get_plist<DataSetAccessProps>(*this, H5Dget_access_plist);
}

Expand Down
3 changes: 2 additions & 1 deletion include/highfive/H5DataType.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ class DataType: public Object {
/// \brief Returns whether the type is a Reference
bool isReference() const;

DataTypeCreateProps getCreateList() const {
/// \brief Get the list of properties for creation of this DataType
DataTypeCreateProps getCreatePropertyList() const {
return get_plist<DataTypeCreateProps>(*this, H5Tget_create_plist);
}

Expand Down
6 changes: 4 additions & 2 deletions include/highfive/H5File.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,13 @@ class File: public Object, public NodeTraits<File>, public AnnotateTraits<File>
///
void flush();

FileCreateProps getCreateList() const {
/// \brief Get the list of properties for creation of this file
FileCreateProps getCreatePropertyList() const {
return get_plist<FileCreateProps>(*this, H5Fget_create_plist);
}

FileAccessProps getAccessList() const {
/// \brief Get the list of properties for accession of this file
FileAccessProps getAccessPropertyList() const {
return get_plist<FileAccessProps>(*this, H5Fget_access_plist);
}

Expand Down
5 changes: 3 additions & 2 deletions include/highfive/H5Group.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ class Group: public Object,

std::pair<unsigned int, unsigned int> getEstimatedLinkInfo() const;

GroupCreateProps getCreateList() const {
/// \brief Get the list of properties for creation of this group
GroupCreateProps getCreatePropertyList() const {
return get_plist<GroupCreateProps>(*this, H5Gget_create_plist);
}

Expand All @@ -53,7 +54,7 @@ inline std::pair<unsigned int, unsigned int> Group::getEstimatedLinkInfo() const
unsigned int est_num_entries;
unsigned int est_name_len;

auto gcpl = getCreateList();
auto gcpl = getCreatePropertyList();
if (H5Pget_est_link_info(gcpl.getId(), &est_num_entries, &est_name_len) < 0) {
HDF5ErrMapper::ToException<GroupException>(
std::string("Unable to access group link size property"));
Expand Down
8 changes: 4 additions & 4 deletions include/highfive/bits/H5File_misc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ inline const std::string& File::getName() const noexcept {

inline hsize_t File::getMetadataBlockSize() const {
hsize_t size;
auto fapl = getAccessList();
auto fapl = getAccessPropertyList();
if (H5Pget_meta_block_size(fapl.getId(), &size) < 0) {
HDF5ErrMapper::ToException<FileException>(
std::string("Unable to access file metadata block size"));
Expand All @@ -105,7 +105,7 @@ inline hsize_t File::getMetadataBlockSize() const {
inline std::pair<H5F_libver_t, H5F_libver_t> File::getVersionBounds() const {
H5F_libver_t low;
H5F_libver_t high;
auto fapl = getAccessList();
auto fapl = getAccessPropertyList();
if (H5Pget_libver_bounds(fapl.getId(), &low, &high) < 0) {
HDF5ErrMapper::ToException<FileException>(
std::string("Unable to access file version bounds"));
Expand All @@ -115,7 +115,7 @@ inline std::pair<H5F_libver_t, H5F_libver_t> File::getVersionBounds() const {

#if H5_VERSION_GE(1, 10, 1)
inline H5F_fspace_strategy_t File::getFileSpaceStrategy() const {
auto fcpl = getCreateList();
auto fcpl = getCreatePropertyList();

H5F_fspace_strategy_t strategy;
hbool_t persist;
Expand All @@ -129,7 +129,7 @@ inline H5F_fspace_strategy_t File::getFileSpaceStrategy() const {
}

inline hsize_t File::getFileSpacePageSize() const {
auto fcpl = getCreateList();
auto fcpl = getCreatePropertyList();
hsize_t page_size;

if (getFileSpaceStrategy() != H5F_FSPACE_STRATEGY_PAGE) {
Expand Down

0 comments on commit 47f5ee4

Please sign in to comment.