H5DxferProp.h 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. // C++ informative line for the emacs editor: -*- C++ -*-
  2. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  3. * Copyright by The HDF Group. *
  4. * Copyright by the Board of Trustees of the University of Illinois. *
  5. * All rights reserved. *
  6. * *
  7. * This file is part of HDF5. The full HDF5 copyright notice, including *
  8. * terms governing use, modification, and redistribution, is contained in *
  9. * the COPYING file, which can be found at the root of the source code *
  10. * distribution tree, or in https://www.hdfgroup.org/licenses. *
  11. * If you do not have access to either file, you may request a copy from *
  12. * help@hdfgroup.org. *
  13. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  14. #ifndef H5DSetMemXferPropList_H
  15. #define H5DSetMemXferPropList_H
  16. namespace H5 {
  17. /*! \class DSetMemXferPropList
  18. \brief Class DSetCreatPropList inherits from PropList and provides
  19. wrappers for the HDF5 dataset memory and transfer property list.
  20. */
  21. // Inheritance: PropList -> IdComponent
  22. class H5_DLLCPP DSetMemXferPropList : public PropList {
  23. public:
  24. ///\brief Default dataset memory and transfer property list.
  25. static const DSetMemXferPropList &DEFAULT;
  26. // Creates a dataset memory and transfer property list.
  27. DSetMemXferPropList();
  28. // Creates a dataset transform property list.
  29. DSetMemXferPropList(const char *expression);
  30. // Sets type conversion and background buffers.
  31. void setBuffer(size_t size, void *tconv, void *bkg) const;
  32. // Reads buffer settings.
  33. size_t getBuffer(void **tconv, void **bkg) const;
  34. // Sets B-tree split ratios for a dataset transfer property list.
  35. void setBtreeRatios(double left, double middle, double right) const;
  36. // Gets B-tree split ratios for a dataset transfer property list.
  37. void getBtreeRatios(double &left, double &middle, double &right) const;
  38. // Sets data transform expression.
  39. void setDataTransform(const char *expression) const;
  40. void setDataTransform(const H5std_string &expression) const;
  41. // Gets data transform expression.
  42. ssize_t getDataTransform(char *exp, size_t buf_size = 0) const;
  43. H5std_string getDataTransform() const;
  44. // Sets the dataset transfer property list status to TRUE or FALSE.
  45. void setPreserve(bool status) const;
  46. // Checks status of the dataset transfer property list.
  47. bool getPreserve() const;
  48. // Sets an exception handling callback for datatype conversion.
  49. void setTypeConvCB(H5T_conv_except_func_t op, void *user_data) const;
  50. // Gets the exception handling callback for datatype conversion.
  51. void getTypeConvCB(H5T_conv_except_func_t *op, void **user_data) const;
  52. // Sets the memory manager for variable-length datatype
  53. // allocation in H5Dread and H5Treclaim.
  54. void setVlenMemManager(H5MM_allocate_t alloc, void *alloc_info, H5MM_free_t free, void *free_info) const;
  55. // alloc and free are set to NULL, indicating that system
  56. // malloc and free are to be used.
  57. void setVlenMemManager() const;
  58. // Gets the memory manager for variable-length datatype
  59. // allocation in H5Dread and H5Treclaim.
  60. void getVlenMemManager(H5MM_allocate_t &alloc, void **alloc_info, H5MM_free_t &free,
  61. void **free_info) const;
  62. // Sets the size of a contiguous block reserved for small data.
  63. void setSmallDataBlockSize(hsize_t size) const;
  64. // Returns the current small data block size setting.
  65. hsize_t getSmallDataBlockSize() const;
  66. // Sets number of I/O vectors to be read/written in hyperslab I/O.
  67. void setHyperVectorSize(size_t vector_size) const;
  68. // Returns the number of I/O vectors to be read/written in
  69. // hyperslab I/O.
  70. size_t getHyperVectorSize() const;
  71. // Enables or disables error-detecting for a dataset reading
  72. // process.
  73. void setEDCCheck(H5Z_EDC_t check) const;
  74. // Determines whether error-detection is enabled for dataset reads.
  75. H5Z_EDC_t getEDCCheck() const;
  76. ///\brief Returns this class name.
  77. virtual H5std_string
  78. fromClass() const override
  79. {
  80. return ("DSetMemXferPropList");
  81. }
  82. // Copy constructor - same as the original DSetMemXferPropList.
  83. DSetMemXferPropList(const DSetMemXferPropList &orig);
  84. // Creates a copy of an existing dataset memory and transfer
  85. // property list using the property list id.
  86. DSetMemXferPropList(const hid_t plist_id);
  87. // Noop destructor
  88. virtual ~DSetMemXferPropList() override;
  89. #ifndef DOXYGEN_SHOULD_SKIP_THIS
  90. // Deletes the global constant, should only be used by the library
  91. static void deleteConstants();
  92. private:
  93. static DSetMemXferPropList *DEFAULT_;
  94. // Creates the global constant, should only be used by the library
  95. static DSetMemXferPropList *getConstant();
  96. #endif // DOXYGEN_SHOULD_SKIP_THIS
  97. }; // end of DSetMemXferPropList
  98. } // namespace H5
  99. #endif // H5DSetMemXferPropList_H