summaryrefslogtreecommitdiffstats
path: root/hl/src/H5LTpublic.h
blob: 2f87944adf1b3958d570cfc45cbbeebae550391a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * Copyright by The HDF Group.                                               *
 * Copyright by the Board of Trustees of the University of Illinois.         *
 * All rights reserved.                                                      *
 *                                                                           *
 * This file is part of HDF5.  The full HDF5 copyright notice, including     *
 * terms governing use, modification, and redistribution, is contained in    *
 * the COPYING file, which can be found at the root of the source code       *
 * distribution tree, or in https://www.hdfgroup.org/licenses.               *
 * If you do not have access to either file, you may request a copy from     *
 * help@hdfgroup.org.                                                        *
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

#ifndef H5LTpublic_H
#define H5LTpublic_H

/* Flag definitions for H5LTopen_file_image() */
#define H5LT_FILE_IMAGE_OPEN_RW   0x0001 /* Open image for read-write */
#define H5LT_FILE_IMAGE_DONT_COPY 0x0002 /* The HDF5 lib won't copy   */
/* user supplied image buffer. The same image is open with the core driver.  */
#define H5LT_FILE_IMAGE_DONT_RELEASE 0x0004 /* The HDF5 lib won't        */
/* deallocate user supplied image buffer. The user application is responsible */
/* for doing so.                                                             */
#define H5LT_FILE_IMAGE_ALL 0x0007

typedef enum H5LT_lang_t {
    H5LT_LANG_ERR = -1, /*this is the first*/
    H5LT_DDL      = 0,  /*for DDL*/
    H5LT_C        = 1,  /*for C*/
    H5LT_FORTRAN  = 2,  /*for Fortran*/
    H5LT_NO_LANG  = 3   /*this is the last*/
} H5LT_lang_t;

