Mesh Oriented datABase  (version 5.5.1)
An array-based unstructured mesh library
mhdf.h
Go to the documentation of this file.
1 /**
2  * MOAB, a Mesh-Oriented datABase, is a software component for creating,
3  * storing and accessing finite element mesh data.
4  *
5  * Copyright 2004 Sandia Corporation. Under the terms of Contract
6  * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government
7  * retains certain rights in this software.
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 2.1 of the License, or (at your option) any later version.
13  *
14  */
15 
16 #ifndef MHDF_H
17 #define MHDF_H
18 
19 #include "moab/mhdf_public.h"
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 /**
26  * MHDF API for reading/writing MOAB-format HDF5 mesh files.
27  */
28 
29 /**
30  * Error handling
31  */
32 
33 /**
34  * Element group handle
35  */
36 
37 /** \brief Get an mhdf_ElemHandle object for the node data.
38  *
39  * \return A special element group handle used when specifying adjacency or
40  * tag data for nodes.
41  */
42 const char* mhdf_node_type_handle( void );
43 
44 /** \brief Return a special element group handle used to specify the set group.
45  *
46  * \return A special element group handle used to specify the set group
47  * for reading/writing tag data on sets.
48  */
49 const char* mhdf_set_type_handle( void );
50 
51 #define MHDF_INDEX_TYPE H5T_NATIVE_LONG
52 
53 /** \brief Given an element type Id, get the name.
54  * Fails if buffer is not of sufficient size.
55  * \param file_handle The file.
56  * \param type_index The type index. Corresponds to indices into
57  * the element type list passed to \ref mhdf_createFile.
58  * \param buffer The buffer into which to copy the name.
59  * \param buffer_size The length of <code>buffer</code>.
60  * \param status Passed back status of API call.
61  */
62 void mhdf_getElemName( mhdf_FileHandle file_handle,
63  unsigned int type_index,
64  char* buffer,
65  size_t buffer_size,
66  mhdf_Status* status );
67 
69 
70 /** \brief Common close function for all data handle types.
71  *
72  * Close an hid_t-type handle returned from any of the following
73  * functions. Any hid_t passed-back or returned must be closed via
74  * this function to avoid resource loss.
75  *
76  * \param file The file the object pointed to by the passed data
77  * handled exists int.
78  * \param handle The data object to close.
79  * \param status Passed back status of API call.
80  */
81 void mhdf_closeData( mhdf_FileHandle file, hid_t handle, mhdf_Status* status );
82 
83 /**\brief Get start ID that will be assigned to next created dataset
84  *
85  * Get the first_id parameter that will be returned from the next
86  * call to any of mhdf_createNodeCoords, mhdf_createConnectivity,
87  * mhdf_createPolyConnectivity, or mhdf_createSetMeta
88  */
89 void mhdf_getNextStartId( mhdf_FileHandle file, mhdf_index_t* start_id_out, mhdf_Status* status );
90 
91 /** \brief Write the file history as a list of strings.
92  *
93  * Each entry is composed of four strings:
94  * application, version, date, and time.
95  *
96  * \param file The file.
97  * \param strings An array of null-terminated strings.
98  * \param num_strings The length of <code>strings</code>
99  * \param status Passed back status of API call.
100  */
101 void mhdf_writeHistory( mhdf_FileHandle file, const char** strings, int num_strings, mhdf_Status* status );
102 
103 /** \brief Read the file history as a list of strings.
104  *
105  * Each entry is composed of four strings:
106  * application, version, date, and time.
107  *
108  * Strings and array are allocated with <code>malloc</code>. Caller must
109  * release them by calling <code>free</code>
110  *
111  * \param file The file.
112  * \param num_records_out The length of the returned array.
113  * \param status Passed back status of API call.
114  * \return An array of null-terminates strings.
115  */
116 char** mhdf_readHistory( mhdf_FileHandle file, int* num_records_out, mhdf_Status* status );
117 
118 /* Node Coordinates */
119 
120 int mhdf_haveNodes( mhdf_FileHandle file_handle, mhdf_Status* status );
121 
122 /** \brief Create new table for node coordinate data
123  *
124  * \param file_handle The file.
125  * \param dimension Number of coordinate values per node.
126  * \param num_nodes The number of nodes the table will contain.
127  * \param first_node_id_out Nodes are assigned IDs sequentially in the
128  * order they occur in the table, where the ID of the first
129  * node in the table is this passed-back value.
130  * \param status Passed back status of API call.
131  * \return An HDF5 handle to the coordinate table.
132  */
133 hid_t mhdf_createNodeCoords( mhdf_FileHandle file_handle,
134  int dimension,
135  long num_nodes,
136  long* first_node_id_out,
137  mhdf_Status* status );
138 
139 /** \brief Open table containing node coordinate data
140  *
141  * \param file_handle The file.
142  * \param dimension_out Number of coordinate values per node.
143  * \param num_nodes_out The number of nodes the table contains.
144  * \param first_node_id_out Nodes are assigned IDs sequentially in the
145  * order they occur in the table, where the ID of the first
146  * node in the table is this passed-back value.
147  * \param status Passed back status of API call.
148  * \return An HDF5 handle to the coordinate table.
149  */
150 hid_t mhdf_openNodeCoords( mhdf_FileHandle file_handle,
151  long* num_nodes_out,
152  int* dimension_out,
153  long* first_node_id_out,
154  mhdf_Status* status );
155 
156 hid_t mhdf_openNodeCoordsSimple( mhdf_FileHandle file_handle, mhdf_Status* status );
157 
158 /** \brief Write node coordinate data
159  *
160  * Write interleaved coordinate data for a block of nodes
161  *
162  * \param data_handle Handle returned from <code>mhdf_createNodeCoords</code>
163  * or <code>mhdf_openNodeCoords</code>.
164  * \param offset Table row (node index) at which to start writing.
165  * \param count Number of rows (number of nodes) to write.
166  * \param coords Interleaved node coordinate data.
167  * \param status Passed back status of API call.
168  */
169 void mhdf_writeNodeCoords( hid_t data_handle, long offset, long count, const double* coords, mhdf_Status* status );
170 void mhdf_writeNodeCoordsWithOpt( hid_t data_handle,
171  long offset,
172  long count,
173  const double* coords,
174  hid_t write_prop,
175  mhdf_Status* status );
176 
177 /** \brief Write node coordinate data
178  *
179  * Write a single coordinate value (e.g. the 'x' coordinate) for a
180  * block of nodes.
181  *
182  * \param data_handle Handle returned from <code>mhdf_createNodeCoords</code>
183  * or <code>mhdf_openNodeCoords</code>.
184  * \param offset Table row (node index) at which to start writing.
185  * \param count Number of rows (number of nodes) to write.
186  * \param dimension The coordinate to write (0->x, 1->y, ...)
187  * \param coords Coordinate list.
188  * \param status Passed back status of API call.
189  */
190 void mhdf_writeNodeCoord( hid_t data_handle,
191  long offset,
192  long count,
193  int dimension,
194  const double* coords,
195  mhdf_Status* status );
196 void mhdf_writeNodeCoordWithOpt( hid_t data_handle,
197  long offset,
198  long count,
199  int dimension,
200  const double* coords,
201  hid_t write_prop,
202  mhdf_Status* status );
203 
204 /** \brief Read node coordinate data
205  *
206  * Read interleaved coordinate data for a block of nodes
207  *
208  * \param data_handle Handle returned from <code>mhdf_createNodeCoords</code>
209  * or <code>mhdf_openNodeCoords</code>.
210  * \param offset Table row (node index) at which to start reading.
211  * \param count Number of rows (number of nodes) to read.
212  * \param coordinates Buffer in which to write node coordinate data.
213  * \param status Passed back status of API call.
214  */
215 void mhdf_readNodeCoords( hid_t data_handle, long offset, long count, double* coordinates, mhdf_Status* status );
216 void mhdf_readNodeCoordsWithOpt( hid_t data_handle,
217  long offset,
218  long count,
219  double* coordinates,
220  hid_t read_prop,
221  mhdf_Status* status );
222 
223 /** \brief Read node coordinate data
224  *
225  * Read a single coordinate value (e.g. the 'x' coordinate) for a
226  * block of nodes.
227  *
228  * \param data_handle Handle returned from <code>mhdf_createNodeCoords</code>
229  * or <code>mhdf_openNodeCoords</code>.
230  * \param offset Table row (node index) at which to start reading.
231  * \param count Number of rows (number of nodes) to read.
232  * \param dimension The coordinate to read (0->x, 1->y, ...)
233  * \param coords Buffer in which to write node coordinate data.
234  * \param status Passed back status of API call.
235  */
236 void mhdf_readNodeCoord( hid_t data_handle,
237  long offset,
238  long count,
239  int dimension,
240  double* coords,
241  mhdf_Status* status );
242 void mhdf_readNodeCoordWithOpt( hid_t data_handle,
243  long offset,
244  long count,
245  int dimension,
246  double* coords,
247  hid_t read_prop,
248  mhdf_Status* status );
249 
250 /* Element Connectivity */
251 
252 /** \brief Add a new table of element data to the file.
253  *
254  * Add a element group to the file.
255  * An element group is the data for a block of elements with the same
256  * TSTT type and same number of nodes in their connectivity data.
257  * (e.g. all the MBHEX20 elements). This function is also
258  * used to create the groups for general polygon data and
259  * general polyhedron data. The requirement that all elements
260  * have the same number of nodes in their connectivity does not
261  * apply for poly(gons|hedra).
262  *
263  * \param file_handle File in which to create the element type.
264  * \param elem_handle The name to use for the element data. This
265  * name is used as an identifier to reference the
266  * data for this element type later. The selected
267  * name also appears explicitly in the file and
268  * therefore should be something
269  * descriptive of the element type such as the
270  * 'base type' and number of nodes (e.g. "Hex20").
271  * \param named_elem_type An index into the list of named element types
272  * passed to \ref mhdf_createFile .
273  * \param status Passed back status of API call.
274  */
275 void mhdf_addElement( mhdf_FileHandle file_handle,
276  const char* elem_handle,
277  unsigned int named_elem_type,
278  mhdf_Status* status );
279 
280 /** \brief Get the list of element groups in the file.
281  *
282  * Get the list of element groups in the file.
283  * An element group is the data for a block of elements with the same
284  * TSTT type and same number of nodes in their connectivity data.
285  * (e.g. all the MBHEX20 elements). This function is also
286  * used to retrieve the groups for general polygon data and
287  * general polyhedron data. The requirement that all elements
288  * have the same number of nodes in their connectivity does not
289  * apply for poly(gons|hedra).
290  *
291  * \param file_handle The file.
292  * \param count_out Memory location at which to store the
293  * length of the returned array.
294  * \param status Passed back status of API call.
295  * \return An array of pointers to element group
296  * names. This array is allocated as a
297  * single memory block and should be freed
298  * with <em>one</em> call to free().
299  */
300 char** mhdf_getElemHandles( mhdf_FileHandle file_handle, unsigned int* count_out, mhdf_Status* status );
301 
302 /**
303  * \brief Get the element type name for a given element group handle.
304  *
305  * Fails if name is longer than <code>buf_len</code>.
306  *
307  * \param file_handle The file.
308  * \param elem_handle One of the group names passed back from
309  * \ref mhdf_getElemHandles
310  * \param buffer A buffer to copy the name into.
311  * \param buf_len The length of <code>buffer</code>.
312  * \param status Passed back status of API call.
313  */
314 void mhdf_getElemTypeName( mhdf_FileHandle file_handle,
315  const char* elem_handle,
316  char* buffer,
317  size_t buf_len,
318  mhdf_Status* status );
319 
320 /** \brief Check if an element group contains polygon or polyhedron
321  *
322  * Check if an element group contains general polygon or polyhedrons
323  * rather than typically fixed-connectivity elements.
324  *
325  * \param file_handle The file.
326  * \param elem_handle The element group.
327  * \param status Passed back status of API call.
328  * \return Zero if normal fixed-connectivity element data. Non-zero if
329  * poly(gon/hedron) general-connectivity data.
330  */
331 int mhdf_isPolyElement( mhdf_FileHandle file_handle, const char* elem_handle, mhdf_Status* status );
332 
333 /** \brief Create connectivity table for an element group
334  *
335  * Create fixed-connectivity data for an element group.
336  * Do NOT use this function for poly(gon/hedron) data.
337  *
338  * \param file_handle The file.
339  * \param elem_handle The element group.
340  * \param num_nodes_per_elem The number of nodes in the connectivity data
341  * for each element.
342  * \param num_elements The number of elements to be written to the table.
343  * \param first_elem_id_out Elements are assigned global IDs in
344  * sequential blocks where the block is the table in
345  * which their connectivity data is written and the
346  * sequence is the sequence in which they are written
347  * in that table. The global ID for the first element
348  * in this group is passed back at this address. The
349  * global IDs for all other elements in the table are
350  * assigned in the sequence in which they are written
351  * in the table.
352  * \param status Passed back status of API call.
353  * \return The HDF5 handle to the connectivity data.
354  */
355 hid_t mhdf_createConnectivity( mhdf_FileHandle file_handle,
356  const char* elem_handle,
357  int num_nodes_per_elem,
358  long num_elements,
359  long* first_elem_id_out,
360  mhdf_Status* status );
361 
362 /** \brief Open connectivity table for an element group
363  *
364  * Open fixed-connectivity data for an element group.
365  * Do NOT use this function for poly(gon/hedron) data. Use
366  * <code>mhdf_isPolyElement</code> or <code>mhdf_getTsttElemType</code>
367  * to check if the data is poly(gon|hedron) data before calling this
368  * function to open the data.
369  *
370  * \param file_handle The file.
371  * \param elem_handle The element group.
372  * \param num_nodes_per_elem_out Used to pass back the number of nodes
373  * in each element.
374  * \param num_elements_out Pass back the number of elements in the table.
375  * \param first_elem_id_out Elements are assigned global IDs in
376  * sequential blocks where the block is the table in
377  * which their connectivity data is written and the
378  * sequence is the sequence in which they are written
379  * in that table. The global ID for the first element
380  * in this group is passed back at this address. The
381  * global IDs for all other elements in the table are
382  * assigned in the sequence in which they are written
383  * in the table.
384  * \param status Passed back status of API call.
385  * \return The HDF5 handle to the connectivity data.
386  */
387 hid_t mhdf_openConnectivity( mhdf_FileHandle file_handle,
388  const char* elem_handle,
389  int* num_nodes_per_elem_out,
390  long* num_elements_out,
391  long* first_elem_id_out,
392  mhdf_Status* status );
393 
394 hid_t mhdf_openConnectivitySimple( mhdf_FileHandle file_handle, const char* elem_handle, mhdf_Status* status );
395 
396 /** \brief Write element coordinate data
397  *
398  * Write interleaved fixed-connectivity element data for a block of elements.
399  * Note: Do not use this for polygon or polyhedron data.
400  *
401  * \param data_handle Handle returned from <code>mhdf_createConnectivity</code>
402  * or <code>mhdf_openConnectivity</code>.
403  * \param offset Table row (element index) at which to start writing.
404  * \param count Number of rows (number of elements) to write.
405  * \param hdf_integer_type The type of the integer data in node_id_list.
406  * Typically <code>H5T_NATIVE_INT</code> or
407  * <code>N5T_NATIVE_LONG</code> as defined in <i>H5Tpublic.h</i>.
408  * The HDF class of this type object <em>must</em> be H5T_INTEGER
409  * \param node_id_list Interleaved connectivity data specified as global node IDs.
410  * \param status Passed back status of API call.
411  */
412 void mhdf_writeConnectivity( hid_t data_handle,
413  long offset,
414  long count,
415  hid_t hdf_integer_type,
416  const void* node_id_list,
417  mhdf_Status* status );
418 void mhdf_writeConnectivityWithOpt( hid_t data_handle,
419  long offset,
420  long count,
421  hid_t hdf_integer_type,
422  const void* node_id_list,
423  hid_t write_prop,
424  mhdf_Status* status );
425 
426 /** \brief Read element coordinate data
427  *
428  * Read interleaved fixed-connectivity element data for a block of elements.
429  * Note: Do not use this for polygon or polyhedron data.
430  *
431  * \param data_handle Handle returned from <code>mhdf_createConnectivity</code>
432  * or <code>mhdf_openConnectivity</code>.
433  * \param offset Table row (element index) at which to start read.
434  * \param count Number of rows (number of elements) to read.
435  * \param hdf_integer_type The type of the integer data in node_id_list.
436  * Typically <code>H5T_NATIVE_INT</code> or
437  * <code>N5T_NATIVE_LONG</code> as defined in <i>H5Tpublic.h</i>.
438  * The HDF class of this type object <em>must</em> be H5T_INTEGER
439  * \param node_id_list Pointer to memory at which to write interleaved
440  * connectivity data specified as global node IDs.
441  * \param status Passed back status of API call.
442  */
443 void mhdf_readConnectivity( hid_t data_handle,
444  long offset,
445  long count,
446  hid_t hdf_integer_type,
447  void* node_id_list,
448  mhdf_Status* status );
449 void mhdf_readConnectivityWithOpt( hid_t data_handle,
450  long offset,
451  long count,
452  hid_t hdf_integer_type,
453  void* node_id_list,
454  hid_t read_prop,
455  mhdf_Status* status );
456 
457 /* Poly(gon|hedra) */
458 
459 /** \brief Create a new table for polygon or polyhedron connectivity data.
460  *
461  * Poly (polygon or polyhedron) connectivity is stored as two lists.
462  * One list is the concatenation of the the connectivity data for
463  * all the polys in the group. The other contains one value per
464  * poly where that value is the index of the last entry in the
465  * connectivity of the corresponding poly. The ID
466  * list for polygons contains global node IDs. The ID list for polyhedra
467  * contains the global IDs of faces (either polygons or 2D fixed-connectivity
468  * elements.)
469  *
470  * \param file_handle The file to write.
471  * \param elem_handle The element group.
472  * \param num_poly The total number number of polygons or polyhedra to
473  * be written in the table.
474  * \param data_list_length The total number of values to be written to the
475  * table (the number of polys plus the sum of the number
476  * of entities in each poly's connectivity data.)
477  * \param first_id_out Elements are assigned global IDs in
478  * sequential blocks where the block is the table in
479  * which their connectivity data is written and the
480  * sequence is the sequence in which they are written
481  * in that table. The global ID for the first element
482  * in this group is passed back at this address. The
483  * global IDs for all other elements in the table are
484  * assigned in the sequence in which they are written
485  * in the table.
486  * \param idx_and_id_handles_out The handles for the index list and
487  * connectivity list, respectively.
488  * \param status Passed back status of API call.
489  */
491  const char* elem_handle,
492  long num_poly,
493  long data_list_length,
494  long* first_id_out,
495  hid_t idx_and_id_handles_out[2],
496  mhdf_Status* status );
497 
498 /** \brief Open a table of polygon or polyhedron connectivity data.
499  *
500  * Poly (polygon or polyhedron) connectivity is stored as two lists.
501  * One list is the concatenation of the the connectivity data for
502  * all the polys in the group. The other contains one value per
503  * poly where that value is the index of the last entry in the
504  * connectivity of the corresponding poly. The ID
505  * list for polygons contains global node IDs. The ID list for polyhedra
506  * contains the global IDs of faces (either polygons or 2D fixed-connectivity
507  * elements.)
508  *
509  * \param file_handle The file to write.
510  * \param elem_handle The element group.
511  * \param num_poly_out The total number number of polygons or polyhedra to
512  * be written in the table.
513  * \param data_list_length_out The total number of values to be written to the
514  * table (the number of polys plus the sum of the number
515  * of entities in each poly's connectivity data.)
516  * \param first_id_out Elements are assigned global IDs in
517  * sequential blocks where the block is the table in
518  * which their connectivity data is written and the
519  * sequence is the sequence in which they are written
520  * in that table. The global ID for the first element
521  * in this group is passed back at this address. The
522  * global IDs for all other elements in the table are
523  * assigned in the sequence in which they are written
524  * in the table.
525  * \param idx_and_id_handles_out The handles for the index list and
526  * connectivity list, respectively.
527  * \param status Passed back status of API call.
528  */
530  const char* elem_handle,
531  long* num_poly_out,
532  long* data_list_length_out,
533  long* first_id_out,
534  hid_t idx_and_id_handles_out[2],
535  mhdf_Status* status );
536 
537 /** \brief Write polygon or polyhedron index data.
538  *
539  * Poly (polygon or polyhedron) connectivity is stored as two lists.
540  * One list is the concatenation of the the connectivity data for
541  * all the polys in the group. The other contains one value per
542  * poly where that value is the index of the last entry in the
543  * connectivity of the corresponding poly. The ID
544  * list for polygons contains global node IDs. The ID list for polyhedra
545  * contains the global IDs of faces (either polygons or 2D fixed-connectivity
546  * elements.)
547  *
548  * This function writes the index list.
549  *
550  * \param poly_handle The handle returned from
551  * <code>mhdf_createPolyConnectivity</code> or
552  * <code>mhdf_openPolyConnectivity</code>.
553  * \param offset The offset in the table at which to write. The
554  * offset is in terms of the integer values in the table,
555  * not the count of polys.
556  * \param count The size of the integer list to write.
557  * \param hdf_integer_type The type of the integer data in <code>id_list</code>.
558  * Typically <code>H5T_NATIVE_INT</code> or
559  * <code>N5T_NATIVE_LONG</code> as defined in <i>H5Tpublic.h</i>.
560  * The HDF class of this type object <em>must</em> be H5T_INTEGER
561  * \param index_list The index list for the polys.
562  * \param status Passed back status of API call.
563  */
564 void mhdf_writePolyConnIndices( hid_t poly_handle,
565  long offset,
566  long count,
567  hid_t hdf_integer_type,
568  const void* index_list,
569  mhdf_Status* status );
570 void mhdf_writePolyConnIndicesWithOpt( hid_t poly_handle,
571  long offset,
572  long count,
573  hid_t hdf_integer_type,
574  const void* index_list,
575  hid_t write_prop,
576  mhdf_Status* status );
577 
578 /** \brief Write polygon or polyhedron connectivity data.
579  *
580  * Poly (polygon or polyhedron) connectivity is stored as two lists.
581  * One list is the concatenation of the the connectivity data for
582  * all the polys in the group. The other contains one value per
583  * poly where that value is the index of the last entry in the
584  * connectivity of the corresponding poly. The ID
585  * list for polygons contains global node IDs. The ID list for polyhedra
586  * contains the global IDs of faces (either polygons or 2D fixed-connectivity
587  * elements.)
588  *
589  * This function writes the connectivity/ID list.
590  *
591  * \param poly_handle The handle returned from
592  * <code>mhdf_createPolyConnectivity</code> or
593  * <code>mhdf_openPolyConnectivity</code>.
594  * \param offset The offset in the table at which to write. The
595  * offset is in terms of the integer values in the table,
596  * not the count of polys.
597  * \param count The size of the integer list to write.
598  * \param hdf_integer_type The type of the integer data in <code>id_list</code>.
599  * Typically <code>H5T_NATIVE_INT</code> or
600  * <code>N5T_NATIVE_LONG</code> as defined in <i>H5Tpublic.h</i>.
601  * The HDF class of this type object <em>must</em> be H5T_INTEGER
602  * \param id_list The count/global ID list specifying the connectivity
603  * of the polys.
604  * \param status Passed back status of API call.
605  */
606 void mhdf_writePolyConnIDs( hid_t poly_handle,
607  long offset,
608  long count,
609  hid_t hdf_integer_type,
610  const void* id_list,
611  mhdf_Status* status );
612 void mhdf_writePolyConnIDsWithOpt( hid_t poly_handle,
613  long offset,
614  long count,
615  hid_t hdf_integer_type,
616  const void* id_list,
617  hid_t write_prop,
618  mhdf_Status* status );
619 
620 /** \brief Read polygon or polyhedron index data.
621  *
622  * Poly (polygon or polyhedron) connectivity is stored as two lists.
623  * One list is the concatenation of the the connectivity data for
624  * all the polys in the group. The other contains one value per
625  * poly where that value is the index of the last entry in the
626  * connectivity of the corresponding poly. The ID
627  * list for polygons contains global node IDs. The ID list for polyhedra
628  * contains the global IDs of faces (either polygons or 2D fixed-connectivity
629  * elements.)
630  *
631  * \param poly_handle The handle returned from
632  * <code>mhdf_createPolyConnectivity</code> or
633  * <code>mhdf_openPolyConnectivity</code>.
634  * \param offset The offset in the table at which to read. The
635  * offset is in terms of the integer values in the table,
636  * not the count of polys.
637  * \param count The size of the integer list to read.
638  * \param hdf_integer_type The type of the integer data as written into memory.
639  * Typically <code>H5T_NATIVE_INT</code> or
640  * <code>N5T_NATIVE_LONG</code> as defined in <i>H5Tpublic.h</i>.
641  * The HDF class of this type object <em>must</em> be H5T_INTEGER
642  * \param index_list The memory location at which to write the indices.
643  * \param status Passed back status of API call.
644  */
645 void mhdf_readPolyConnIndices( hid_t poly_handle,
646  long offset,
647  long count,
648  hid_t hdf_integer_type,
649  void* index_list,
650  mhdf_Status* status );
651 void mhdf_readPolyConnIndicesWithOpt( hid_t poly_handle,
652  long offset,
653  long count,
654  hid_t hdf_integer_type,
655  void* index_list,
656  hid_t read_prop,
657  mhdf_Status* status );
658 
659 /** \brief Read polygon or polyhedron connectivity data.
660  *
661  * Poly (polygon or polyhedron) connectivity is stored as two lists.
662  * One list is the concatenation of the the connectivity data for
663  * all the polys in the group. The other contains one value per
664  * poly where that value is the index of the last entry in the
665  * connectivity of the corresponding poly. The ID
666  * list for polygons contains global node IDs. The ID list for polyhedra
667  * contains the global IDs of faces (either polygons or 2D fixed-connectivity
668  * elements.)
669  *
670  * \param poly_handle The handle returned from
671  * <code>mhdf_createPolyConnectivity</code> or
672  * <code>mhdf_openPolyConnectivity</code>.
673  * \param offset The offset in the table at which to read. The
674  * offset is in terms of the integer values in the table,
675  * not the count of polys.
676  * \param count The size of the integer list to read.
677  * \param hdf_integer_type The type of the integer data as written into memory.
678  * Typically <code>H5T_NATIVE_INT</code> or
679  * <code>N5T_NATIVE_LONG</code> as defined in <i>H5Tpublic.h</i>.
680  * The HDF class of this type object <em>must</em> be H5T_INTEGER
681  * \param id_list The memory location at which to write the connectivity data.
682  * \param status Passed back status of API call.
683  */
684 void mhdf_readPolyConnIDs( hid_t poly_handle,
685  long offset,
686  long count,
687  hid_t hdf_integer_type,
688  void* id_list,
689  mhdf_Status* status );
690 void mhdf_readPolyConnIDsWithOpt( hid_t poly_handle,
691  long offset,
692  long count,
693  hid_t hdf_integer_type,
694  void* id_list,
695  hid_t read_prop,
696  mhdf_Status* status );
697 
698 /**
699  * Adjacency data.
700  *
701  * Adjacency data is formated as a sequence of integer groups where
702  * the first entry in each group is the ID of the element for which
703  * adjacencies are being specified, the second value is the count of
704  * adjacent entities, and the remainder of the group is the list of
705  * IDs of the adjacent entities.
706  */
707 
708 /** \brief Create adjacency data table for nodes, elements, polys, etc.
709  *
710  * Create file object for adjacency data for a nodes or a specified
711  * element group.
712  *
713  * Adjacency data is formated as a sequence of integer groups where
714  * the first entry in each group is the ID of the element for which
715  * adjacencies are being specified, the second value is the count of
716  * adjacent entities, and the remainder of the group is the list of
717  * IDs of the adjacent entities.
718  *
719  * \param file_handle The file.
720  * \param elem_handle The element group (or the result of
721  * <code>mhdf_node_type_handle</code> for nodes) for
722  * which the adjacency data is to be specified.
723  * \param adj_list_size The total number of integer values contained
724  * in the adjacency data for the specified element group.
725  * \param status Passed back status of API call.
726  * \return The HDF5 handle to the connectivity data.
727  */
728 hid_t mhdf_createAdjacency( mhdf_FileHandle file_handle,
729  const char* elem_handle,
730  long adj_list_size,
731  mhdf_Status* status );
732 
733 /** \brief Check if adjacency data is present in the file for the specified
734  * element group.
735  *
736  * \param file The file.
737  * \param elem_handle A handle to an element group.
738  * \param status Passed back status of API call.
739  */
740 int mhdf_haveAdjacency( mhdf_FileHandle file, const char* elem_handle, mhdf_Status* status );
741 
742 /** \brief Open adjacency data table for nodes, elements, polys, etc.
743  *
744  * Open the file object containing adjacency data for a nodes or a specified
745  * element group.
746  *
747  * Adjacency data is formated as a sequence of integer groups where
748  * the first entry in each group is the ID of the element for which
749  * adjacencies are being specified, the second value is the count of
750  * adjacent entities, and the remainder of the group is the list of
751  * IDs of the adjacent entities.
752  *
753  * \param file_handle The file.
754  * \param elem_handle The element group (or the result of
755  * <code>mhdf_node_type_handle</code> for nodes) for
756  * which the adjacency data is to be specified.
757  * \param adj_list_size The total number of integer values contained
758  * in the adjacency data for the specified element group.
759  * \param status Passed back status of API call.
760  * \return The HDF5 handle to the connectivity data.
761  */
762 hid_t mhdf_openAdjacency( mhdf_FileHandle file_handle,
763  const char* elem_handle,
764  long* adj_list_size,
765  mhdf_Status* status );
766 
767 /** \brief Write node/element adjacency data
768  *
769  * Write adjacency data.
770  *
771  * Adjacency data is formated as a sequence of integer groups where
772  * the first entry in each group is the ID of the element for which
773  * adjacencies are being specified, the second value is the count of
774  * adjacent entities, and the remainder of the group is the list of
775  * IDs of the adjacent entities.
776  *
777  * \param data_handle Handle returned from <code>mhdf_createAdjacency</code>
778  * or <code>mhdf_openAdjacency</code>.
779  * \param offset List position at which to start writing. Offset is
780  * from the count if integer values written, NOT a count
781  * of the number of elements for which adjacency data
782  * is written.
783  * \param count Number of integer values to write.
784  * \param hdf_integer_type The type of the integer data in <code>adj_list_data</code>.
785  * Typically <code>H5T_NATIVE_INT</code> or
786  * <code>N5T_NATIVE_LONG</code> as defined in <i>H5Tpublic.h</i>.
787  * The HDF class of this type object <em>must</em> be H5T_INTEGER
788  * \param adj_list_data Adjacency data to write.
789  * \param status Passed back status of API call.
790  */
791 void mhdf_writeAdjacency( hid_t data_handle,
792  long offset,
793  long count,
794  hid_t hdf_integer_type,
795  const void* adj_list_data,
796  mhdf_Status* status );
797 void mhdf_writeAdjacencyWithOpt( hid_t data_handle,
798  long offset,
799  long count,
800  hid_t hdf_integer_type,
801  const void* adj_list_data,
802  hid_t write_prop,
803  mhdf_Status* status );
804 
805 /** \brief Read node/element adjacency data
806  *
807  * Read adjacency data.
808  *
809  * Adjacency data is formated as a sequence of integer groups where
810  * the first entry in each group is the ID of the element for which
811  * adjacencies are being specified, the second value is the count of
812  * adjacent entities, and the remainder of the group is the list of
813  * IDs of the adjacent entities.
814  *
815  * \param data_handle Handle returned from <code>mhdf_createAdjacency</code>
816  * or <code>mhdf_openAdjacency</code>.
817  * \param offset List position at which to start reading. Offset is
818  * from the count if integer values written, NOT a count
819  * of the number of elements for which adjacency data
820  * is written.
821  * \param count Number of integer values to reading.
822  * \param hdf_integer_type The type of the integer data in <code>adj_list_data_out</code>.
823  * Typically <code>H5T_NATIVE_INT</code> or
824  * <code>N5T_NATIVE_LONG</code> as defined in <i>H5Tpublic.h</i>.
825  * The HDF class of this type object <em>must</em> be H5T_INTEGER
826  * \param adj_list_data_out Pointer to memory at which to write adjacency data.
827  * \param status Passed back status of API call.
828  */
829 void mhdf_readAdjacency( hid_t data_handle,
830  long offset,
831  long count,
832  hid_t hdf_integer_type,
833  void* adj_list_data_out,
834  mhdf_Status* status );
835 void mhdf_readAdjacencyWithOpt( hid_t data_handle,
836  long offset,
837  long count,
838  hid_t hdf_integer_type,
839  void* adj_list_data_out,
840  hid_t read_prop,
841  mhdf_Status* status );
842 
843 
844 /**
845  * Meshset data.
846  *
847  * Meshset data is divided into three groups of data. The set-list/meta-information table,
848  * the set contents table and the set children table. Each is written and read independently.
849  *
850  * The set list table contains one row for each set. Each row contains four values:
851  * {content list end index, child list end index, parent list end index, and flags}. The flags
852  * value is a collection of bits with
853  * values defined in \ref mhdf_set_flag . The all the flags except \ref mhdf_SET_RANGE_BIT are
854  * saved properties of the mesh data and are not relevant to the actual file in any way. The
855  * \ref mhdf_SET_RANGE_BIT flag is a toggle for how the meshset contents (not children) are saved.
856  * It is an internal property of the file format and should not be passed on to the mesh database.
857  * The content list end index and child list end index are the indices of the last entry for the
858  * set in the contents and children tables respectively. In the case where a set has either no
859  * children or no contents, the last index of should be the same as the last index of the previous
860  * set in the table, or -1 for the first set in the table. Thus the first index is always one
861  * greater than the last index of the previous set. If the first index, calculated as one greater
862  * that the last index of the previous set is greater than the last index of the current set, then
863  * there are no values in the corresponding contents or children table for that set.
864  *
865  * The set contents table is a vector of integer global IDs that is the concatenation of the contents
866  * data for all of the mesh sets. The values are stored corresponding to the order of the sets
867  * in the set list table. Depending on the value of \ref mhdf_SET_RANGE_BIT in the flags field of
868  * the set list table, the contents for a specific set may be stored in one of two formats. If the
869  * flag is set, the contents list is a list of pairs where each pair is a starting global Id and a
870  * count. For each pair, the set contains the range of global Ids beginning at the start value.
871  * If the \ref mhdf_SET_RANGE_BIT flag is not set, the meshset contents are a simple list of global Ids.
872  *
873  * The meshset child table is a vector of integer global IDs. It is a concatenation of the child
874  * lists for all the mesh sets, in the order the sets occur in the meshset list table. The values
875  * are always simple lists. The child table may never contain ranges of IDs.
876  */
877 
878 /**
879  * Set flag bits
880  */
881 
882 /** \brief Make entities in set aware of owning set (MOAB-specific?)*/
883 #define mhdf_SET_OWNER_BIT 0x1
884 /** \brief Set cannot contain duplicates */
885 #define mhdf_SET_UNIQUE_BIT 0x2
886 /** \brief Set order is preserved */
887 #define mhdf_SET_ORDER_BIT 0x4
888 
889 /** \brief The bit specifying set storage format.
890  *
891  * If this bit is set, then the contents of a set (not the children)
892  * is written as set of ranges, where each range is of the form
893  * {global start id, count}. For such a range, the set contains the
894  * <code>count</code> entities with sequential global IDs beginning
895  * with the specified start ID. If this bit is not set in the set flags,
896  * the contents of the set are stored as a simple list of global IDs.
897  */
898 #define mhdf_SET_RANGE_BIT 0x8
899 
900 /** \brief Create table holding list of meshsets and their properties.
901  *
902  * The set table contains description of sets, but not contents or
903  * children. The table is a <code>n x 4</code> matrix of values.
904  * One row for each of <code>n</code> sets. Each row contains the end index
905  * for the set in the contents table, the end index for the set in the children
906  * table, the end index for the set in the parents table, and the set flags,
907  * respectively. The \ref mhdf_SET_RANGE_BIT
908  * bit in the flags specifies the format of the contents list for each set.
909  * See a description of the \ref mhdf_SET_RANGE_BIT flag for a description
910  * of the two possible data formats. The index values in the first two columns
911  * of the table are the index of the <em>last</em> value for the set in the corresponding
912  * contents and children lists. The first index is always one greater than the last index
913  * for the previous set in the table. The first index of the first set in the table is
914  * implicitly zero. A special value of -1 in the appropriate column should be used to
915  * indicate that the first set contains no contents or has no children. For any other set,
916  * if the last index for the set is the same as that of the previous set, it has no data
917  * in the corresponding list.
918  *
919  *\param file_handle The file.
920  *\param num_sets The number of sets in the table.
921  *\param first_set_id_out The global ID that will be assigned to the first
922  * set in the table. All subsequent sets in the table
923  * will be assigned sequential global IDs.
924  * \param status Passed back status of API call.
925  *\return The handle to the set meta-data table.
926  */
927 hid_t mhdf_createSetMeta( mhdf_FileHandle file_handle, long num_sets, long* first_set_id_out, mhdf_Status* status );
928 
929 /** \brief Check if file contains any sets
930  *
931  *\param file The file.
932  *\param have_set_data_out If non-null set to 1 if file contains table
933  * of set contents, zero otherwise.
934  *\param have_set_child_out If non-null set to 1 if file contains table
935  * of set children, zero otherwise.
936  *\param have_set_parents_out If non-null set to 1 if file contains table
937  * of set parents, zero otherwise.
938  * \param status Passed back status of API call.
939  *\return Zero if the file does not contain any sets, one if it does.
940  */
942  int* have_set_data_out,
943  int* have_set_child_out,
944  int* have_set_parents_out,
945  mhdf_Status* status );
946 
947 /** \brief Open table holding list of meshsets and their properties.
948  *
949  * Open set list.
950  * See \ref mhdf_createSetMeta or \ref mhdf_set for a description of this data.
951  *
952  *\param file_handle The file.
953  *\param num_sets_out The number of sets in the table.
954  *\param first_set_id_out The global ID that will of the first
955  * set in the table. All subsequent sets in the table
956  * have sequential global IDs.
957  * \param status Passed back status of API call.
958  *\return The handle to the set meta-data table.
959  */
960 hid_t mhdf_openSetMeta( mhdf_FileHandle file_handle, long* num_sets_out, long* first_set_id_out, mhdf_Status* status );
961 
962 hid_t mhdf_openSetMetaSimple( mhdf_FileHandle file_handle, mhdf_Status* status );
963 
964 /** \brief Read list of sets and meta-information about sets.
965  *
966  * Read set descriptions. See \ref mhdf_createSetMeta or \ref mhdf_set
967  * for a description of this data.
968  *
969  *\param data_handle The handle returned from \ref mhdf_createSetMeta or
970  * \ref mhdf_openSetMeta.
971  *\param offset The offset (set index) to begin reading at.
972  *\param count The number of rows (sets, integer triples) to read.
973  *\param hdf_integer_type The type of the integer data in <code>set_desc_data</code>.
974  * Typically <code>H5T_NATIVE_INT</code> or
975  * <code>N5T_NATIVE_LONG</code> as defined in <i>H5Tpublic.h</i>.
976  * The HDF class of this type object <em>must</em> be H5T_INTEGER
977  * \param status Passed back status of API call.
978  *\param set_desc_data The memory location at which to write the data.
979  */
980 void mhdf_readSetMeta( hid_t data_handle,
981  long offset,
982  long count,
983  hid_t hdf_integer_type,
984  void* set_desc_data,
985  mhdf_Status* status );
986 void mhdf_readSetMetaWithOpt( hid_t data_handle,
987  long offset,
988  long count,
989  hid_t hdf_integer_type,
990  void* set_desc_data,
991  hid_t read_prop,
992  mhdf_Status* status );
993 
994 /** \brief Read only the flags portion of the set description table
995  *
996  * Read flags for each set from the set description table.
997  * See \ref mhdf_createSetMeta for a description of this data.
998  *\param data_handle The handle returned from mdhf_createSetMeta or mhdf_openSetMeta
999  *\param offset The offset (set index) at which to begin reading.
1000  *\param count The number of values (number of sets) to read.
1001  *\param hdf_integer_type The integer type of the input array 'set_flag_data'.
1002  *\param set_flag_data Array of integers.
1003  *\param status Location at which to store status of API call.
1004  */
1005 void mhdf_readSetFlags( hid_t data_handle,
1006  long offset,
1007  long count,
1008  hid_t hdf_integer_type,
1009  void* set_flag_data,
1010  mhdf_Status* status );
1011 void mhdf_readSetFlagsWithOpt( hid_t data_handle,
1012  long offset,
1013  long count,
1014  hid_t hdf_integer_type,
1015  void* set_flag_data,
1016  hid_t read_prop,
1017  mhdf_Status* status );
1018 
1019 /** \brief Read only the content end indices portion of the set description table
1020  *
1021  * For each set, read the last index of that set's data in the set
1022  * contents table.
1023  *
1024  * NOTE: This is a signed value. Any sets w/out contents that occur
1025  * first in the list will have an end index of -1.
1026  *
1027  *\param data_handle The handle returned from mdhf_createSetMeta or mhdf_openSetMeta
1028  *\param offset The offset (set index) at which to begin reading.
1029  *\param count The number of values (number of sets) to read.
1030  *\param hdf_integer_type The integer type of the input array 'set_flag_data'.
1031  *\param end_indices_out Array of indices.
1032  *\param status Location at which to store status of API call.
1033  */
1034 void mhdf_readSetContentEndIndices( hid_t data_handle,
1035  long offset,
1036  long count,
1037  hid_t hdf_integer_type,
1038  void* end_indices_out,
1039  mhdf_Status* status );
1040 void mhdf_readSetContentEndIndicesWithOpt( hid_t data_handle,
1041  long offset,
1042  long count,
1043  hid_t hdf_integer_type,
1044  void* end_indices_out,
1045  hid_t read_prop,
1046  mhdf_Status* status );
1047 
1048 /** \brief Read only the child end indices portion of the set description table
1049  *
1050  * For each set, read the last index of that set's data in the set
1051  * children table.
1052  *
1053  * NOTE: This is a signed value. Any sets w/out contents that occur
1054  * first in the list will have an end index of -1.
1055  *
1056  *\param data_handle The handle returned from mdhf_createSetMeta or mhdf_openSetMeta
1057  *\param offset The offset (set index) at which to begin reading.
1058  *\param count The number of values (number of sets) to read.
1059  *\param hdf_integer_type The integer type of the input array 'set_flag_data'.
1060  *\param end_indices_out Array of indices.
1061  *\param status Location at which to store status of API call.
1062  */
1063 void mhdf_readSetChildEndIndices( hid_t data_handle,
1064  long offset,
1065  long count,
1066  hid_t hdf_integer_type,
1067  void* end_indices_out,
1068  mhdf_Status* status );
1069 void mhdf_readSetChildEndIndicesWithOpt( hid_t data_handle,
1070  long offset,
1071  long count,
1072  hid_t hdf_integer_type,
1073  void* end_indices_out,
1074  hid_t read_prop,
1075  mhdf_Status* status );
1076 
1077 /** \brief Read only the parent end indices portion of the set description table
1078  *
1079  * For each set, read the last index of that set's data in the set
1080  * parents table.
1081  *
1082  * NOTE: This is a signed value. Any sets w/out contents that occur
1083  * first in the list will have an end index of -1.
1084  *
1085  *\param data_handle The handle returned from mdhf_createSetMeta or mhdf_openSetMeta
1086  *\param offset The offset (set index) at which to begin reading.
1087  *\param count The number of values (number of sets) to read.
1088  *\param hdf_integer_type The integer type of the input array 'set_flag_data'.
1089  *\param end_indices_out Array of indices.
1090  *\param status Location at which to store status of API call.
1091  */
1092 void mhdf_readSetParentEndIndices( hid_t data_handle,
1093  long offset,
1094  long count,
1095  hid_t hdf_integer_type,
1096  void* end_indices_out,
1097  mhdf_Status* status );
1098 void mhdf_readSetParentEndIndicesWithOpt( hid_t data_handle,
1099  long offset,
1100  long count,
1101  hid_t hdf_integer_type,
1102  void* end_indices_out,
1103  hid_t read_prop,
1104  mhdf_Status* status );
1105 
1106 /** \brief Write list of sets and meta-information about sets.
1107  *
1108  * Write set descriptions. See \ref mhdf_createSetMeta or \ref mhdf_set for a
1109  * description of the data format.
1110  *
1111  *\param data_handle The handle returned from \ref mhdf_createSetMeta or
1112  * \ref mhdf_openSetMeta.
1113  *\param offset The offset (set index) to begin writing at.
1114  *\param count The number of rows (sets, integer triples) to write.
1115  *\param hdf_integer_type The type of the integer data in <code>set_desc_data</code>.
1116  * Typically <code>H5T_NATIVE_INT</code> or
1117  * <code>N5T_NATIVE_LONG</code> as defined in <i>H5Tpublic.h</i>.
1118  * The HDF class of this type object <em>must</em> be H5T_INTEGER
1119  *\param set_desc_data The data to write.
1120  * \param status Passed back status of API call.
1121  */
1122 void mhdf_writeSetMeta( hid_t data_handle,
1123  long offset,
1124  long count,
1125  hid_t hdf_integer_type,
1126  const void* set_desc_data,
1127  mhdf_Status* status );
1128 void mhdf_writeSetMetaWithOpt( hid_t data_handle,
1129  long offset,
1130  long count,
1131  hid_t hdf_integer_type,
1132  const void* set_desc_data,
1133  hid_t write_prop,
1134  mhdf_Status* status );
1135 
1136 /** \brief Create file object to hold list of meshset contents.
1137  *
1138  * Create set contents data object.
1139  * The format of this data is a vector of integer values which is the
1140  * concatenation of the contents list for all the meshsets. The length
1141  * and format of the data for each set is stored in the set meta table.
1142  * See \ref mhdf_createSetMeta and \ref mhdf_SET_RANGE_BIT for a
1143  * description of that data.
1144  *
1145  *\param file_handle The file.
1146  *\param data_list_size The total length (number of integer values) to
1147  * be written for all the sets.
1148  *\param status Passed back status of API call.
1149  *\return A handle to the table.
1150  */
1151 hid_t mhdf_createSetData( mhdf_FileHandle file_handle, long data_list_size, mhdf_Status* status );
1152 
1153 /** \brief Open the file object for the meshset contents.
1154  *
1155  * Open set contents data object.
1156  * The format of this data is a vector of integer values which is the
1157  * concatenation of the contents list for all the meshsets. The length
1158  * and format of the data for each set is stored in the set meta table.
1159  * See \ref mhdf_createSetMeta and \ref mhdf_SET_RANGE_BIT for a
1160  * description of that data.
1161  *
1162  *\param file_handle The file.
1163  *\param data_list_size_out The length of the table.
1164  *\param status Passed back status of API call.
1165  *\return A handle to the table.
1166  */
1167 hid_t mhdf_openSetData( mhdf_FileHandle file_handle, long* data_list_size_out, mhdf_Status* status );
1168 
1169 /** \brief Write set contents.
1170  *
1171  * Write data specifying entities contained in sets.
1172  * The format of this data is a vector of integer values which is the
1173  * concatenation of the contents list for all the meshsets. The length
1174  * and format of the data for each set is stored in the set meta table.
1175  * See \ref mhdf_createSetMeta and \ref mhdf_SET_RANGE_BIT for a
1176  * description of that data.
1177  *
1178  *\param set_handle The handle returned from \ref mhdf_createSetData
1179  * or \ref mhdf_openSetData .
1180  *\param offset The position at which to write into the integer vector.
1181  *\param count The number of values to write into the data vector.
1182  *\param hdf_integer_type The type of the integer data in <code>set_data</code>.
1183  * Typically <code>H5T_NATIVE_INT</code> or
1184  * <code>N5T_NATIVE_LONG</code> as defined in <i>H5Tpublic.h</i>.
1185  * The HDF class of this type object <em>must</em> be H5T_INTEGER
1186  *\param set_data The data to write.
1187  *\param status Passed back status of API call.
1188  */
1189 void mhdf_writeSetData( hid_t set_handle,
1190  long offset,
1191  long count,
1192  hid_t hdf_integer_type,
1193  const void* set_data,
1194  mhdf_Status* status );
1195 void mhdf_writeSetDataWithOpt( hid_t set_handle,
1196  long offset,
1197  long count,
1198  hid_t hdf_integer_type,
1199  const void* set_data,
1200  hid_t write_prop,
1201  mhdf_Status* status );
1202 
1203 /** \brief Read set contents.
1204  *
1205  * Read data specifying entities contained in sets.
1206  * The format of this data is a vector of integer values which is the
1207  * concatenation of the contents list for all the meshsets. The length
1208  * and format of the data for each set is stored in the set meta table.
1209  * See \ref mhdf_createSetMeta and \ref mhdf_SET_RANGE_BIT for a
1210  * description of that data.
1211  *
1212  *\param set_handle The handle returned from \ref mhdf_createSetData
1213  * or \ref mhdf_openSetData .
1214  *\param offset The position at which to read from the integer vector.
1215  *\param count The number of values to read from the data vector.
1216  *\param hdf_integer_type The type of the integer data in <code>set_data</code>.
1217  * Typically <code>H5T_NATIVE_INT</code> or
1218  * <code>N5T_NATIVE_LONG</code> as defined in <i>H5Tpublic.h</i>.
1219  * The HDF class of this type object <em>must</em> be H5T_INTEGER
1220  *\param set_data A pointer to memory at which to store the read data.
1221  *\param status Passed back status of API call.
1222  */
1223 void mhdf_readSetData( hid_t set_handle,
1224  long offset,
1225  long count,
1226  hid_t hdf_integer_type,
1227  void* set_data,
1228  mhdf_Status* status );
1229 void mhdf_readSetDataWithOpt( hid_t set_handle,
1230  long offset,
1231  long count,
1232  hid_t hdf_integer_type,
1233  void* set_data,
1234  hid_t read_prop,
1235  mhdf_Status* status );
1236 
1237 /** \brief Create file object for storing the set child list
1238  *
1239  * Create a data group for the list of set children.
1240  * The format of this data is the concatenation of the lists of
1241  * global IDs of child sets for each set. The order of the sets and
1242  * the number of children for each set is contained in the set meta table.
1243  * (See \ref mhdf_createSetMeta ).
1244  *
1245  *\param file_handle The file
1246  *\param child_list_size The total length of the data (the sum of the
1247  * number of children for each set.)
1248  *\param status Passed back status of API call.
1249  *\return A handle to the data object in the file.
1250  */
1251 hid_t mhdf_createSetChildren( mhdf_FileHandle file_handle, long child_list_size, mhdf_Status* status );
1252 
1253 /** \brief Open the file object containing the set child list
1254  *
1255  * Open the data group containing the list of set children.
1256  * See \ref mhdf_createSetChildren and \ref mhdf_createSetMeta for
1257  * a description of this data.
1258  *
1259  *\param file_handle The file
1260  *\param child_list_size The total length of the data (the sum of the
1261  * number of children for each set.)
1262  *\param status Passed back status of API call.
1263  *\return A handle to the data object in the file.
1264  */
1265 hid_t mhdf_openSetChildren( mhdf_FileHandle file_handle, long* child_list_size, mhdf_Status* status );
1266 
1267 /** \brief Create file object for storing the set parent list
1268  *
1269  * Create a data group for the list of set parents.
1270  * The format of this data is the concatenation of the lists of
1271  * global IDs of parent sets for each set. The order of the sets and
1272  * the number of parents for each set is contained in the set meta table.
1273  * (See \ref mhdf_createSetMeta ).
1274  *
1275  *\param file_handle The file
1276  *\param parent_list_size The total length of the data (the sum of the
1277  * number of parents for each set.)
1278  *\param status Passed back status of API call.
1279  *\return A handle to the data object in the file.
1280  */
1281 hid_t mhdf_createSetParents( mhdf_FileHandle file_handle, long parent_list_size, mhdf_Status* status );
1282 
1283 /** \brief Open the file object containing the set parent list
1284  *
1285  * Open the data group containing the list of set parents.
1286  * See \ref mhdf_createSetParents and \ref mhdf_createSetMeta for
1287  * a description of this data.
1288  *
1289  *\param file_handle The file
1290  *\param parent_list_size The total length of the data (the sum of the
1291  * number of parents for each set.)
1292  *\param status Passed back status of API call.
1293  *\return A handle to the data object in the file.
1294  */
1295 hid_t mhdf_openSetParents( mhdf_FileHandle file_handle, long* parent_list_size, mhdf_Status* status );
1296 
1297 /** \brief Write set parent/child list
1298  *
1299  * Write the list of parent or child IDs for sets.
1300  * See \ref mhdf_createSetChildren and \ref mhdf_createSetMeta for
1301  * a description of this data.
1302  *
1303  *\param data_handle The value returned from \ref mhdf_createSetChildren
1304  * or \ref mhdf_openSetChildren.
1305  *\param offset The offset into the list of global IDs.
1306  *\param count The number of global IDs to write.
1307  *\param hdf_integer_type The type of the integer data in <code>child_id_list</code>.
1308  * Typically <code>H5T_NATIVE_INT</code> or
1309  * <code>N5T_NATIVE_LONG</code> as defined in <i>H5Tpublic.h</i>.
1310  * The HDF class of this type object <em>must</em> be H5T_INTEGER
1311  *\param id_list The data to write.
1312  *\param status Passed back status of API call.
1313  */
1314 void mhdf_writeSetParentsChildren( hid_t data_handle,
1315  long offset,
1316  long count,
1317  hid_t hdf_integer_type,
1318  const void* id_list,
1319  mhdf_Status* status );
1320 void mhdf_writeSetParentsChildrenWithOpt( hid_t data_handle,
1321  long offset,
1322  long count,
1323  hid_t hdf_integer_type,
1324  const void* id_list,
1325  hid_t write_prop,
1326  mhdf_Status* status );
1327 
1328 /** \brief Read set parent/child list
1329  *
1330  * Read from the list of parent or child IDs for sets.
1331  * See \ref mhdf_createSetChildren and \ref mhdf_createSetMeta for
1332  * a description of this data.
1333  *
1334  *\param data_handle The value returned from \ref mhdf_createSetChildren
1335  * or \ref mhdf_openSetChildren.
1336  *\param offset The offset into the list of global IDs.
1337  *\param count The number of global IDs to read.
1338  *\param hdf_integer_type The type of the integer data in <code>child_id_list</code>.
1339  * Typically <code>H5T_NATIVE_INT</code> or
1340  * <code>N5T_NATIVE_LONG</code> as defined in <i>H5Tpublic.h</i>.
1341  * The HDF class of this type object <em>must</em> be H5T_INTEGER
1342  *\param id_list Pointer to memory in which to the read data.
1343  *\param status Passed back status of API call.
1344  */
1345 void mhdf_readSetParentsChildren( hid_t data_handle,
1346  long offset,
1347  long count,
1348  hid_t hdf_integer_type,
1349  void* id_list,
1350  mhdf_Status* status );
1351 void mhdf_readSetParentsChildrenWithOpt( hid_t data_handle,
1352  long offset,
1353  long count,
1354  hid_t hdf_integer_type,
1355  void* id_list,
1356  hid_t read_prop,
1357  mhdf_Status* status );
1358 
1359 
1360 /**
1361  * Tag data.
1362  *
1363  * The data for each tag can be stored in two places/formats: sparse and/or
1364  * dense. The data may be stored in both, but there should not be redundant
1365  * values for the same entity.
1366  *
1367  * Dense tag data is stored as multiple tables of tag values, one for each
1368  * element group. (Note: special \ref mhdf_ElemHandle values are available
1369  * for accessing dense tag data on nodes or meshsets via the \ref mhdf_node_type_handle
1370  * and \ref mhdf_set_type_handle functions.) Each dense tag table should contain
1371  * the same number of entries as the element connectivity table. The tag values
1372  * are associated with the corresponding element in the connectivity table.
1373  *
1374  * Sparse tag data is stored as a global table pair for each tag type. The first
1375  * if the pair of tables is a list of Global IDs. The second is the corresponding
1376  * tag value for each entity in the ID list.
1377  */
1378 
1379 /**
1380  * Tag type values (MOAB-specific)
1381  */
1382 
1383 /** \brief Was dense tag data in mesh database */
1384 #define mhdf_DENSE_TYPE 2
1385 /** \brief Was sparse tag data in mesh database */
1386 #define mhdf_SPARSE_TYPE 1
1387 /** \brief Was bit-field tag data in mesh database */
1388 #define mhdf_BIT_TYPE 0
1389 /** \brief Unused */
1390 #define mhdf_MESH_TYPE 3
1391 
1392 
1393 /** \brief Make type native-endian.
1394  *
1395  * Given an atomic HDF5 data type, return the built-in type
1396  * that matches the class of the passed type and is the specified
1397  * size.
1398  *
1399  * This function is provided to allow converting the stored tag
1400  * type in a file to the preferred type for it's representation
1401  * in memory when reading tag values.
1402  *
1403  * This function works only for atomic types. The returned type
1404  * will be a pre-defined HDF5 object and does not need to be
1405  * closed/released.
1406  *
1407  *\param input_type The type to convert.
1408  *\param size The desired size in bytes.
1409  *\param status Passed back status of API call.
1410  *\return The converted type.
1411  */
1412 hid_t mhdf_getNativeType( hid_t input_type, int size, mhdf_Status* status );
1413 
1414 /** \brief Add a tag to the file
1415  *
1416  * Add a new tag to the file. This function must be called
1417  * to define the tag characteristics before values for the
1418  * tag can be written.
1419  *
1420  *\param file_handle The file
1421  *\param tag_name The tag name
1422  *\param tag_type The tag type.
1423  *\param size If tag_type == mhdf_BITFIELD, the number of
1424  * bits. If tag_type == mhdf_OPAQUE, the size
1425  * of the opaque type in bytes. Otherwise the
1426  * length of the array of tag_type entities associated
1427  * with each mesh entity, or 1 for a scalar value.
1428  *\param storage MOAB storage type (dense, sparse, etc.)
1429  *\param default_value Default value for tag, or NULL if none.
1430  *\param global_value Global value for tag, or NULL if none.
1431  *\param hdf_type If non-zero, assumed to be a user-specified type
1432  * for opaque data. Ignored if tag_type is not
1433  * mhdf_OPAQUE.
1434  *\param hdf_base_type Ignored if hdf_type is non-zero. If hdf_type is
1435  * zero and this type is non-zero, it is used either
1436  * as the type or as the base type for an array type for
1437  * default_value and global_value, respectively. Typically
1438  * used to specify the input data type for mhdf_ENTITY_ID
1439  * tags.
1440  */
1441 void mhdf_createTag( mhdf_FileHandle file_handle,
1442  const char* tag_name,
1443  enum mhdf_TagDataType tag_type,
1444  int size,
1445  int storage,
1446  const void* default_value,
1447  const void* global_value,
1448  hid_t hdf_type,
1449  hid_t mhdf_base_type,
1450  mhdf_Status* status );
1451 
1452 /**\brief Get handle to HDF5 type object for tag data */
1453 hid_t mhdf_getTagDataType( mhdf_FileHandle file_handle, const char* tag_name, mhdf_Status* status );
1454 
1455 /** \brief Add variable-length tag to file
1456  *
1457  * Add a new tag to the file. This function must be called
1458  * to define the tag characteristics before values for the
1459  * tag can be written. Use this function if the tag values
1460  * are not fixed-length.
1461  *
1462  *\param file_handle The file
1463  *\param tag_name The tag name
1464  *\param tag_type The tag type.
1465  *\param storage MOAB storage type (dense, sparse, etc.)
1466  *\param default_value Default value for tag, or NULL if none.
1467  *\param default_value_length Length of default value.
1468  *\param global_value Global value for tag, or NULL if none.
1469  *\param global_value_length Length of global value.
1470  *\param hdf_type If non-zero, assumed to be a user-specified type
1471  * for opaque data. Ignored if tag_type is not
1472  * mhdf_OPAQUE.
1473  *\param hdf_base_type Ignored if hdf_type is non-zero. If hdf_type is
1474  * zero and this type is non-zero, it is used either
1475  * as the type or as the base type for an array type for
1476  * default_value and global_value, respectively. Typically
1477  * used to specify the input data type for mhdf_ENTITY_ID
1478  * tags.
1479  */
1480 void mhdf_createVarLenTag( mhdf_FileHandle file_handle,
1481  const char* tag_name,
1482  enum mhdf_TagDataType tag_type,
1483  int storage,
1484  const void* default_value,
1485  int default_value_length,
1486  const void* global_value,
1487  int global_value_length,
1488  hid_t hdf_type,
1489  hid_t hdf_base_type,
1490  mhdf_Status* status );
1491 
1492 /** \brief Get the number of tags in the file.
1493  *
1494  *\param file_handle The file.
1495  *\param status Passed back status of API call.
1496  *\return The number of tags.
1497  */
1498 int mhdf_getNumberTags( mhdf_FileHandle file_handle, mhdf_Status* status );
1499 
1500 /** \brief Get the name for each tag defined in the file.
1501  *
1502  *\param file_handle The file.
1503  *\param num_names_out The length of the returned array of strings.
1504  *\param status Passed back status of API call.
1505  *\return An array of null-terminated strings. The array
1506  * and each string is allocated with <code>malloc</code>.
1507  * The caller should release this memory by calling
1508  * <code>free</code> for each string and the array.
1509  */
1510 char** mhdf_getTagNames( mhdf_FileHandle file_handle, int* num_names_out, mhdf_Status* status );
1511 
1512 /** \brief Get the description of a specified tag.
1513  *
1514  * Get everything about a tag except the actual values.
1515  *
1516  *\param file_handle The file.
1517  *\param tag_name The name of the tag to retrieve the data for.
1518  *\param class_out The TSTT class of the tag data.
1519  *\param size_out Depends on value of class_out:
1520  * - mhdf_OPAQUE - size of opaque data in bytes
1521  * - mhdf_BITFIELD - number of bits
1522  * - if data is fixed-length array, length of array
1523  * - if data is single value, 1
1524  * - if data is a variable-length array, -1
1525  *\param tstt_storage_out The value of the TSTT enum for storage (dense, sparse, etc.)
1526  *\param have_default_out Non-zero if file contains a default value for the tag.
1527  * Length of default value if variable-lenth tag.
1528  *\param have_global_out Non-zero if the file contains a global/mesh value for the tag.
1529  *\param have_sparse_out Non-zero if the file contains a sparse data table for this tag.
1530  */
1531 void mhdf_getTagInfo( mhdf_FileHandle file_handle,
1532  const char* tag_name,
1533  enum mhdf_TagDataType* class_out,
1534  int* size_out,
1535  int* tstt_storage_out,
1536  int* have_default_out,
1537  int* have_global_out,
1538  int* have_sparse_out,
1539  mhdf_Status* status );
1540 
1541 /** \brief Get the default and global values of the tag.
1542  *
1543  *\param file_handle The file.
1544  *\param tag_name The tag name.
1545  *\param output_data_type The HDF5 type for the memory into which the
1546  * tag data is to be written. If zero, then
1547  * the value(s) will be read as opaque data.
1548  *\param default_value Memory location at which to write the default
1549  * value of the tag.
1550  *\param global_value If the tag has a global value, the memory location
1551  * at which to write that value.
1552  *\param status Passed back status of API call.
1553  */
1554 void mhdf_getTagValues( mhdf_FileHandle file_handle,
1555  const char* tag_name,
1556  hid_t output_data_type,
1557  void* default_value,
1558  void* global_value,
1559  mhdf_Status* status );
1560 
1561 /** \brief Check if the file contains dense tag data for the specified tag and element group.
1562  *
1563  * Check if there is dense tag data for a given element type for the specified
1564  * tag.
1565  *
1566  *\param file_handle The file.
1567  *\param tag_name The tag.
1568  *\param elem_group The element group handle, or the return value of
1569  * \ref mhdf_node_type_handle or \ref mhdf_set_type_handle
1570  * for nodes or sets respectively.
1571  *\param status Passed back status of API call.
1572  *\return Non-zero if file contains specified data. Zero otherwise.
1573  */
1574 int mhdf_haveDenseTag( mhdf_FileHandle file_handle, const char* tag_name, const char* elem_group, mhdf_Status* status );
1575 
1576 /** \brief Create an object to hold dense tag values for a given element group.
1577  *
1578  *\param file_handle The file.
1579  *\param tag_name The tag.
1580  *\param elem_group The element group handle, or the return value of
1581  * \ref mhdf_node_type_handle or \ref mhdf_set_type_handle
1582  * for nodes or sets respectively.
1583  *\param num_values The number of tag values to be written. Must be
1584  * The same as the number of elements in the group.
1585  * Specified here to allow tag values to be written
1586  * before node coordinates, element connectivity or meshsets.
1587  *\param status Passed back status of API call.
1588  *\return Handle to data object in file.
1589  */
1590 hid_t mhdf_createDenseTagData( mhdf_FileHandle file_handle,
1591  const char* tag_name,
1592  const char* elem_group,
1593  long num_values,
1594  mhdf_Status* status );
1595 
1596 /** \brief Open the object containing dense tag values for a given element group.
1597  *
1598  *\param file_handle The file.
1599  *\param tag_name The tag.
1600  *\param elem_group The element group handle, or the return value of
1601  * \ref mhdf_node_type_handle or \ref mhdf_set_type_handle
1602  * for nodes or sets respectively.
1603  *\param num_values_out The number of tag values to be written. Must be
1604  * The same as the number of elements in the group.
1605  *\param status Passed back status of API call.
1606  *\return Handle to data object in file.
1607  */
1608 hid_t mhdf_openDenseTagData( mhdf_FileHandle file_handle,
1609  const char* tag_name,
1610  const char* elem_group,
1611  long* num_values_out,
1612  mhdf_Status* status );
1613 
1614 /** \brief Create file objects to store sparse tag data
1615  *
1616  * Create the file objects to store all sparse data for a given tag in. The
1617  * sparse data is stored in a pair of objects. The first is a vector of
1618  * global IDs. The second is a vector of tag values for each entity specified
1619  * in the list of global IDs.
1620  *
1621  *\param file_handle The file.
1622  *\param tag_name The tag.
1623  *\param num_values The number of tag values to be written.
1624  *\param entities_and_values_out The handles to the file objects.
1625  * The first is the vector of global IDs. The second
1626  * is the list of corresponding tag values.
1627  *\param status Passed back status of API call.
1628  */
1629 void mhdf_createSparseTagData( mhdf_FileHandle file_handle,
1630  const char* tag_name,
1631  long num_values,
1632  hid_t entities_and_values_out[2],
1633  mhdf_Status* status );
1634 
1635 /** \brief Create file objects to store (sparse) variable-length tag data
1636  *
1637  * Create the file objects to store all sparse data for a given tag in. The
1638  * sparse data is stored in a pair of objects. The first is a vector of
1639  * global IDs. The second is a vector of tag values for each entity specified
1640  * in the list of global IDs.
1641  *
1642  *\param file_handle The file.
1643  *\param tag_name The tag.
1644  *\param num_entities The number of entities for which tag values are to be stored
1645  *\param num_values The total number of scalar values to be written (the
1646  * total number of bytes of data for all tags for opaque
1647  * data.)
1648  *\param entities_and_values_out The handles to the file objects.
1649  * The first is the vector of global IDs. The second
1650  * is the list of corresponding tag values. The third
1651  * is the handle to the index table.
1652  *\param status Passed back status of API call.
1653  */
1654 void mhdf_createVarLenTagData( mhdf_FileHandle file_handle,
1655  const char* tag_name,
1656  long num_entities,
1657  long num_values,
1658  hid_t entities_and_values_out[3],
1659  mhdf_Status* status );
1660 
1661 /** \brief Create file objects to read sparse tag data
1662  *
1663  * Open the file objects containing all sparse data for a given tag in. The
1664  * sparse data is stored in a pair of objects. The first is a vector of
1665  * global IDs. The second is a vector of tag values for each entity specified
1666  * in the list of global IDs. For variable-length tags, a third table
1667  * containing end offsets for each tag value is returned in the third
1668  * position of the output hid_t array (see mhdf_readSparseTagIndices.)
1669  *
1670  *\param file_handle The file.
1671  *\param tag_name The tag.
1672  *\param num_entity_out The number of entities for which there are tag values.
1673  *\param num_values_out The number of data values. For fixed-length tags,
1674  * this is the same as num_entity_out. For
1675  * variable-length tags, it is the total number of
1676  * values in the data table.
1677  *\param entities_and_values_out The handles to the pair of file objects.
1678  * The first is the vector of global IDs. The second
1679  * is the list of corresponding tag values. The third
1680  * is the handle to the index table, iff the tag is
1681  * variable-length. If the tag is fixed-length, this
1682  * value is not set.
1683  *\param status Passed back status of API call.
1684  */
1685 void mhdf_openSparseTagData( mhdf_FileHandle file_handle,
1686  const char* tag_name,
1687  long* num_entity_out,
1688  long* num_values_out,
1689  hid_t entities_and_values_out[3],
1690  mhdf_Status* status );
1691 
1692 /** \brief Write Global ID list for sparse tag data
1693  *
1694  *\param id_handle The first handle passed back from either
1695  * \ref mhdf_createSparseTagData or
1696  * \ref mhdf_openSparseTagData.
1697  *\param offset The offset at which to begin writing.
1698  *\param count The number of global IDs to write.
1699  *\param hdf_integer_type The type of the integer data in <code>id_list</code>.
1700  * Typically <code>H5T_NATIVE_INT</code> or
1701  * <code>N5T_NATIVE_LONG</code> as defined in <i>H5Tpublic.h</i>.
1702  * The HDF class of this type object <em>must</em> be H5T_INTEGER
1703  *\param id_list The list of global IDs to write.
1704  *\param status Passed back status of API call.
1705  */
1706 void mhdf_writeSparseTagEntities( hid_t id_handle,
1707  long offset,
1708  long count,
1709  hid_t hdf_integer_type,
1710  const void* id_list,
1711  mhdf_Status* status );
1712 void mhdf_writeSparseTagEntitiesWithOpt( hid_t id_handle,
1713  long offset,
1714  long count,
1715  hid_t hdf_integer_type,
1716  const void* id_list,
1717  hid_t write_prop,
1718  mhdf_Status* status );
1719 
1720 /** \brief Write tag values
1721  *
1722  *\param value_handle The second handle passed back from either
1723  * \ref mhdf_createSparseTagData or
1724  * \ref mhdf_openSparseTagData; or the handle
1725  * returned by \ref mhdf_createDenseTagData or
1726  * \ref mhdf_openDenseTagData.
1727  *\param offset The offset at which to begin writing.
1728  *\param count The number of tag values to write.
1729  *\param hdf_tag_data_type The type of the data in memory.
1730  * It must be possible for the HDF library to convert
1731  * between this type and the type the tag data is stored
1732  * as.
1733  *\param tag_data The list of tag values to write.
1734  *\param status Passed back status of API call.
1735  */
1736 void mhdf_writeTagValues( hid_t value_handle,
1737  long offset,
1738  long count,
1739  hid_t hdf_tag_data_type,
1740  const void* tag_data,
1741  mhdf_Status* status );
1742 void mhdf_writeTagValuesWithOpt( hid_t value_handle,
1743  long offset,
1744  long count,
1745  hid_t hdf_tag_data_type,
1746  const void* tag_data,
1747  hid_t write_prop,
1748  mhdf_Status* status );
1749 
1750 /**\brief Write sparse tag end indices for variable-length tag data
1751  *
1752  * Write sparse tag end indices for variable-length tag data.
1753  * Each value in the list is the *last* index (zero-based) into the tag
1754  * data for the corresponding entity.
1755  *
1756  *\param tag_handle handle to the data object to write to.
1757  *\param offset The offset into the table at which to begin writting
1758  *\param count The number of values to write.
1759  *\param hdf_integer_type The type of the values pointed to by end_indices
1760  * (must be an integer type).
1761  *\param end_indices The values to store in the table.
1762  *\param status Output: API result.
1763  */
1764 void mhdf_writeSparseTagIndices( hid_t tag_handle,
1765  long offset,
1766  long count,
1767  hid_t hdf_integer_type,
1768  const void* end_indices,
1769  mhdf_Status* status );
1770 void mhdf_writeSparseTagIndicesWithOpt( hid_t tag_handle,
1771  long offset,
1772  long count,
1773  hid_t hdf_integer_type,
1774  const void* end_indices,
1775  hid_t write_prop,
1776  mhdf_Status* status );
1777 
1778 /** \brief Read Global ID list for sparse tag data
1779  *
1780  *\param id_handle The first handle passed back from either
1781  * \ref mhdf_createSparseTagData or
1782  * \ref mhdf_openSparseTagData.
1783  *\param offset The offset at which to begin reading.
1784  *\param count The number of global IDs to read.
1785  *\param hdf_integer_type The type of the integer data in <code>id_list</code>.
1786  * Typically <code>H5T_NATIVE_INT</code> or
1787  * <code>N5T_NATIVE_LONG</code> as defined in <i>H5Tpublic.h</i>.
1788  * The HDF class of this type object <em>must</em> be H5T_INTEGER
1789  *\param id_list The memory location at which to store the global IDs.
1790  *\param status Passed back status of API call.
1791  */
1792 void mhdf_readSparseTagEntities( hid_t id_handle,
1793  long offset,
1794  long count,
1795  hid_t hdf_integer_type,
1796  void* id_list,
1797  mhdf_Status* status );
1798 void mhdf_readSparseTagEntitiesWithOpt( hid_t id_handle,
1799  long offset,
1800  long count,
1801  hid_t hdf_integer_type,
1802  void* id_list,
1803  hid_t read_prop,
1804  mhdf_Status* status );
1805 
1806 /** \brief Read tag values
1807  *
1808  *\param value_handle The second handle passed back from either
1809  * \ref mhdf_createSparseTagData or
1810  * \ref mhdf_openSparseTagData; or the handle
1811  * returned by \ref mhdf_createDenseTagData or
1812  * \ref mhdf_openDenseTagData.
1813  *\param offset The offset at which to begin reading.
1814  *\param count The number of tag values to read.
1815  *\param hdf_type The type of the data in memory. If this is specified,
1816  * it must be possible for the HDF library to convert
1817  * between this type and the type the tag data is stored
1818  * as. If zero, the values will be read as opaque data.
1819  *\param memory Memory location at which to store tag values.
1820  *\param status Passed back status of API call.
1821  */
1822 void mhdf_readTagValues( hid_t value_handle,
1823  long offset,
1824  long count,
1825  hid_t hdf_type,
1826  void* memory,
1827  mhdf_Status* status );
1828 void mhdf_readTagValuesWithOpt( hid_t value_handle,
1829  long offset,
1830  long count,
1831  hid_t hdf_type,
1832  void* memory,
1833  hid_t read_prop,
1834  mhdf_Status* status );
1835 
1836 /**\brief Read sparse tag end indices for variable-length tag data
1837  *
1838  * Read sparse tag end indices for variable-length tag data.
1839  * Each value in the list is the *last* index (zero-based) into the tag
1840  * data for the corresponding entity.
1841  *
1842  *\param tag_handle handle to the data object to read from.
1843  *\param offset The offset into the table at which to begin reading
1844  *\param count The number of values to read.
1845  *\param hdf_integer_type The type of the values pointed to by end_indices
1846  * (must be an integer type).
1847  *\param end_indices Memory in which to store the data read from the table.
1848  *\param status Output: API result.
1849  */
1850 void mhdf_readSparseTagIndices( hid_t tag_handle,
1851  long offset,
1852  long count,
1853  hid_t hdf_integer_type,
1854  void* end_indices,
1855  mhdf_Status* status );
1856 void mhdf_readSparseTagIndicesWithOpt( hid_t tag_handle,
1857  long offset,
1858  long count,
1859  hid_t hdf_integer_type,
1860  void* end_indices,
1861  hid_t read_prop,
1862  mhdf_Status* status );
1863 
1864 
1865 #ifdef __cplusplus
1866 } /* extern "C" */
1867 #endif
1868 
1869 #endif