H5Library.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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 H5Library_H
  15. #define H5Library_H
  16. namespace H5 {
  17. /*! \class H5Library
  18. \brief Class H5Library operates the HDF5 library globably.
  19. It is not necessary to construct an instance of H5Library to use the
  20. methods.
  21. */
  22. class H5_DLLCPP H5Library {
  23. public:
  24. // Initializes the HDF5 library.
  25. static void open();
  26. // Flushes all data to disk, closes files, and cleans up memory.
  27. static void close();
  28. // Instructs library not to install atexit cleanup routine
  29. static void dontAtExit();
  30. // Returns the HDF library release number.
  31. static void getLibVersion(unsigned &majnum, unsigned &minnum, unsigned &relnum);
  32. // Verifies that the arguments match the version numbers compiled
  33. // into the library
  34. static void checkVersion(unsigned majnum, unsigned minnum, unsigned relnum);
  35. // Walks through all the garbage collection routines for the library,
  36. // which are supposed to free any unused memory they have allocated.
  37. static void garbageCollect();
  38. // Sets limits on the different kinds of free lists.
  39. static void setFreeListLimits(int reg_global_lim, int reg_list_lim, int arr_global_lim, int arr_list_lim,
  40. int blk_global_lim, int blk_list_lim);
  41. // Initializes C++ library and registers terminating functions at exit.
  42. // Only for the library functions, not for user-defined functions.
  43. static void initH5cpp(void);
  44. // Sends request for terminating the HDF5 library.
  45. static void termH5cpp(void);
  46. #ifndef DOXYGEN_SHOULD_SKIP_THIS
  47. private:
  48. // Default constructor - no instance ever created from outsiders
  49. H5Library();
  50. // Destructor
  51. ~H5Library();
  52. #endif // DOXYGEN_SHOULD_SKIP_THIS
  53. }; // end of H5Library
  54. } // namespace H5
  55. #endif // H5Library_H