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