Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 554: add an information to documentation for which version of hdf5 a class or a method is accessible #555

Merged
merged 1 commit into from
Dec 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions doc/source/api_reference/namespace_datatype.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ Classes
.. doxygenclass:: hdf5::datatype::String
:members:

:cpp:class:`Enum`
-----------------

.. doxygenclass:: hdf5::datatype::Enum
:members:

Type traits
===========

Expand Down
20 changes: 16 additions & 4 deletions doc/source/api_reference/namespace_filter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,24 @@ Namespace :cpp:any:`hdf5::filter`

.. doxygenclass:: hdf5::filter::Filter
:members:

.. doxygenclass:: hdf5::filter::Deflate
:members:

.. doxygenclass:: hdf5::filter::Shuffle
:members:

.. doxygenclass:: hdf5::filter::Fletcher32
:members:
:members:

.. doxygenclass:: hdf5::filter::SZip
:members:

.. doxygenclass:: hdf5::filter::NBit
:members:

.. doxygenclass:: hdf5::filter::ScaleOffset
:members:

.. doxygenclass:: hdf5::filter::ExternalFilter
:members:
10 changes: 9 additions & 1 deletion doc/source/api_reference/namespace_property.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ Enumerations

.. doxygenfunction:: hdf5::property::operator|(const CopyFlag &, const CopyFlag &)

:cpp:enum:`VirtualDataView`
---------------------------

.. doxygenenum:: hdf5::property::VirtualDataView

.. doxygenfunction:: hdf5::property::operator<<(std::ostream &, const VirtualDataView &)


Classes
=======

Expand Down Expand Up @@ -185,4 +193,4 @@ Classes
:members:

.. doxygenclass:: hdf5::property::VirtualDataMaps
:members:
:members:
5 changes: 4 additions & 1 deletion src/h5cpp/core/object_id.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ class DLL_EXPORT ObjectId
//!
bool operator< (const ObjectId& other) const;

//!
//! @brief stream output operator for ObjectId class
//!
DLL_EXPORT friend std::ostream & operator<<(std::ostream &os, const ObjectId& p);

//!
Expand Down Expand Up @@ -132,7 +135,7 @@ class DLL_EXPORT ObjectId
//! Obtains the name of the file where the object is stored in.
static std::string get_file_name(const ObjectHandle &handle);

