H5FcreatProp.h 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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 H5FileCreatPropList_H
  15. #define H5FileCreatPropList_H
  16. namespace H5 {
  17. /*! \class FileCreatPropList
  18. \brief Class FileCreatPropList inherits from PropList and provides
  19. wrappers for the HDF5 file create property list.
  20. */
  21. // Inheritance: PropList -> IdComponent
  22. class H5_DLLCPP FileCreatPropList : public PropList {
  23. public:
  24. ///\brief Default file creation property list.
  25. static const FileCreatPropList &DEFAULT;
  26. // Creates a file create property list.
  27. FileCreatPropList();
  28. #ifndef H5_NO_DEPRECATED_SYMBOLS
  29. // Retrieves version information for various parts of a file.
  30. void getVersion(unsigned &super, unsigned &freelist, unsigned &stab, unsigned &shhdr) const;
  31. #endif /* H5_NO_DEPRECATED_SYMBOLS */
  32. // Sets the userblock size field of a file creation property list.
  33. void setUserblock(hsize_t size) const;
  34. // Gets the size of a user block in this file creation property list.
  35. hsize_t getUserblock() const;
  36. // Retrieves the size-of address and size quantities stored in a
  37. // file according to this file creation property list.
  38. void getSizes(size_t &sizeof_addr, size_t &sizeof_size) const;
  39. // Sets file size-of addresses and sizes.
  40. void setSizes(size_t sizeof_addr = 4, size_t sizeof_size = 4) const;
  41. // Retrieves the size of the symbol table B-tree 1/2 rank and the
  42. // symbol table leaf node 1/2 size.
  43. void getSymk(unsigned &int_nodes_k, unsigned &leaf_nodes_k) const;
  44. // Sets the size of parameters used to control the symbol table nodes.
  45. void setSymk(unsigned int_nodes_k, unsigned leaf_nodes_k) const;
  46. // Returns the 1/2 rank of an indexed storage B-tree.
  47. unsigned getIstorek() const;
  48. // Sets the size of parameter used to control the B-trees for
  49. // indexing chunked datasets.
  50. void setIstorek(unsigned ik) const;
  51. // Sets the strategy and the threshold value that the library will
  52. // will employ in managing file space.
  53. void setFileSpaceStrategy(H5F_fspace_strategy_t strategy, hbool_t persist, hsize_t threshold) const;
  54. // Returns the strategy that the library uses in managing file space.
  55. void getFileSpaceStrategy(H5F_fspace_strategy_t &strategy, hbool_t &persist, hsize_t &threshold) const;
  56. // Sets the file space page size for paged aggregation.
  57. void setFileSpacePagesize(hsize_t fsp_psize) const;
  58. // Returns the threshold value that the library uses in tracking free
  59. // space sections.
  60. hsize_t getFileSpacePagesize() const;
  61. ///\brief Returns this class name.
  62. virtual H5std_string
  63. fromClass() const override
  64. {
  65. return ("FileCreatPropList");
  66. }
  67. // Copy constructor: same as the original FileCreatPropList.
  68. FileCreatPropList(const FileCreatPropList &orig);
  69. // Creates a copy of an existing file create property list
  70. // using the property list id.
  71. FileCreatPropList(const hid_t plist_id);
  72. // Noop destructor
  73. virtual ~FileCreatPropList() override;
  74. #ifndef DOXYGEN_SHOULD_SKIP_THIS
  75. // Deletes the global constant, should only be used by the library
  76. static void deleteConstants();
  77. private:
  78. static FileCreatPropList *DEFAULT_;
  79. // Creates the global constant, should only be used by the library
  80. static FileCreatPropList *getConstant();
  81. #endif // DOXYGEN_SHOULD_SKIP_THIS
  82. }; // end of FileCreatPropList
  83. } // namespace H5
  84. #endif // H5FileCreatPropList_H