#ifdef __cplusplus
extern "C" {
#endif

/**\defgroup H5LT Lite
 * <em>Functions used to simplify creating and manipulating datasets,
 * attributes and other features (H5LT, H5LD)</em>
 *
 * The HDF5 Lite API consists of higher-level functions which do
 * more operations per call than the basic HDF5 interface.
 * The purpose is to wrap intuitive functions around certain sets
 * of features in the existing APIs.
 * It has the following sets of functions listed below.
 *
 * \note \Bold{Programming hints:}
 * \note To use any of these functions or subroutines,
 *       you must first include the relevant include file (C) or
 *       module (Fortran) in your application.
 * \note The following line includes the HDF5 Lite package, H5LT,
 *       in C applications:
 *       \code #include "hdf5_hl.h" \endcode
 * \note This line includes the H5LT module in Fortran applications:
 *       \code use h5lt \endcode
 *
 * - Dataset Functions
 *   - Make dataset functions
 *      - \ref H5LTmake_dataset
 *      - \ref H5LTmake_dataset_char
 *      - \ref H5LTmake_dataset_short
 *      - \ref H5LTmake_dataset_int
 *      - \ref H5LTmake_dataset_long
 *      - \ref H5LTmake_dataset_float
 *      - \ref H5LTmake_dataset_double
 *      - \ref H5LTmake_dataset_string
 *      .
 *   - Read dataset functions
 *      - \ref H5LTread_dataset
 *      - \ref H5LTread_dataset_char
 *      - \ref H5LTread_dataset_short
 *      - \ref H5LTread_dataset_int
 *      - \ref H5LTread_dataset_long
 *      - \ref H5LTread_dataset_float
 *      - \ref H5LTread_dataset_double
 *      - \ref H5LTread_dataset_string
 *      .
 *   - Query dataset functions
 *      - \ref H5LTfind_dataset
 *      - \ref H5LTget_dataset_ndims
 *      - \ref H5LTget_dataset_info
 *      .
 *   - Dataset watch functions
 *      - \ref H5LDget_dset_dims
 *      - \ref H5LDget_dset_elmts
 *      - \ref H5LDget_dset_type_size
 *      .
 *   .
 * - Attribute Functions
 *   - Set attribute functions
 *      - \ref H5LTset_attribute_string
 *      - \ref H5LTset_attribute_char
 *      - \ref H5LTset_attribute_uchar
 *      - \ref H5LTset_attribute_short
 *      - \ref H5LTset_attribute_ushort
 *      - \ref H5LTset_attribute_int
 *      - \ref H5LTset_attribute_uint
 *      - \ref H5LTset_attribute_long
 *      - \ref H5LTset_attribute_long_long
 *      - \ref H5LTset_attribute_ulong
 *      - \ref H5LTset_attribute_ullong
 *      - \ref H5LTset_attribute_float
 *      - \ref H5LTset_attribute_double
 *      - \ref H5LTset_attribute_f (fortran ONLY)
 *      .
 *   - Get attribute functions
 *      - \ref H5LTget_attribute
 *      - \ref H5LTget_attribute_string
 *      - \ref H5LTget_attribute_char
 *      - \ref H5LTget_attribute_uchar
 *      - \ref H5LTget_attribute_short
 *      - \ref H5LTget_attribute_ushort
 *      - \ref H5LTget_attribute_int
 *      - \ref H5LTget_attribute_uint
 *      - \ref H5LTget_attribute_long
 *      - \ref H5LTget_attribute_long_long
 *      - \ref H5LTget_attribute_ulong
 *      - \ref H5LTget_attribute_ullong
 *      - \ref H5LTget_attribute_float
 *      - \ref H5LTget_attribute_double
 *      .
 *   - Query attribute functions
 *      - \ref H5LTfind_attribute
 *      - \ref H5LTget_attribute_info
 *      - \ref H5LTget_attribute_ndims
 *      .
 *   .
 * - Datatype Functions
 *   - Datatype translation functions
 *      - \ref H5LTtext_to_dtype
 *      - \ref H5LTdtype_to_text
 *      .
 *   .
 * - File image function
 *   - Open file image function
 *      - \ref H5LTopen_file_image
 *      .
 *   .
 * - Path and object function
 *   - Query path and object function
 *      - \ref H5LTpath_valid
 *      .
 *   .
 * .
 */

/*-------------------------------------------------------------------------
 *
 * Make dataset functions
 *
 *-------------------------------------------------------------------------
 */

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Creates and writes a dataset of a type \p type_id.
 *
 * \fg_loc_id
 * \param[in] dset_name The Name of the dataset to create
 * \param[in] rank      Number of dimensions of dataspace
 * \param[in] dims      An array of the size of each dimension
 * \param[in] type_id   Identifier of the datatype to use when creating the dataset
 * \param[in] buffer    Buffer with data to be written to the dataset
 *
 * \return \herr_t
 *
 * \details H5LTmake_dataset() creates and writes a dataset named
 *          \p dset_name attached to the object specified by the
 *          identifier \p loc_id.
 *
 *          The parameter \p type_id can be any valid HDF5 Prdefined \ref PDTNAT;
 *          For example, setting \p type_id to #H5T_NATIVE_INT will result in a dataset
 *          of <em>signed \e integer datatype</em>.
 *
 * \version 1.10.0 Fortran 2003 subroutine added to accept a C address of the data buffer.
 * \version 1.8.7 Fortran subroutine modified in this release to accommodate arrays
 *                with more than three dimensions.
 *
 */
H5_HLDLL herr_t H5LTmake_dataset(hid_t loc_id, const char *dset_name, int rank, const hsize_t *dims,
                                 hid_t type_id, const void *buffer);

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Creates and writes a dataset.
 *
 * \fg_loc_id
 * \param[in] dset_name The Name of the dataset to create
 * \param[in] rank      Number of dimensions of dataspace
 * \param[in] dims      An array of the size of each dimension
 * \param[in] buffer    Buffer with data to be written to the dataset
 *
 * \return \herr_t
 *
 * \details H5LTmake_dataset_char() creates and writes a dataset
 *          named \p dset_name attached to the object specified by
 *          the identifier \p loc_id.
 *
 *          The dataset’s datatype will be \e character, #H5T_NATIVE_CHAR.
 *
 */
H5_HLDLL herr_t H5LTmake_dataset_char(hid_t loc_id, const char *dset_name, int rank, const hsize_t *dims,
                                      const char *buffer);

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Creates and writes a dataset.
 *
 * \fg_loc_id
 * \param[in] dset_name The Name of the dataset to create
 * \param[in] rank      Number of dimensions of dataspace
 * \param[in] dims      An array of the size of each dimension
 * \param[in] buffer    Buffer with data to be written to the dataset
 *
 * \return \herr_t
 *
 * \details H5LTmake_dataset_short() creates and writes a dataset
 *          named \p dset_name attached to the object specified by
 *          the identifier \p loc_id.
 *
 *          The dataset’s datatype will be <em>short signed integer</em>,
 *          #H5T_NATIVE_SHORT.
 *
 */
H5_HLDLL herr_t H5LTmake_dataset_short(hid_t loc_id, const char *dset_name, int rank, const hsize_t *dims,
                                       const short *buffer);

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Creates and writes a dataset.
 *
 * \fg_loc_id
 * \param[in] dset_name The Name of the dataset to create
 * \param[in] rank      Number of dimensions of dataspace
 * \param[in] dims      An array of the size of each dimension
 * \param[in] buffer    Buffer with data to be written to the dataset
 *
 * \return \herr_t
 *
 * \details H5LTmake_dataset_int() creates and writes a dataset
 *          named \p dset_name attached to the object specified by
 *          the identifier \p loc_id.
 *
 *          The dataset’s datatype will be <em>native signed integer</em>,
 *          #H5T_NATIVE_INT.
 *
 * \version Fortran subroutine modified in this release to accommodate
 *          arrays with more than three dimensions.
 *
 */
H5_HLDLL herr_t H5LTmake_dataset_int(hid_t loc_id, const char *dset_name, int rank, const hsize_t *dims,
                                     const int *buffer);

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Creates and writes a dataset.
 *
 * \fg_loc_id
 * \param[in] dset_name The Name of the dataset to create
 * \param[in] rank      Number of dimensions of dataspace
 * \param[in] dims      An array of the size of each dimension
 * \param[in] buffer    Buffer with data to be written to the dataset
 *
 * \return \herr_t
 *
 * \details H5LTmake_dataset_long() creates and writes a dataset
 *          named \p dset_name attached to the object specified by
 *          the identifier \p loc_id.
 *
 *          The dataset’s datatype will be <em>long signed integer</em>,
 *          #H5T_NATIVE_LONG.
 *
 */
H5_HLDLL herr_t H5LTmake_dataset_long(hid_t loc_id, const char *dset_name, int rank, const hsize_t *dims,
                                      const long *buffer);

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Creates and writes a dataset.
 *
 * \fg_loc_id
 * \param[in] dset_name The Name of the dataset to create
 * \param[in] rank      Number of dimensions of dataspace
 * \param[in] dims      An array of the size of each dimension
 * \param[in] buffer    Buffer with data to be written to the dataset
 *
 * \return \herr_t
 *
 * \details H5LTmake_dataset_float() creates and writes a dataset
 *          named \p dset_name attached to the object specified by
 *          the identifier \p loc_id.
 *
 *          The dataset’s datatype will be <em>native floating point</em>,
 *          #H5T_NATIVE_FLOAT.
 *
 * \version 1.8.7 Fortran subroutine modified in this release to accommodate
 *                arrays with more than three dimensions.
 *
 */
H5_HLDLL herr_t H5LTmake_dataset_float(hid_t loc_id, const char *dset_name, int rank, const hsize_t *dims,
                                       const float *buffer);

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Creates and writes a dataset.
 *
 * \fg_loc_id
 * \param[in] dset_name The Name of the dataset to create
 * \param[in] rank      Number of dimensions of dataspace
 * \param[in] dims      An array of the size of each dimension
 * \param[in] buffer    Buffer with data to be written to the dataset
 *
 * \return \herr_t
 *
 * \details H5LTmake_dataset_double() creates and writes a dataset
 *          named \p dset_name attached to the object specified by
 *          the identifier \p loc_id.
 *
 *          The dataset’s datatype will be
 *          <em>native floating-point double</em>, #H5T_NATIVE_DOUBLE.
 *
 * \version 1.8.7 Fortran subroutine modified in this release to accommodate
 *                arrays with more than three dimensions.
 *
 */
H5_HLDLL herr_t H5LTmake_dataset_double(hid_t loc_id, const char *dset_name, int rank, const hsize_t *dims,
                                        const double *buffer);

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Creates and writes a dataset with string datatype.
 *
 * \fg_loc_id
 * \param[in] dset_name The name of the dataset to create
 * \param[in] buf       Buffer with data to be written to the dataset
 *
 * \return \herr_t
 *
 * \details H5LTmake_dataset_string() creates and writes a dataset
 *          named \p dset_name attached to the object specified by
 *          the identifier \p loc_id.
 *
 *          The dataset’s datatype will be <em>C string</em>, #H5T_C_S1.
 *
 */
H5_HLDLL herr_t H5LTmake_dataset_string(hid_t loc_id, const char *dset_name, const char *buf);

/*-------------------------------------------------------------------------
 *
 * Read dataset functions
 *
 *-------------------------------------------------------------------------
 */

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Reads a dataset from disk.
 *
 * \fg_loc_id
 * \param[in] dset_name The name of the dataset to read
 * \param[in] type_id   Identifier of the datatype to use when reading
 *                      the dataset
 * \param[out] buffer   Buffer with data
 *
 * \return \herr_t
 *
 * \details H5LTread_dataset() reads a dataset named \p dset_name
 *          attached to the object specified by the identifier \p loc_id.
 *
 * \version 1.10.0  Fortran 2003 subroutine added to accept a C
 *                  address of the data buffer.
 * \version 1.8.7   Fortran subroutine modified in this release to
 *                  accommodate arrays with more than three dimensions.
 *
 */
H5_HLDLL herr_t H5LTread_dataset(hid_t loc_id, const char *dset_name, hid_t type_id, void *buffer);

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Reads a dataset from disk.
 *
 * \fg_loc_id
 * \param[in] dset_name The name of the dataset to read
 * \param[out] buffer   Buffer with data
 *
 * \return \herr_t
 *
 * \details H5LTread_dataset_char() reads a dataset named \p dset_name
 *          attached to the object specified by the identifier \p loc_id.
 *          The HDF5 datatype is #H5T_NATIVE_CHAR.
 *
 */
H5_HLDLL herr_t H5LTread_dataset_char(hid_t loc_id, const char *dset_name, char *buffer);

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Reads a dataset from disk.
 *
 * \fg_loc_id
 * \param[in] dset_name The name of the dataset to read
 * \param[out] buffer   Buffer with data
 *
 * \return \herr_t
 *
 * \details H5LTread_dataset_short() reads a dataset named \p dset_name
 *          attached to the object specified by the identifier \p loc_id.
 *          The HDF5 datatype is #H5T_NATIVE_SHORT.
 *
 */
H5_HLDLL herr_t H5LTread_dataset_short(hid_t loc_id, const char *dset_name, short *buffer);

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Reads a dataset from disk.
 *
 * \fg_loc_id
 * \param[in] dset_name The name of the dataset to read
 * \param[out] buffer   Buffer with data
 *
 * \return \herr_t
 *
 * \details H5LTread_dataset_int() reads a dataset named \p dset_name
 *          attached to the object specified by the identifier \p loc_id.
 *          The HDF5 datatype is #H5T_NATIVE_INT.
 *
 * \version 1.8.7 Fortran subroutine modified in this release to
 *                accommodate arrays with more than three dimensions.
 *
 */
H5_HLDLL herr_t H5LTread_dataset_int(hid_t loc_id, const char *dset_name, int *buffer);

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Reads a dataset from disk.
 *
 * \fg_loc_id
 * \param[in] dset_name The name of the dataset to read
 * \param[out] buffer   Buffer with data
 *
 * \return \herr_t
 *
 * \details H5LTread_dataset_long() reads a dataset named \p dset_name
 *          attached to the object specified by the identifier \p loc_id.
 *          The HDF5 datatype is #H5T_NATIVE_LONG.
 *
 */
H5_HLDLL herr_t H5LTread_dataset_long(hid_t loc_id, const char *dset_name, long *buffer);

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Reads a dataset from disk.
 *
 * \fg_loc_id
 * \param[in] dset_name The name of the dataset to read
 * \param[out] buffer   Buffer with data
 *
 * \return \herr_t
 *
 * \details H5LTread_dataset_float() reads a dataset named \p dset_name
 *          attached to the object specified by the identifier \p loc_id.
 *          The HDF5 datatype is #H5T_NATIVE_FLOAT.
 *
 * \version 1.8.7 Fortran subroutine modified in this release to
 *                accommodate arrays with more than three dimensions.
 */
H5_HLDLL herr_t H5LTread_dataset_float(hid_t loc_id, const char *dset_name, float *buffer);

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Reads a dataset from disk.
 *
 * \fg_loc_id
 * \param[in] dset_name The name of the dataset to read
 * \param[out] buffer   Buffer with data
 *
 * \return \herr_t
 *
 * \details H5LTread_dataset_double() reads a dataset named \p dset_name
 *          attached to the object specified by the identifier \p loc_id.
 *          The HDF5 datatype is #H5T_NATIVE_DOUBLE.
 *
 * \version 1.8.7 Fortran subroutine modified in this release to
 *                accommodate arrays with more than three dimensions.
 */
H5_HLDLL herr_t H5LTread_dataset_double(hid_t loc_id, const char *dset_name, double *buffer);

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Reads a dataset from disk.
 *
 * \fg_loc_id
 * \param[in] dset_name The name of the dataset to read
 * \param[out] buf      Buffer with data
 *
 * \return \herr_t
 *
 * \details H5LTread_dataset_string() reads a dataset named \p dset_name
 *          attached to the object specified by the identifier \p loc_id.
 *          The HDF5 datatype is #H5T_C_S1.
 *
 */
H5_HLDLL herr_t H5LTread_dataset_string(hid_t loc_id, const char *dset_name, char *buf);

/*-------------------------------------------------------------------------
 *
 * Query dataset functions
 *
 *-------------------------------------------------------------------------
 */

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Gets the dimensionality of a dataset
 *
 * \param[in]   loc_id      Identifier of the object to
 *                          locate the dataset within
 * \param[in]   dset_name   The dataset name
 * \param[out]  rank        The dimensionality of the dataset
 *
 * \return \herr_t
 *
 * \details H5LTget_dataset_ndims() gets the dimensionality of a dataset
 *          named \p dset_name exists attached to the object \p loc_id.
 *
 */
H5_HLDLL herr_t H5LTget_dataset_ndims(hid_t loc_id, const char *dset_name, int *rank);

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Retrieves information about a dataset
 *
 * \param[in]   loc_id      Identifier of the object to locate
 *                          the dataset within
 * \param[in]   dset_name   The dataset name
 * \param[out]  dims        The dimensions of the dataset
 * \param[out]  type_class  The class identifier. #H5T_class_t is defined in
 *                          H5Tpublic.h. See H5Tget_class() for a list
 *                          of class types.
 * \param[out]  type_size   The size of the datatype in bytes
 *
 * \return \herr_t
 *
 * \details H5LTget_dataset_info() retrieves information about a dataset
 *          named \p dset_name attached to the object \p loc_id.
 *
 */
H5_HLDLL herr_t H5LTget_dataset_info(hid_t loc_id, const char *dset_name, hsize_t *dims,
                                     H5T_class_t *type_class, size_t *type_size);

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Determines whether a dataset exists.
 *
 * \param[in]   loc_id  Identifier of the group containing the dataset
 * \param[in]   name    Dataset name
 *
 * \return \htri_t
 *
 * \details H5LTfind_dataset() determines whether a dataset named
 *          \p name exists in the group specified by \p loc_id.
 *
 *          \p loc_id must be a group identifier and \p name must
 *          specify a dataset that is a member of that group.
 *
 */
H5_HLDLL herr_t H5LTfind_dataset(hid_t loc_id, const char *name);

/*-------------------------------------------------------------------------
 *
 * Set attribute functions
 *
 *-------------------------------------------------------------------------
 */

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Creates and writes a string attribute.
 *
 * \param[in]   loc_id      Identifier of the object (dataset or group)
 *                          to create the attribute within
 * \param[in]   obj_name    The name of the object to attach the attribute
 * \param[in]   attr_name   The attribute name
 * \param[in]   attr_data   Buffer with data to be written to the attribute
 *
 * \return \herr_t
 *
 * \details H5LTset_attribute_string() creates and writes a string attribute
 *          named \p attr_name and attaches it to the object specified by
 *          the name \p obj_name. If the attribute already exists,
 *          it is overwritten.
 *
 */
H5_HLDLL herr_t H5LTset_attribute_string(hid_t loc_id, const char *obj_name, const char *attr_name,
                                         const char *attr_data);

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Creates and writes an attribute.
 *
 * \param[in]   loc_id      Identifier of the object (dataset or group)
 *                          to create the attribute within
 * \param[in]   obj_name    The name of the object to attach the attribute
 * \param[in]   attr_name   The attribute name
 * \param[in]   buffer      Buffer with data to be written to the attribute
 * \param[in]   size        The size of the 1D array (one in the case of a
 *                          scalar attribute). This value is used by
 *                          H5Screate_simple() to create the dataspace.
 *
 * \return \herr_t
 *
 * \details H5LTset_attribute_char() creates and writes a numerical attribute
 *          named \p attr_name and attaches it to the object specified by the
 *          name \p obj_name. The attribute has a dimensionality of 1.
 *          The HDF5 datatype of the attribute is #H5T_NATIVE_CHAR.
 *
 */
H5_HLDLL herr_t H5LTset_attribute_char(hid_t loc_id, const char *obj_name, const char *attr_name,
                                       const char *buffer, size_t size);

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Creates and writes an attribute.
 *
 * \param[in]   loc_id      Identifier of the object (dataset or group)
 *                          to create the attribute within
 * \param[in]   obj_name    The name of the object to attach the attribute
 * \param[in]   attr_name   The attribute name
 * \param[in]   buffer      Buffer with data to be written to the attribute
 * \param[in]   size        The size of the 1D array (one in the case of a
 *                          scalar attribute). This value is used by
 *                          H5Screate_simple() to create the dataspace.
 *
 * \return \herr_t
 *
 * \details H5LTset_attribute_uchar() creates and writes a numerical attribute
 *          named \p attr_name and attaches it to the object specified by the
 *          name \p obj_name. The attribute has a dimensionality of 1.
 *          The HDF5 datatype of the attribute is #H5T_NATIVE_UCHAR.
 *
 */
H5_HLDLL herr_t H5LTset_attribute_uchar(hid_t loc_id, const char *obj_name, const char *attr_name,
                                        const unsigned char *buffer, size_t size);

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Creates and writes an attribute.
 *
 * \param[in]   loc_id      Identifier of the object (dataset or group)
 *                          to create the attribute within
 * \param[in]   obj_name    The name of the object to attach the attribute
 * \param[in]   attr_name   The attribute name
 * \param[in]   buffer      Buffer with data to be written to the attribute
 * \param[in]   size        The size of the 1D array (one in the case of a
 *                          scalar attribute). This value is used by
 *                          H5Screate_simple() to create the dataspace.
 *
 * \return \herr_t
 *
 * \details H5LTset_attribute_short() creates and writes a numerical attribute
 *          named \p attr_name and attaches it to the object specified by the
 *          name \p obj_name. The attribute has a dimensionality of 1.
 *          The HDF5 datatype of the attribute is #H5T_NATIVE_SHORT.
 *
 */
H5_HLDLL herr_t H5LTset_attribute_short(hid_t loc_id, const char *obj_name, const char *attr_name,
                                        const short *buffer, size_t size);

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Creates and writes an attribute.
 *
 * \param[in]   loc_id      Identifier of the object (dataset or group)
 *                          to create the attribute within
 * \param[in]   obj_name    The name of the object to attach the attribute
 * \param[in]   attr_name   The attribute name
 * \param[in]   buffer      Buffer with data to be written to the attribute
 * \param[in]   size        The size of the 1D array (one in the case of a
 *                          scalar attribute). This value is used by
 *                          H5Screate_simple() to create the dataspace.
 *
 * \return \herr_t
 *
 * \details H5LTset_attribute_ushort() creates and writes a numerical attribute
 *          named \p attr_name and attaches it to the object specified by the
 *          name \p obj_name. The attribute has a dimensionality of 1.
 *          The HDF5 datatype of the attribute is #H5T_NATIVE_USHORT.
 *
 */
H5_HLDLL herr_t H5LTset_attribute_ushort(hid_t loc_id, const char *obj_name, const char *attr_name,
                                         const unsigned short *buffer, size_t size);

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Creates and writes an attribute.
 *
 * \param[in]   loc_id      Identifier of the object (dataset or group)
 *                          to create the attribute within
 * \param[in]   obj_name    The name of the object to attach the attribute
 * \param[in]   attr_name   The attribute name
 * \param[in]   buffer      Buffer with data to be written to the attribute
 * \param[in]   size        The size of the 1D array (one in the case of a
 *                          scalar attribute). This value is used by
 *                          H5Screate_simple() to create the dataspace.
 *
 * \return \herr_t
 *
 * \details H5LTset_attribute_int() creates and writes a numerical integer
 *          attribute named \p attr_name and attaches it to the object
 *          specified by the name \p obj_name. The attribute has a
 *          dimensionality of 1.  The HDF5 datatype of the attribute
 *          is #H5T_NATIVE_INT.
 *
 */
H5_HLDLL herr_t H5LTset_attribute_int(hid_t loc_id, const char *obj_name, const char *attr_name,
                                      const int *buffer, size_t size);

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Creates and writes an attribute.
 *
 * \param[in]   loc_id      Identifier of the object (dataset or group)
 *                          to create the attribute within
 * \param[in]   obj_name    The name of the object to attach the attribute
 * \param[in]   attr_name   The attribute name
 * \param[in]   buffer      Buffer with data to be written to the attribute
 * \param[in]   size        The size of the 1D array (one in the case of a
 *                          scalar attribute). This value is used by
 *                          H5Screate_simple() to create the dataspace.
 *
 * \return \herr_t
 *
 * \details H5LTset_attribute_uint() creates and writes a numerical integer
 *          attribute named \p attr_name and attaches it to the object specified
 *          by the name \p obj_name. The attribute has a dimensionality of 1.
 *          The HDF5 datatype of the attribute is #H5T_NATIVE_UINT.
 *
 */
H5_HLDLL herr_t H5LTset_attribute_uint(hid_t loc_id, const char *obj_name, const char *attr_name,
                                       const unsigned int *buffer, size_t size);

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Creates and writes an attribute.
 *
 * \param[in]   loc_id      Identifier of the object (dataset or group)
 *                          to create the attribute within
 * \param[in]   obj_name    The name of the object to attach the attribute
 * \param[in]   attr_name   The attribute name
 * \param[in]   buffer      Buffer with data to be written to the attribute
 * \param[in]   size        The size of the 1D array (one in the case of a
 *                          scalar attribute). This value is used by
 *                          H5Screate_simple() to create the dataspace.
 *
 * \return \herr_t
 *
 * \details H5LTset_attribute_long() creates and writes a numerical
 *          attribute named \p attr_name and attaches it to the object
 *          specified by the name \p obj_name. The attribute has a
 *          dimensionality of 1.  The HDF5 datatype of the attribute
 *          is #H5T_NATIVE_LONG.
 *
 */
H5_HLDLL herr_t H5LTset_attribute_long(hid_t loc_id, const char *obj_name, const char *attr_name,
                                       const long *buffer, size_t size);

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Creates and writes an attribute.
 *
 * \param[in]   loc_id      Location of the object to which the attribute
 *                          is to be attached
 * \param[in]   obj_name    That object's name
 * \param[in]   attr_name   Attribute name
 * \param[in]   buffer      Attribute value
 * \param[in]   size        Attribute size
 *
 * \return \herr_t
 *
 * \details H5LTset_attribute_long_long() creates and writes a numerical
 *          attribute named \p attr_name and attaches it to the object
 *          specified by the name \p obj_name.
 *
 *          The attribute has a dimensionality of 1 and its HDF5 datatype
 *          is #H5T_NATIVE_LLONG.
 *
 */
H5_HLDLL herr_t H5LTset_attribute_long_long(hid_t loc_id, const char *obj_name, const char *attr_name,
                                            const long long *buffer, size_t size);

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Creates and writes an attribute.
 *
 * \param[in]   loc_id      Identifier of the object (dataset or group)
 *                          to create the attribute within
 * \param[in]   obj_name    The name of the object to attach the attribute
 * \param[in]   attr_name   The attribute name
 * \param[in]   buffer      Buffer with data to be written to the attribute
 * \param[in]   size        The size of the 1D array (one in the case of a
 *                          scalar attribute). This value is used by
 *                          H5Screate_simple() to create the dataspace.
 *
 * \return \herr_t
 *
 * \details H5LTset_attribute_ulong() creates and writes a numerical
 *          attribute named \p attr_name and attaches it to the object
 *          specified by the name \p obj_name. The attribute has a
 *          dimensionality of 1.  The HDF5 datatype of the attribute
 *          is #H5T_NATIVE_ULONG.
 *
 */
H5_HLDLL herr_t H5LTset_attribute_ulong(hid_t loc_id, const char *obj_name, const char *attr_name,
                                        const unsigned long *buffer, size_t size);

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Creates and writes an attribute.
 *
 * \param[in]   loc_id      Location of the object to which the attribute
 *                          is to be attached
 * \param[in]   obj_name    That object's name
 * \param[in]   attr_name   Attribute name
 * \param[in]   buffer      Attribute value
 * \param[in]   size        Attribute size
 *
 * \return \herr_t
 *
 * \details H5LTset_attribute_ullong() creates and writes a numerical
 *          attribute named \p attr_name and attaches it to the object
 *          specified by the name \p obj_name.
 *
 *          The attribute has a dimensionality of 1 and its HDF5 datatype
 *          is #H5T_NATIVE_ULLONG.
 *
 */
H5_HLDLL herr_t H5LTset_attribute_ullong(hid_t loc_id, const char *obj_name, const char *attr_name,
                                         const unsigned long long *buffer, size_t size);

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Creates and writes an attribute.
 *
 * \param[in]   loc_id      Identifier of the object (dataset or group)
 *                          to create the attribute within
 * \param[in]   obj_name    The name of the object to attach the attribute
 * \param[in]   attr_name   The attribute name
 * \param[in]   buffer      Buffer with data to be written to the attribute
 * \param[in]   size        The size of the 1D array (one in the case of a
 *                          scalar attribute). This value is used by
 *                          H5Screate_simple() to create the dataspace.
 *
 * \return \herr_t
 *
 * \details H5LTset_attribute_float() creates and writes a numerical
 *          floating point attribute named \p attr_name and attaches
 *          it to the object specified by the name \p obj_name.
 *          The attribute has a dimensionality of 1.  The HDF5 datatype
 *          of the attribute is #H5T_NATIVE_FLOAT.
 *
 */
H5_HLDLL herr_t H5LTset_attribute_float(hid_t loc_id, const char *obj_name, const char *attr_name,
                                        const float *buffer, size_t size);

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Creates and writes an attribute.
 *
 * \param[in]   loc_id      Identifier of the object (dataset or group)
 *                          to create the attribute within
 * \param[in]   obj_name    The name of the object to attach the attribute
 * \param[in]   attr_name   The attribute name
 * \param[in]   buffer      Buffer with data to be written to the attribute
 * \param[in]   size        The size of the 1D array (one in the case of a
 *                          scalar attribute). This value is used by
 *                          H5Screate_simple() to create the dataspace.
 *
 * \return \herr_t
 *
 * \details H5LTset_attribute_double() creates and writes a numerical
 *          attribute named \p attr_name and attaches
 *          it to the object specified by the name \p obj_name.
 *          The attribute has a dimensionality of 1.  The HDF5 datatype
 *          of the attribute is #H5T_NATIVE_DOUBLE.
 *
 */
H5_HLDLL herr_t H5LTset_attribute_double(hid_t loc_id, const char *obj_name, const char *attr_name,
                                         const double *buffer, size_t size);

/*-------------------------------------------------------------------------
 *
 * Get attribute functions
 *
 *-------------------------------------------------------------------------
 */

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Reads an attribute from disk.
 *
 * \param[in]   loc_id      Identifier of the object (dataset or group)
 *                          to read the attribute from
 * \param[in]   obj_name    The name of the object that the attribute is
 *                          attached to
 * \param[in]   attr_name   The attribute name
 * \param[in]   mem_type_id Identifier of the memory datatype
 * \param[out]  data        Buffer with data
 *
 * \return \herr_t
 *
 * \details H5LTget_attribute() reads an attribute named
 *          \p attr_name with the memory type \p mem_type_id.
 *
 */
H5_HLDLL herr_t H5LTget_attribute(hid_t loc_id, const char *obj_name, const char *attr_name,
                                  hid_t mem_type_id, void *data);

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Reads an attribute from disk.
 *
 * \param[in]   loc_id      Identifier of the object (dataset or group)
 *                          to read the attribute from
 * \param[in]   obj_name    The name of the object that the attribute is
 *                          attached to
 * \param[in]   attr_name   The attribute name
 * \param[out]  data        Buffer with data
 *
 * \return \herr_t
 *
 * \details H5LTget_attribute_string() reads an attribute named
 *          \p attr_name that is attached to the object specified
 *          by the name \p obj_name.  The datatype is a string.
 *
 * \version 1.8.9 The content of the buffer returned by the Fortran
 *                subroutine has changed in this release:\n
 *                If the returned buffer requires padding,
 *                h5ltget_attribute_string_f() now employs space
 *                padding; this buffer was previously returned with a C NULL terminator.
 *
 */
H5_HLDLL herr_t H5LTget_attribute_string(hid_t loc_id, const char *obj_name, const char *attr_name,
                                         char *data);

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Reads an attribute from disk.
 *
 * \param[in]   loc_id      Identifier of the object (dataset or group)
 *                          to read the attribute from
 * \param[in]   obj_name    The name of the object that the attribute is
 *                          attached to
 * \param[in]   attr_name   The attribute name
 * \param[out]  data        Buffer with data
 *
 * \return \herr_t
 *
 * \details H5LTget_attribute_char() reads an attribute named
 *          \p attr_name that is attached to the object specified
 *          by the name \p obj_name.  The datatype of the attribute
 *          is #H5T_NATIVE_CHAR.
 *
 */
H5_HLDLL herr_t H5LTget_attribute_char(hid_t loc_id, const char *obj_name, const char *attr_name, char *data);

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Reads an attribute from disk.
 *
 * \param[in]   loc_id      Identifier of the object (dataset or group)
 *                          to read the attribute from
 * \param[in]   obj_name    The name of the object that the attribute is
 *                          attached to
 * \param[in]   attr_name   The attribute name
 * \param[out]  data        Buffer with data
 *
 * \return \herr_t
 *
 * \details H5LTget_attribute_uchar() reads an attribute named
 *          \p attr_name that is attached to the object specified
 *          by the name \p obj_name.  The HDF5 datatype of the
 *          attribute is #H5T_NATIVE_UCHAR
 *
 */
H5_HLDLL herr_t H5LTget_attribute_uchar(hid_t loc_id, const char *obj_name, const char *attr_name,
                                        unsigned char *data);

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Reads an attribute from disk.
 *
 * \param[in]   loc_id      Identifier of the object (dataset or group)
 *                          to read the attribute from
 * \param[in]   obj_name    The name of the object that the attribute is
 *                          attached to
 * \param[in]   attr_name   The attribute name
 * \param[out]  data        Buffer with data
 *
 * \return \herr_t
 *
 * \details H5LTget_attribute_short() reads an attribute named
 *          \p attr_name that is attached to the object specified
 *          by the name \p obj_name.  The HDF5 datatype of the
 *          attribute is #H5T_NATIVE_SHORT
 *
 */
H5_HLDLL herr_t H5LTget_attribute_short(hid_t loc_id, const char *obj_name, const char *attr_name,
                                        short *data);

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Reads an attribute from disk.
 *
 * \param[in]   loc_id      Identifier of the object (dataset or group)
 *                          to read the attribute from
 * \param[in]   obj_name    The name of the object that the attribute is
 *                          attached to
 * \param[in]   attr_name   The attribute name
 * \param[out]  data        Buffer with data
 *
 * \return \herr_t
 *
 * \details H5LTget_attribute_ushort() reads an attribute named
 *          \p attr_name that is attached to the object specified
 *          by the name \p obj_name.  The HDF5 datatype of the
 *          attribute is #H5T_NATIVE_USHORT.
 *
 */
H5_HLDLL herr_t H5LTget_attribute_ushort(hid_t loc_id, const char *obj_name, const char *attr_name,
                                         unsigned short *data);

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Reads an attribute from disk.
 *
 * \param[in]   loc_id      Identifier of the object (dataset or group)
 *                          to read the attribute from
 * \param[in]   obj_name    The name of the object that the attribute is
 *                          attached to
 * \param[in]   attr_name   The attribute name
 * \param[out]  data        Buffer with data
 *
 * \return \herr_t
 *
 * \details H5LTget_attribute_int() reads an attribute named
 *          \p attr_name that is attached to the object specified
 *          by the name \p obj_name.  The HDF5 datatype of the
 *          attribute is #H5T_NATIVE_INT.
 *
 */
H5_HLDLL herr_t H5LTget_attribute_int(hid_t loc_id, const char *obj_name, const char *attr_name, int *data);

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Reads an attribute from disk.
 *
 * \param[in]   loc_id      Identifier of the object (dataset or group)
 *                          to read the attribute from
 * \param[in]   obj_name    The name of the object that the attribute is
 *                          attached to
 * \param[in]   attr_name   The attribute name
 * \param[out]  data        Buffer with data
 *
 * \return \herr_t
 *
 * \details H5LTget_attribute_uint() reads an attribute named
 *          \p attr_name that is attached to the object specified
 *          by the name \p obj_name.  The HDF5 datatype of the
 *          attribute is #H5T_NATIVE_INT.
 *
 */
H5_HLDLL herr_t H5LTget_attribute_uint(hid_t loc_id, const char *obj_name, const char *attr_name,
                                       unsigned int *data);

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Reads an attribute from disk.
 *
 * \param[in]   loc_id      Identifier of the object (dataset or group)
 *                          to read the attribute from
 * \param[in]   obj_name    The name of the object that the attribute is
 *                          attached to
 * \param[in]   attr_name   The attribute name
 * \param[out]  data        Buffer with data
 *
 * \return \herr_t
 *
 * \details H5LTget_attribute_long() reads an attribute named
 *          \p attr_name that is attached to the object specified
 *          by the name \p obj_name.  The HDF5 datatype of the
 *          attribute is #H5T_NATIVE_LONG.
 *
 */
H5_HLDLL herr_t H5LTget_attribute_long(hid_t loc_id, const char *obj_name, const char *attr_name, long *data);

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Reads a \e long \e long attribute.
 *
 * \param[in]   loc_id      Location of the object to which
 *                          the attribute is attached
 * \param[in]   obj_name    That object's name
 * \param[in]   attr_name   Attribute name
 * \param[out]  data        Attribute value
 *
 * \return \herr_t
 *
 * \details H5LTget_attribute_long_long() reads the attribute
 *          specified by \p loc_id and \p obj_name.
 *
 */
H5_HLDLL herr_t H5LTget_attribute_long_long(hid_t loc_id, const char *obj_name, const char *attr_name,
                                            long long *data);

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Reads an attribute from disk.
 *
 * \param[in]   loc_id      Identifier of the object (dataset or group)
 *                          to read the attribute from
 * \param[in]   obj_name    The name of the object that the attribute is
 *                          attached to
 * \param[in]   attr_name   The attribute name
 * \param[out]  data        Buffer with data
 *
 * \return \herr_t
 *
 * \details H5LTget_attribute_ulong() reads an attribute named
 *          \p attr_name that is attached to the object specified
 *          by the name \p obj_name.  The HDF5 datatype of the
 *          attribute is #H5T_NATIVE_ULONG.
 *
 */
H5_HLDLL herr_t H5LTget_attribute_ulong(hid_t loc_id, const char *obj_name, const char *attr_name,
                                        unsigned long *data);

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Reads an attribute from disk.
 *
 * \param[in]   loc_id      Identifier of the object (dataset or group)
 *                          to read the attribute from
 * \param[in]   obj_name    The name of the object that the attribute is
 *                          attached to
 * \param[in]   attr_name   The attribute name
 * \param[out]  data        Buffer with data
 *
 * \return \herr_t
 *
 * \details H5LTget_attribute_ullong() reads an attribute named
 *          \p attr_name that is attached to the object specified
 *          by the name \p obj_name.  The HDF5 datatype of the
 *          attribute is #H5T_NATIVE_ULLONG.
 *
 */
H5_HLDLL herr_t H5LTget_attribute_ullong(hid_t loc_id, const char *obj_name, const char *attr_name,
                                         unsigned long long *data);

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Reads an attribute from disk.
 *
 * \param[in]   loc_id      Identifier of the object (dataset or group)
 *                          to read the attribute from
 * \param[in]   obj_name    The name of the object that the attribute is
 *                          attached to
 * \param[in]   attr_name   The attribute name
 * \param[out]  data        Buffer with data
 *
 * \return \herr_t
 *
 * \details H5LTget_attribute_float() reads an attribute named
 *          \p attr_name that is attached to the object specified
 *          by the name \p obj_name.  The HDF5 datatype of the
 *          attribute is #H5T_NATIVE_FLOAT.
 *
 */
H5_HLDLL herr_t H5LTget_attribute_float(hid_t loc_id, const char *obj_name, const char *attr_name,
                                        float *data);

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Reads an attribute from disk.
 *
 * \param[in]   loc_id      Identifier of the object (dataset or group)
 *                          to read the attribute from
 * \param[in]   obj_name    The name of the object that the attribute is
 *                          attached to
 * \param[in]   attr_name   The attribute name
 * \param[out]  data        Buffer with data
 *
 * \return \herr_t
 *
 * \details H5LTget_attribute_double() reads an attribute named
 *          \p attr_name that is attached to the object specified
 *          by the name \p obj_name.  The HDF5 datatype of the
 *          attribute is #H5T_NATIVE_DOUBLE.
 *
 */
H5_HLDLL herr_t H5LTget_attribute_double(hid_t loc_id, const char *obj_name, const char *attr_name,
                                         double *data);

/*-------------------------------------------------------------------------
 *
 * Query attribute functions
 *
 *-------------------------------------------------------------------------
 */

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Gets the dimensionality of an attribute.
 *
 * \param[in]   loc_id      Identifier of the object (dataset or group)
 *                          to read the attribute from
 * \param[in]   obj_name    The name of the object that the attribute is
 *                          attached to
 * \param[in]   attr_name   The attribute name
 * \param[out]  rank        The dimensionality of the attribute
 *
 * \return \herr_t
 *
 * \details H5LTget_attribute_ndims() gets the dimensionality of an attribute
 *          named \p attr_name that is attached to the object specified
 *          by the name \p obj_name.
 *
 */
H5_HLDLL herr_t H5LTget_attribute_ndims(hid_t loc_id, const char *obj_name, const char *attr_name, int *rank);

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Gets information about an attribute.
 *
 * \param[in]   loc_id      Identifier of the object (dataset or group)
 *                          to read the attribute from
 * \param[in]   obj_name    The name of the object that the attribute is
 *                          attached to
 * \param[in]   attr_name   The attribute name
 * \param[out]  dims        The dimensions of the attribute
 * \param[out]  type_class  The class identifier. #H5T_class_t is
 *                          defined in H5Tpublic.h. For a list of valid class
 *                          types see: H5Tget_class().
 * \param[out]  type_size   The size of the datatype in bytes
 *
 * \return \herr_t
 *
 * \details H5LTget_attribute_info() gets information about an attribute
 *          named \p attr_name attached to the object specified by
 *          the name \p obj_name.
 *
 * \par Example
 * \snippet H5LT_examples.c get_attribute_info
 *
 */
H5_HLDLL herr_t H5LTget_attribute_info(hid_t loc_id, const char *obj_name, const char *attr_name,
                                       hsize_t *dims, H5T_class_t *type_class, size_t *type_size);

/*-------------------------------------------------------------------------
 *
 * General functions
 *
 *-------------------------------------------------------------------------
 */

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Creates an HDF5 datatype given a text description.
 *
 * \param[in] text      A character string containing a DDL
 *                      definition of the datatype to be created
 * \param[in] lang_type The language used to describe the datatype.
 *                      The only currently supported language is
 *                      #H5LT_DDL.
 *
 * \return  Returns the datatype identifier(non-negative) if successful;
 *          otherwise returns a negative value.
 *
 * \details Given a text description of a datatype, this function creates
 *          an HDF5 datatype and returns the datatype identifier.
 *          The text description of the datatype has to comply with the
 *          \p lang_type definition of HDF5 datatypes.
 *          Currently, only the DDL(#H5LT_DDL) is supported.
 *          The complete DDL definition of HDF5 datatypes can be found in
 *          the last chapter of the
 *          <a href="https://portal.hdfgroup.org/display/HDF5/HDF5+User+Guides">
 *          HDF5 User's Guide</a>.
 *
 * \par Example
 * An example of DDL definition of \c enum type is shown as follows.
 * \snippet H5LT_examples.c enum
 *
 */
H5_HLDLL hid_t H5LTtext_to_dtype(const char *text, H5LT_lang_t lang_type);

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Creates a text description of an HDF5 datatype.
 *
 * \param[in] dtype     Identifier of the datatype to be converted
 * \param[out] str      Buffer for the text description of the datatype
 * \param[in] lang_type The language used to describe the datatype.
 *                      The currently supported language is #H5LT_DDL.
 * \param[out] len      The size of buffer needed to store the text description
 *
 * \return  \herr_t
 *
 * \details Given an HDF5 datatype identifier, this function creates
 *          a description of this datatype in \p lang_type language format.
 *          A preliminary H5LTdtype_to_text() call can be made to determine
 *          the size of the buffer needed with a NULL passed in for \p str.
 *          This value is returned as \p len. That value can then be assigned
 *          to len for a second H5Ttype_to_text() call, which will
 *          retrieve the actual text description for the datatype.
 *
 *          If \p len is not big enough for the description, the text
 *          description will be truncated to fit in the buffer.
 *
 *          Currently only DDL (#H5LT_DDL) is supported for \p lang_type.
 *          The complete DDL definition of HDF5 data types can be found in
 *          the last chapter of the
 *          <a href="https://portal.hdfgroup.org/display/HDF5/HDF5+User+Guides">
 *          HDF5 User's Guide</a>.
 *
 * \par Example
 * An example of DDL definition of \c enum type is shown as follows.
 * \snippet H5LT_examples.c enum
 *
 */
H5_HLDLL herr_t H5LTdtype_to_text(hid_t dtype, char *str, H5LT_lang_t lang_type, size_t *len);

/*-------------------------------------------------------------------------
 *
 * Utility functions
 *
 *-------------------------------------------------------------------------
 */

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Determines whether an attribute exists.
 *
 * \param[in] loc_id    Identifier of the object to which the attribute
 *                      is expected to be attached
 * \param[in] name      Attribute name
 *
 * \return  \htri_t
 *
 * \details H5LTfind_attribute() determines whether an attribute named
 *          \p name exists attached to the object specified
 *          by \p loc_id.
 *
 *          \p loc_id must be an object identifier and \p name
 *          must specify an attribute that is expected to be attached
 *          to that object.
 *
 */
H5_HLDLL herr_t H5LTfind_attribute(hid_t loc_id, const char *name);

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Determines whether an HDF5 path is valid and, optionally,
 *        whether the path resolves to an HDF5 object.
 *
 * \param[in] loc_id                Identifier of an object in the file
 * \param[in] path                  The path to the object to check;
 *                                  links in \p path may be of any type.
 * \param[in] check_object_valid    If TRUE, determine whether the final
 *                                  component of \p path resolves to
 *                                  an object; if FALSE, do not check.
 *
 * \return  Upon success:
 * \return  If \p check_object_valid is set to \c FALSE:
 * \return  Returns \c TRUE if the path is valid;
 *          otherwise returns \c FALSE.
 * \return  If \p check_object_valid is set to \c TRUE:
 * \return  Returns \c TRUE if the path is valid and
 *          resolves to an HDF5 object;
 *          otherwise returns \c FALSE.
 *
 * \return  Upon error, returns a negative value.
 *
 * \details H5LTpath_valid() checks the validity of \p path relative
 *          to the identifier of an object, \p loc_id. Optionally,
 *          \p check_object_valid can be set to determine whether the
 *          final component of \p path resolves to an HDF5 object;
 *          if not, the final component is a dangling link.
 *
 *          The meaning of the function’s return value depends on the
 *          value of \p check_object_valid:
 *
 *          If \p check_object_valid is set to \c FALSE, H5LTpath_valid()
 *          will check all links in \p path to verify that they exist.
 *          If all the links in \p path exist, the function will
 *          return \c TRUE; otherwise the function will return \c FALSE.
 *
 *          If \p check_object_valid is set to \c TRUE,
 *          H5LTpath_valid() will first check the links in \p path,
 *          as described above. If all the links exist,
 *          \p check_object_valid will then determine whether the final
 *          component of \p path resolves to an actual HDF5 object.
 *          H5LTpath_valid() will return \c TRUE if all the links in
 *          \p path exist and the final component resolves to an
 *          actual object; otherwise, it will return \c FALSE.
 *
 *          \p path can be any one of the following:
 *
 *          - An absolute path, which starts with a slash (\c /)
 *            indicating the file’s root group, followed by the members
 *          - A relative path with respect to \p loc_id
 *          - A dot (\c .), if \p loc_id is the object identifier for
 *            the object itself
 *          .
 *
 *          If \p path is an absolute path, then \p loc_id can be an
 *          identifier for any object in the file as it is used only to
 *          identify the file. If \p path is a relative path, then
 *          \p loc_id must be a file or a group identifier.
 *
 * \note
 * <b>Note on Behavior Change:</b>
 * The behavior of  H5LTpath_valid() was changed in the 1.10.0 release
 * in the case where the root group, “/”, is the value of path.
 * This change is described below:
 *     - Let \p loc_id denote a valid HDF5 file identifier, and let
 *       \p check_object_valid be set to true or false.
 *       A call to  H5LTpath_valid() with arguments \p loc_id, “/”,
 *       and \p check_object_valid returns a positive value;
 *       in other words, H5LTpath_valid(loc_id, "/", check_object_valid)
 *       returns a positive value.
 *       In HDF5 version 1.8.16, this function returns 0.
 *     - Let ‘root’ denote a valid HDF5 group identifier that refers
 *       to the root group of an HDF5 file, and let \p check_object_valid
 *       be set to true or false.
 *       A call to H5LTpath_valid() with arguments ‘root’, “/”, and
 *       \p check_object_valid returns a positive value;
 *       in other words, H5LTpath_valid(root, "/", check_object_valid)
 *       returns a positive value.
 *       In HDF5 version 1.8.16, this function returns 0.
 *
 * \version 1.10.0 Function behavior changed in this release.
 *                 See the “Note on Behavior Change” section above.
 *
 */
H5_HLDLL htri_t H5LTpath_valid(hid_t loc_id, const char *path, hbool_t check_object_valid);

/*-------------------------------------------------------------------------
 *
 * File image operations functions
 *
 *-------------------------------------------------------------------------
 */

/**
 *-------------------------------------------------------------------------
 * \ingroup H5LT
 *
 * \brief Opens an HDF5 file image in memory.
 *
 * \param[in] buf_ptr   A pointer to the supplied initial image
 * \param[in] buf_size  Size of the supplied buffer
 * \param[in] flags     Flags specifying whether to open the image
 *                      read-only or read/write, whether HDF5 is to
 *                      take control of the buffer, and instruction
 *                      regarding releasing the buffer.
 *
 * \return  Returns a file identifier if successful;
 *          otherwise returns a negative value.
 * \warning \Bold{Failure Modes:}
 * \warning H5LTopen_file_image() will fail if either \p buf_ptr is NULL
 *          or \p buf_size equals 0 (zero).
 *
 *
 * \details H5LTopen_file_image() opens the HDF5 file image that is
 *          located in system memory at the address indicated by
 *          \p buf_ptr of size \p buf_size.
 *          H5LTopen_file_image() opens a file image with the
 *          Core driver, #H5FD_CORE.
 *
 *          A value of NULL for \p buf_ptr is invalid and will
 *          cause the function to fail.
 *
 *          A value of 0 for \p buf_size is invalid and will cause
 *          the function to fail.
 *
 *          The flags passed in \p flags specify whether to open the image
 *          read-only or read/write, whether HDF5 is to take control of the
 *          buffer, and instruction regarding releasing the buffer.
 *          Valid values are:
 *          - #H5LT_FILE_IMAGE_OPEN_RW
 *            - Specifies opening the file image in read/write mode.
 *            - Default without this flag: File image will be opened read-only.
 *            .
 *          - #H5LT_FILE_IMAGE_DONT_COPY
 *            - Specifies to not copy the provided file image buffer;
 *              the buffer will be used directly. HDF5 will release the
 *              file image when finished.
 *            - Default without this flag: Copy the file image buffer and
 *              open the copied file image.
 *            .
 *          - #H5LT_FILE_IMAGE_DONT_RELEASE
 *            - Specifies that HDF5 is not to release the buffer when
 *              the file opened with H5LTopen_file_image() is closed;
 *              releasing the buffer will be left to the application.
 *            - Default without this flag: HDF5 will automatically
 *              release the file image buffer after the file image is
 *              closed.  This flag is valid only when used with
 *              #H5LT_FILE_IMAGE_DONT_COPY.
 *            .
 *          .
 *
 * \note      **Motivation:**
 * \note      H5LTopen_file_image() and other elements of HDF5
 *            are used to load an image of an HDF5 file into system memory
 *            and open that image as a regular HDF5 file. An application can
 *            then use the file without the overhead of disk I/O.
 *
 * \note      **Recommended Reading:**
 * \note      This function is part of the file image operations feature set.
 *            It is highly recommended to study the guide
 *            <a href="https://portal.hdfgroup.org/display/HDF5/HDF5+File+Image+Operations">
 *            HDF5 File Image Operations</a> before using this feature set.\n
 *            See the “See Also” section below for links to other elements of
 *            HDF5 file image operations.
 *
 * \todo There is no "See Also" section???
 *
 * \since 1.8.9
 */
H5_HLDLL hid_t H5LTopen_file_image(void *buf_ptr, size_t buf_size, unsigned flags);

#ifdef __cplusplus
}
#endif

#endif