#if (defined(_DOXYGEN_) || H5_VERSION_LE(1,10,6))
#if H5_VERSION_LE(1,10,6)
#define H5O_info_t_ H5O_info_t
#else
#define H5O_info_t_ H5O_info1_t
Expand Down
2 changes: 1 addition & 1 deletion src/h5cpp/file/direct_driver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace hdf5 {
namespace file {

//!
//! \brief direct write without buffering
//! \brief direct write without buffering (*for hdf5 compiled with H5_HAVE_DIRECT*)
//!
class DLL_EXPORT DirectDriver : public Driver
{
Expand Down
3 changes: 3 additions & 0 deletions src/h5cpp/file/mpi_driver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ namespace file {

#if ( defined(_DOXYGEN_) || defined(WITH_MPI) )

//!
//! \brief class for the MPI driver (*for hdf5 with compiled MPI*)
//!
class DLL_EXPORT MPIDriver : public Driver
{
public:
Expand Down
2 changes: 2 additions & 0 deletions src/h5cpp/file/types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ enum class AccessFlags : unsigned
ReadWrite = 0x0001,
ReadOnly = 0x0000,
#if ( defined(_DOXYGEN_) || H5_VERSION_GE(1,10,0) )
//! (*since hdf5 1.10.0*)
SWMRRead = 0x0040,
//! (*since hdf5 1.10.0*)
SWMRWrite = 0x0020
#endif
};
Expand Down
10 changes: 5 additions & 5 deletions src/h5cpp/node/dataset.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ class DLL_EXPORT Dataset : public Node

#if (defined(_DOXYGEN_) || H5_VERSION_GE(1,10,0))
//!
//! \brief refresh the dataset
//! \brief refresh the dataset (*since hdf5 1.10.0*)
//!
//!
//! \throws std::runtime_error in case of a failure
Expand Down Expand Up @@ -381,7 +381,7 @@ class DLL_EXPORT Dataset : public Node
#if (defined(_DOXYGEN_) || H5_VERSION_GE(1,10,2))

//!
//! \brief read dataset chunk
//! \brief read dataset chunk (*since hdf5 1.10.2*)
//!
//! Read a chunk from a dataset to an instance of T.
//!
Expand Down Expand Up @@ -901,7 +901,7 @@ void Dataset::write_chunk(const T &data,

if(mem_type.get_class() == datatype::Class::Integer)
{
#if (defined(_DOXYGEN_) || H5_VERSION_GE(1,10,3))
#if H5_VERSION_GE(1,10,3)
if(H5Dwrite_chunk(static_cast<hid_t>(*this),
static_cast<hid_t>(dtpl),
filter_mask,
Expand Down Expand Up @@ -935,7 +935,7 @@ void Dataset::write_chunk(const T &data,
}
}

#if (defined(_DOXYGEN_) || H5_VERSION_GE(1,10,2))
#if H5_VERSION_GE(1,10,2)

template<typename T>
std::uint32_t Dataset::read_chunk(T &data,
Expand All @@ -955,7 +955,7 @@ std::uint32_t Dataset::read_chunk(T &data,
std::uint32_t filter_mask;
if(mem_type.get_class() == datatype::Class::Integer)
{
#if (defined(_DOXYGEN_) || H5_VERSION_GE(1,10,3))
#if H5_VERSION_GE(1,10,3)
if(H5Dread_chunk(static_cast<hid_t>(*this),
static_cast<hid_t>(dtpl),
offset.data(),
Expand Down
4 changes: 2 additions & 2 deletions src/h5cpp/node/group.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ class DLL_EXPORT Group : public Node

#if (defined(_DOXYGEN_) || H5_VERSION_GE(1,10,0))
//!
//! \brief flush the group
//! \brief flush the group (*since hdf5 1.10.0*)
//!
//! \throws std::runtime_error in case of a failure
//! \throws std::runtime_error in case of a failure)
//!
void flush() const;
#endif
Expand Down
7 changes: 5 additions & 2 deletions src/h5cpp/property/dataset_access.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ class DLL_EXPORT ChunkCacheParameters {
};

#if (defined(_DOXYGEN_) || H5_VERSION_GE(1,10,0))
//!
//! \brief virtual data view enumeration (*since hdf5 1.10.0*)
//!
enum class VirtualDataView : std::underlying_type<H5D_vds_view_t>::type {
FirstMissing = H5D_VDS_FIRST_MISSING,
LastAvailable = H5D_VDS_LAST_AVAILABLE
Expand Down Expand Up @@ -108,15 +111,15 @@ class DLL_EXPORT DatasetAccessList : public LinkAccessList {

#if (defined(_DOXYGEN_) || H5_VERSION_GE(1,10,0))
//!
//! \brief missing data handling for virtual datasets
//! \brief missing data handling for virtual datasets (*since hdf5 1.10.0*)
//!
//! \throws std::runtime_error in case of a failure
//! \param view set missing data strategy
//!
void virtual_view(VirtualDataView view) const;

//!
//! \brief get missing data strategy for virtual datasets
//! \brief get missing data strategy for virtual datasets (*since hdf5 1.10.0*)
//!
VirtualDataView virtual_view() const;

Expand Down
1 change: 1 addition & 0 deletions src/h5cpp/property/dataset_creation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ enum class DatasetLayout : std::underlying_type<H5D_layout_t>::type {
Contiguous = H5D_CONTIGUOUS,
Chunked = H5D_CHUNKED,
#if (defined(_DOXYGEN_) || H5_VERSION_GE(1,10,0))
//! (*since hdf5 1.10.0*)
Virtual = H5D_VIRTUAL
#endif
};
Expand Down
12 changes: 12 additions & 0 deletions src/h5cpp/property/dataset_transfer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,22 @@ class DLL_EXPORT DatasetTransferList : public List {
}

#if (defined(_DOXYGEN_) || defined(WITH_MPI) )
//!
//! \brief set mpi transfer mode (*for hdf5 compiled with MPI*)
//!
void mpi_transfer_mode(MPITransferMode mode) const;
//!
//! \brief get mpi transfer mode (*for hdf5 compiled with MPI*)
//!
MPITransferMode mpi_transfer_mode() const;

//!
//! \brief set mpi chunk option (*for hdf5 compiled with MPI*)
//!
void mpi_chunk_option(MPIChunkOption option) const;
//!
//! \brief get mpi chunk option (*for hdf5 compiled with MPI*)
//!
MPIChunkOption mpi_chunk_option() const;


Expand Down
59 changes: 58 additions & 1 deletion src/h5cpp/property/file_creation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,33 +32,90 @@
namespace hdf5 {
namespace property {

//!
//! \brief dataset creation property list
//!
class DLL_EXPORT FileCreationList : public GroupCreationList {
public:
//!
//! \brief default constructor
//!
FileCreationList();
~FileCreationList() override;

//!
//! \brief constructor
//!
//! Construct a file creation property list from a handler instance.
//! This constructor will throw an exception if the handle does not
//! reference a file creation property list.
//!
//! \throws std::runtime_error in case of a failure
//! \param handle r-value reference to a handle instance
//!
explicit FileCreationList(ObjectHandle &&handle);

//!
//! \brief set user block
//!
void user_block(hsize_t size) const;
//!
//! \brief get user block
//!
hsize_t user_block() const;

//!
//! \brief set object offset size
//!
void object_offset_size(size_t size) const;
//!
//! \brief get object offset size
//!
size_t object_offset_size() const;

//!
//! \brief set object length size
//!
void object_length_size(size_t size) const;
//!
//! \brief get object length size
//!
size_t object_length_size() const;

//!
//! \brief set btree rank
//!
void btree_rank(unsigned int ik);
//!
//! \brief get btree rank
//!
unsigned int btree_rank() const;

//!
//! \brief set btree symbols
//!
void btree_symbols(unsigned int lk);
//!
//! \brief get btree symbols
//!
unsigned int btree_symbols() const;

//!
//! \brief set chunk tree rank
//!
void chunk_tree_rank(unsigned int ik);
//!
//! \brief get chunk tree rank
//!
unsigned int chunk_tree_rank() const;

#if (defined(_DOXYGEN_) || H5_VERSION_GE(1,10,1))
//!
//! \brief set page size (*since hdf5 1.10.1*)
//!
void page_size(hsize_t size);
//!
//! \brief get page size (*since hdf5 1.10.1*)
//!
hsize_t page_size() const;
#endif

Expand Down