/src/hdf5/src/H5VLquery.c
Line | Count | Source |
1 | | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
2 | | * Copyright by The HDF Group. * |
3 | | * All rights reserved. * |
4 | | * * |
5 | | * This file is part of HDF5. The full HDF5 copyright notice, including * |
6 | | * terms governing use, modification, and redistribution, is contained in * |
7 | | * the LICENSE file, which can be found at the root of the source code * |
8 | | * distribution tree, or in https://www.hdfgroup.org/licenses. * |
9 | | * If you do not have access to either file, you may request a copy from * |
10 | | * help@hdfgroup.org. * |
11 | | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ |
12 | | |
13 | | /* |
14 | | * Purpose: The Virtual Object Layer as described in documentation. |
15 | | * The purpose is to provide an abstraction on how to access the |
16 | | * underlying HDF5 container, whether in a local file with |
17 | | * a specific file format, or remotely on other machines, etc... |
18 | | */ |
19 | | |
20 | | /****************/ |
21 | | /* Module Setup */ |
22 | | /****************/ |
23 | | |
24 | | #include "H5VLmodule.h" /* This source code file is part of the H5VL module */ |
25 | | |
26 | | /***********/ |
27 | | /* Headers */ |
28 | | /***********/ |
29 | | |
30 | | #include "H5private.h" /* Generic Functions */ |
31 | | #include "H5VLpkg.h" /* Virtual Object Layer */ |
32 | | |
33 | | /****************/ |
34 | | /* Local Macros */ |
35 | | /****************/ |
36 | | |
37 | | /******************/ |
38 | | /* Local Typedefs */ |
39 | | /******************/ |
40 | | |
41 | | /********************/ |
42 | | /* Package Typedefs */ |
43 | | /********************/ |
44 | | |
45 | | /********************/ |
46 | | /* Local Prototypes */ |
47 | | /********************/ |
48 | | |
49 | | /*********************/ |
50 | | /* Package Variables */ |
51 | | /*********************/ |
52 | | |
53 | | /*****************************/ |
54 | | /* Library Private Variables */ |
55 | | /*****************************/ |
56 | | |
57 | | /*******************/ |
58 | | /* Local Variables */ |
59 | | /*******************/ |
60 | | |
61 | | /*------------------------------------------------------------------------- |
62 | | * Function: Retrieve the refcount for a VOL object |
63 | | * |
64 | | * Purpose: Quick and dirty routine to retrieve the VOL object's refcount. |
65 | | * (Mainly added to stop non-file routines from poking about in the |
66 | | * H5VL_object_t data structure) |
67 | | * |
68 | | * Return: Refcount on success/abort on failure (shouldn't fail) |
69 | | * |
70 | | *------------------------------------------------------------------------- |
71 | | */ |
72 | | size_t |
73 | | H5VL_obj_get_rc(const H5VL_object_t *vol_obj) |
74 | 0 | { |
75 | | /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */ |
76 | 0 | FUNC_ENTER_NOAPI_NOINIT_NOERR |
77 | |
|
78 | 0 | assert(vol_obj); |
79 | |
|
80 | 0 | FUNC_LEAVE_NOAPI(vol_obj->rc) |
81 | 0 | } /* end H5VL_obj_get_rc() */ |
82 | | |
83 | | /*------------------------------------------------------------------------- |
84 | | * Function: Retrieve the connector for a VOL object |
85 | | * |
86 | | * Purpose: Quick and dirty routine to retrieve the VOL object's connector. |
87 | | * (Mainly added to stop non-file routines from poking about in the |
88 | | * H5VL_object_t data structure) |
89 | | * |
90 | | * Return: Pointer to connector on success/abort on failure (shouldn't fail) |
91 | | * |
92 | | *------------------------------------------------------------------------- |
93 | | */ |
94 | | H5VL_connector_t * |
95 | | H5VL_obj_get_connector(const H5VL_object_t *vol_obj) |
96 | 0 | { |
97 | | /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */ |
98 | 0 | FUNC_ENTER_NOAPI_NOINIT_NOERR |
99 | |
|
100 | 0 | assert(vol_obj); |
101 | |
|
102 | 0 | FUNC_LEAVE_NOAPI(vol_obj->connector) |
103 | 0 | } /* end H5VL_obj_get_connector() */ |
104 | | |
105 | | /*------------------------------------------------------------------------- |
106 | | * Function: Retrieve the data for a VOL object |
107 | | * |
108 | | * Purpose: Quick and dirty routine to retrieve the VOL object's data. |
109 | | * (Mainly added to stop non-file routines from poking about in the |
110 | | * H5VL_object_t data structure) |
111 | | * |
112 | | * Return: Pointer to data on success/abort on failure (shouldn't fail) |
113 | | * |
114 | | *------------------------------------------------------------------------- |
115 | | */ |
116 | | void * |
117 | | H5VL_obj_get_data(const H5VL_object_t *vol_obj) |
118 | 0 | { |
119 | | /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */ |
120 | 0 | FUNC_ENTER_NOAPI_NOINIT_NOERR |
121 | |
|
122 | 0 | assert(vol_obj); |
123 | |
|
124 | 0 | FUNC_LEAVE_NOAPI(vol_obj->data) |
125 | 0 | } /* end H5VL_obj_get_data() */ |
126 | | |
127 | | /*------------------------------------------------------------------------- |
128 | | * Function: Resetthe data for a VOL object |
129 | | * |
130 | | * Purpose: Quick and dirty routine to reset the VOL object's data. |
131 | | * (Mainly added to stop non-file routines from poking about in the |
132 | | * H5VL_object_t data structure) |
133 | | * |
134 | | * Return: none |
135 | | * |
136 | | *------------------------------------------------------------------------- |
137 | | */ |
138 | | void |
139 | | H5VL_obj_reset_data(H5VL_object_t *vol_obj) |
140 | 0 | { |
141 | | /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */ |
142 | 0 | FUNC_ENTER_NOAPI_NOINIT_NOERR |
143 | |
|
144 | 0 | assert(vol_obj); |
145 | |
|
146 | 0 | vol_obj->data = NULL; |
147 | |
|
148 | 0 | FUNC_LEAVE_NOAPI_VOID |
149 | 0 | } /* end H5VL_obj_reset_data() */ |