Compare commits
1425 Commits
inactive/a
...
vms_last_s
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a3f987daa9 | ||
|
|
a7f70203b4 | ||
|
|
32c030ad2b | ||
|
|
79d94c7bb7 | ||
|
|
63d38ca75a | ||
|
|
93379cf58f | ||
|
|
c3385d9010 | ||
|
|
27a385d557 | ||
|
|
41aeac4504 | ||
|
|
3a303d3dd3 | ||
|
|
f1ffd2202b | ||
|
|
73bb11dda3 | ||
|
|
69d4bda97c | ||
|
|
a75fd4c960 | ||
|
|
546899dcd6 | ||
|
|
3db1c5f635 | ||
|
|
85504f5376 | ||
|
|
595b01658e | ||
|
|
fd79bc3c1a | ||
|
|
b28b5fade9 | ||
|
|
74fbb9e327 | ||
|
|
9a376e4ee9 | ||
|
|
d0c224ae18 | ||
|
|
7fcba33763 | ||
|
|
999440cbf8 | ||
|
|
d1897cb038 | ||
|
|
ab75986b8c | ||
|
|
1b78408184 | ||
|
|
f4a60fc34c | ||
|
|
06d1971f41 | ||
|
|
5060fb1050 | ||
|
|
3946ec882b | ||
|
|
ba35eb0f05 | ||
|
|
fc93c6fe70 | ||
|
|
67f41bf9f8 | ||
|
|
a9cf3b658b | ||
|
|
e05c75ea4e | ||
|
|
055348122d | ||
|
|
eb3900554e | ||
|
|
f4e69ad579 | ||
|
|
374f064f82 | ||
|
|
1e3f530848 | ||
|
|
324f087d05 | ||
|
|
543a8d9d86 | ||
|
|
5eee1d7d7e | ||
|
|
a24e3e5c86 | ||
|
|
de47d219c9 | ||
|
|
21ef17f951 | ||
|
|
3b742b733b | ||
|
|
aafac8d770 | ||
|
|
aac2bb6182 | ||
|
|
1949c40bfd | ||
|
|
234e77b3f9 | ||
|
|
485faa47e7 | ||
|
|
c6cf45e3e7 | ||
|
|
d3ddfe842d | ||
|
|
0ebac5f389 | ||
|
|
50c5f1ab2c | ||
|
|
5da20c221e | ||
|
|
6a982a7690 | ||
|
|
671006a10d | ||
|
|
6b109315f5 | ||
|
|
509cd32da2 | ||
|
|
fe1bf91042 | ||
|
|
c803666ec2 | ||
|
|
dcc956f594 | ||
|
|
7affd93d05 | ||
|
|
f5d2975018 | ||
|
|
aebc4ae149 | ||
|
|
b65eae7aee | ||
|
|
662892e8b1 | ||
|
|
b7047b6425 | ||
|
|
fc8767cf82 | ||
|
|
d4e70e8cae | ||
|
|
cbd0460b1b | ||
|
|
443bc1200f | ||
|
|
e0c586cd98 | ||
|
|
51abd359f3 | ||
|
|
c8fea60113 | ||
|
|
9747e63938 | ||
|
|
1d83ae98b9 | ||
|
|
91f7c2797f | ||
|
|
73ccd8a4b3 | ||
|
|
6b3e39f9e7 | ||
|
|
98958b530a | ||
|
|
3f2ce7aebc | ||
|
|
d9ba0ae35f | ||
|
|
4c24346fe1 | ||
|
|
3eaa80b0d3 | ||
|
|
118710f360 | ||
|
|
c0ec3bf38e | ||
|
|
8368e9b684 | ||
|
|
bb9460b27d | ||
|
|
609636acaa | ||
|
|
ff7783bbc8 | ||
|
|
b3852a9f1e | ||
|
|
b21f51c38f | ||
|
|
c1763bef53 | ||
|
|
ccbd46e914 | ||
|
|
4d34b79730 | ||
|
|
0a21243303 | ||
|
|
5816073846 | ||
|
|
b59663156d | ||
|
|
36a847bc0c | ||
|
|
59132dec15 | ||
|
|
05716e2239 | ||
|
|
3ba28fb7ee | ||
|
|
a096202edd | ||
|
|
5362b49bec | ||
|
|
52bff896a7 | ||
|
|
89e2c8822d | ||
|
|
2fcec016a8 | ||
|
|
d5f913731d | ||
|
|
81f7e6b1d3 | ||
|
|
6735f59f7d | ||
|
|
73465a6bc2 | ||
|
|
573d47083b | ||
|
|
3fa8cd322f | ||
|
|
429dce1736 | ||
|
|
290dfb8799 | ||
|
|
b6e694cb32 | ||
|
|
2a668bd0fc | ||
|
|
ad3e91f0c3 | ||
|
|
d527a825d4 | ||
|
|
d3dbcf313f | ||
|
|
6d82d6c7cd | ||
|
|
b402201745 | ||
|
|
a65212ed9f | ||
|
|
e8ffff6853 | ||
|
|
6fdac87ac1 | ||
|
|
c7da369bfd | ||
|
|
9a074a6679 | ||
|
|
18f671c064 | ||
|
|
9645159614 | ||
|
|
ab33b7f34d | ||
|
|
e6702f2cae | ||
|
|
6cc1d95b5f | ||
|
|
ca6ffd477d | ||
|
|
26400c392b | ||
|
|
bd9c6d829a | ||
|
|
cbd0112b16 | ||
|
|
87bed2c752 | ||
|
|
bfdf663569 | ||
|
|
1df7b415ab | ||
|
|
22d0d32716 | ||
|
|
10f1e6acf8 | ||
|
|
0befe65753 | ||
|
|
9140500b86 | ||
|
|
17893b24ea | ||
|
|
c617cbdfb0 | ||
|
|
6f2f584c42 | ||
|
|
8bd91611f4 | ||
|
|
38ffe94174 | ||
|
|
a881862802 | ||
|
|
52d5e22956 | ||
|
|
51e9f7091c | ||
|
|
510e79af7c | ||
|
|
0324181acc | ||
|
|
b2fa3069d9 | ||
|
|
148097511c | ||
|
|
ae00b7b591 | ||
|
|
9a5a86e873 | ||
|
|
7f2fa8340b | ||
|
|
1064f6cd03 | ||
|
|
ace4fef4d6 | ||
|
|
5a4357e4fb | ||
|
|
c23f3a7ea5 | ||
|
|
2154d1c6f1 | ||
|
|
38251c0765 | ||
|
|
77e7e788c8 | ||
|
|
32c3fec56c | ||
|
|
3f11676e9d | ||
|
|
88fb6b1374 | ||
|
|
2a5454616a | ||
|
|
f98f792fe3 | ||
|
|
a794cc9103 | ||
|
|
333f1d4783 | ||
|
|
7433fb9dc1 | ||
|
|
a72cb6e43e | ||
|
|
db51b55049 | ||
|
|
4defea0020 | ||
|
|
1bd45cb96f | ||
|
|
d4ebdeadad | ||
|
|
8771fba1de | ||
|
|
beb6f83cfd | ||
|
|
33ea1ada24 | ||
|
|
3f701fda65 | ||
|
|
2173d36d66 | ||
|
|
f41ac60621 | ||
|
|
65e3b596e3 | ||
|
|
161ab14bbd | ||
|
|
ed9115f283 | ||
|
|
f793c50e47 | ||
|
|
c85497442b | ||
|
|
00e4cbc963 | ||
|
|
1ebce1bfcf | ||
|
|
bd66cdd5d6 | ||
|
|
f1f7b15e50 | ||
|
|
d4d24390a2 | ||
|
|
ee28a1ad8b | ||
|
|
61a411b02f | ||
|
|
4344c1d70b | ||
|
|
ae25c80cc0 | ||
|
|
7595d00ae5 | ||
|
|
453f9d7b20 | ||
|
|
84d0a9f7cb | ||
|
|
186aca8b49 | ||
|
|
06e4e32ba0 | ||
|
|
92cc75bfae | ||
|
|
6d637e03f7 | ||
|
|
382976f3e9 | ||
|
|
06ef71a37f | ||
|
|
5ad9bfb322 | ||
|
|
ee9d595a8c | ||
|
|
43b3c20c93 | ||
|
|
8925b39181 | ||
|
|
28ec2d2693 | ||
|
|
d9c1c23c38 | ||
|
|
e90941e86a | ||
|
|
5849a90e16 | ||
|
|
fbaf82bc3c | ||
|
|
12ee3deb82 | ||
|
|
471aedb1e8 | ||
|
|
c194e9c9a7 | ||
|
|
9c4e646c1a | ||
|
|
bfb60a0cc1 | ||
|
|
0b75068901 | ||
|
|
890a76ea64 | ||
|
|
8c56c5096e | ||
|
|
90757478c2 | ||
|
|
7d3ff84d59 | ||
|
|
9cf0844928 | ||
|
|
59517a164b | ||
|
|
744bc7d236 | ||
|
|
588a733b18 | ||
|
|
ec408ef083 | ||
|
|
e23830d29f | ||
|
|
25ba47bc97 | ||
|
|
4ccb865c70 | ||
|
|
c2bc22d51c | ||
|
|
d74b7fb7b8 | ||
|
|
0c07b68c92 | ||
|
|
d867178192 | ||
|
|
99800edafb | ||
|
|
80a2084bf7 | ||
|
|
cf71b7db57 | ||
|
|
4a8b02f838 | ||
|
|
60f8a4100e | ||
|
|
a8b48bc7f5 | ||
|
|
b6733f1109 | ||
|
|
04c24b4624 | ||
|
|
e6a3a3cfad | ||
|
|
5444efe2b1 | ||
|
|
2c12b5d42d | ||
|
|
a613b70f93 | ||
|
|
896a5e7992 | ||
|
|
ef494f08a2 | ||
|
|
21474f8eee | ||
|
|
8f57e86ab9 | ||
|
|
22f9644670 | ||
|
|
0774c92383 | ||
|
|
1ab0de9861 | ||
|
|
fb7e8562e2 | ||
|
|
4545b87a09 | ||
|
|
acff290b94 | ||
|
|
3f5886da9f | ||
|
|
75044d8ae7 | ||
|
|
d517af5086 | ||
|
|
a9fa46cf8e | ||
|
|
39681a594f | ||
|
|
9fd8692663 | ||
|
|
9711359755 | ||
|
|
6f46f25486 | ||
|
|
3fde3a16b5 | ||
|
|
c6e3e68297 | ||
|
|
7309bb5ab8 | ||
|
|
1c3f945739 | ||
|
|
97525f97f2 | ||
|
|
01de7491b2 | ||
|
|
b06947c433 | ||
|
|
4de2b5b559 | ||
|
|
95e0006dc2 | ||
|
|
ead005cc27 | ||
|
|
3bdb116942 | ||
|
|
cd973218bf | ||
|
|
897806f3c7 | ||
|
|
7b6eae2ddf | ||
|
|
3dc1e6dd38 | ||
|
|
2b11123a20 | ||
|
|
a75e8dd654 | ||
|
|
ca6e13d3df | ||
|
|
01cd10e0cd | ||
|
|
b4c44f8eeb | ||
|
|
94ede7a8ce | ||
|
|
6233002749 | ||
|
|
9eec404f8b | ||
|
|
d259d6e0ab | ||
|
|
1ae7c67a71 | ||
|
|
e2bc556949 | ||
|
|
3edb726818 | ||
|
|
c0bb145242 | ||
|
|
3677c1cc8e | ||
|
|
9734210966 | ||
|
|
3de25ee226 | ||
|
|
f32690b53c | ||
|
|
a2c8dc8972 | ||
|
|
c1163e0399 | ||
|
|
0dc4ce3704 | ||
|
|
5ae7ad342d | ||
|
|
385b4b40ae | ||
|
|
aaf5c1d400 | ||
|
|
ae84631570 | ||
|
|
9cd1a1bb60 | ||
|
|
d1f2b1a682 | ||
|
|
ff9a10cfda | ||
|
|
67a61ed22f | ||
|
|
849177c7b6 | ||
|
|
f6a04cded9 | ||
|
|
c520294d67 | ||
|
|
25b1330915 | ||
|
|
c455fdc4f1 | ||
|
|
607634a69b | ||
|
|
805b1ec23c | ||
|
|
dde80eef11 | ||
|
|
a08f75b073 | ||
|
|
70daa61a87 | ||
|
|
a9724dfd6c | ||
|
|
5d7af691c3 | ||
|
|
785d65181d | ||
|
|
b17ef126a7 | ||
|
|
79a891c241 | ||
|
|
5f4562b2ea | ||
|
|
e26b78a04b | ||
|
|
b0bdd25417 | ||
|
|
b87b1c965d | ||
|
|
6739a7f7ac | ||
|
|
98bbf4a36a | ||
|
|
5555f057ae | ||
|
|
c86aedeba1 | ||
|
|
0fcac56705 | ||
|
|
d01ee66666 | ||
|
|
ef9db69bf3 | ||
|
|
f5f913436f | ||
|
|
163f4036ec | ||
|
|
8faebe2aa8 | ||
|
|
c6fe8c70b2 | ||
|
|
cf482acf55 | ||
|
|
5f17eea9cd | ||
|
|
82df757e96 | ||
|
|
be38074a2f | ||
|
|
d6cd6cabc2 | ||
|
|
5ccbc671e4 | ||
|
|
65ebbe2753 | ||
|
|
e79b0dece5 | ||
|
|
448e1e05f1 | ||
|
|
1e1f754fb0 | ||
|
|
7ed2b997ba | ||
|
|
9db0c02b96 | ||
|
|
425408b5a1 | ||
|
|
84e27c4af1 | ||
|
|
403506efd4 | ||
|
|
8b27024edd | ||
|
|
075a5a9a3a | ||
|
|
63e1b32068 | ||
|
|
810285be8e | ||
|
|
f251a0219c | ||
|
|
f97d63cb95 | ||
|
|
67be45610f | ||
|
|
958a762dd1 | ||
|
|
60df159d33 | ||
|
|
2e4302818a | ||
|
|
c4f982abf1 | ||
|
|
7a4727d80c | ||
|
|
6515a1f8ac | ||
|
|
6c13c99ce9 | ||
|
|
da23edd24e | ||
|
|
ba2c98d42a | ||
|
|
0be0491ee4 | ||
|
|
34bfba14d5 | ||
|
|
ff565cd175 | ||
|
|
44fe3cc19b | ||
|
|
03d10edd23 | ||
|
|
73a72c59b8 | ||
|
|
185b3c5dee | ||
|
|
164b4c7534 | ||
|
|
288c7760a4 | ||
|
|
f5689224b5 | ||
|
|
b17f3e4183 | ||
|
|
6c5e74942d | ||
|
|
a3292a77ce | ||
|
|
5b7c8c7a7d | ||
|
|
4a9ea60adc | ||
|
|
ac0ef34a41 | ||
|
|
e367f64e24 | ||
|
|
f683d9a035 | ||
|
|
e1e136ea1d | ||
|
|
f68f4be233 | ||
|
|
db1b11b69b | ||
|
|
c2bf6ea162 | ||
|
|
1162465570 | ||
|
|
1e36b5a348 | ||
|
|
b30e37ea78 | ||
|
|
d0ae86bc64 | ||
|
|
bf908ca553 | ||
|
|
d7f00b8002 | ||
|
|
7c54d413ae | ||
|
|
9dc573798d | ||
|
|
863ff882b6 | ||
|
|
49a9979166 | ||
|
|
82f62cd012 | ||
|
|
ab045c634c | ||
|
|
1b6683e58f | ||
|
|
ecc60884a8 | ||
|
|
6569d7437a | ||
|
|
ee10548723 | ||
|
|
ddf75b10f6 | ||
|
|
0a2ed24d0f | ||
|
|
a3e2fabb53 | ||
|
|
d9423717e4 | ||
|
|
b7b4e77f12 | ||
|
|
2f8c7fbd5e | ||
|
|
362ffa9f05 | ||
|
|
4f2f2cf6a2 | ||
|
|
256b36e141 | ||
|
|
50bd3521af | ||
|
|
2f86aa7551 | ||
|
|
8235d9820a | ||
|
|
cf543d258e | ||
|
|
146a357b90 | ||
|
|
63df298fcc | ||
|
|
25b90a558c | ||
|
|
4a428e25b8 | ||
|
|
132601ba46 | ||
|
|
0ff7eb5cda | ||
|
|
1596d15623 | ||
|
|
d4d0407a87 | ||
|
|
d8b13f60ff | ||
|
|
f30276c462 | ||
|
|
6ceb9711b8 | ||
|
|
1febc8a453 | ||
|
|
0a128b20a6 | ||
|
|
cdcf54a614 | ||
|
|
92d4f32514 | ||
|
|
6a77f9821b | ||
|
|
ebb6e8e3be | ||
|
|
0cffc628ba | ||
|
|
3b23b7eb1a | ||
|
|
008f2e4017 | ||
|
|
99a54a3056 | ||
|
|
624a466600 | ||
|
|
5e695ce4bc | ||
|
|
2d79ba29ed | ||
|
|
0a506a625b | ||
|
|
a25c08e9e2 | ||
|
|
2f097704ca | ||
|
|
6c90fd5b0b | ||
|
|
bc09cdc302 | ||
|
|
200e48e08c | ||
|
|
21cecf09fa | ||
|
|
3a976e0aa7 | ||
|
|
93197c0257 | ||
|
|
43690b681c | ||
|
|
8190a5e4b3 | ||
|
|
132dfca7d0 | ||
|
|
7aa4a180e4 | ||
|
|
819b8099e2 | ||
|
|
2136f11a47 | ||
|
|
a3f7f83ed9 | ||
|
|
0aa06db0a4 | ||
|
|
89f2019ecf | ||
|
|
e6cace9ee4 | ||
|
|
2eb24b16da | ||
|
|
56803a1970 | ||
|
|
277ee2f7ee | ||
|
|
b7a4e1a44e | ||
|
|
8538cf61f9 | ||
|
|
e9203a73e2 | ||
|
|
2aec2ec315 | ||
|
|
28574d0bc7 | ||
|
|
370e6f3f56 | ||
|
|
82beeef272 | ||
|
|
5092f5a30e | ||
|
|
06aa7b6641 | ||
|
|
52412564af | ||
|
|
9d954e1136 | ||
|
|
53827d4017 | ||
|
|
5f2a34b462 | ||
|
|
2060d4f6b9 | ||
|
|
9d05904ae0 | ||
|
|
738f1f0bd6 | ||
|
|
80ff6d8fee | ||
|
|
f17fe28697 | ||
|
|
7942fa417e | ||
|
|
91b41bad3a | ||
|
|
8597110837 | ||
|
|
7fcd636cb3 | ||
|
|
7171c08a88 | ||
|
|
4611f95d4c | ||
|
|
2be5841984 | ||
|
|
a4ab8b0e1d | ||
|
|
bbd9ad0b27 | ||
|
|
421e7549a5 | ||
|
|
ebc0b44fe1 | ||
|
|
ae927c6070 | ||
|
|
b232b752a0 | ||
|
|
b3f9cb8786 | ||
|
|
91df66782e | ||
|
|
ab239810e1 | ||
|
|
c19d87b1fc | ||
|
|
b52c12bc1d | ||
|
|
94b55940ea | ||
|
|
f8fb310610 | ||
|
|
f9a758f442 | ||
|
|
5b4202c472 | ||
|
|
1b22cc435e | ||
|
|
d567424783 | ||
|
|
10a843ff7f | ||
|
|
c965b5503b | ||
|
|
be3a331550 | ||
|
|
0653325f0d | ||
|
|
4182c81add | ||
|
|
d95f5e293a | ||
|
|
18b896112c | ||
|
|
54a659cb99 | ||
|
|
afb5fc5c35 | ||
|
|
27ed849cad | ||
|
|
a80cf34324 | ||
|
|
309f3e7a23 | ||
|
|
a8c63e28d5 | ||
|
|
3c021d3a77 | ||
|
|
f6949a66d7 | ||
|
|
0682846479 | ||
|
|
d088d3285c | ||
|
|
9feb3e641d | ||
|
|
2465c432f0 | ||
|
|
175e82e484 | ||
|
|
b0d34310f5 | ||
|
|
a1071ada16 | ||
|
|
f79eac6049 | ||
|
|
6b54dac504 | ||
|
|
2c6fc585fd | ||
|
|
f825256c87 | ||
|
|
79c8e26fa7 | ||
|
|
2cb03fedde | ||
|
|
8b4cf4c8cb | ||
|
|
786526fd05 | ||
|
|
145f1ce9e3 | ||
|
|
ddbc3c841c | ||
|
|
5b876c929f | ||
|
|
a1fe10691c | ||
|
|
bf1c137c0c | ||
|
|
d50c061d38 | ||
|
|
a4294ab3cc | ||
|
|
a3e0aecb22 | ||
|
|
7a0f38d807 | ||
|
|
d24404ae83 | ||
|
|
0b572983e9 | ||
|
|
ca60bda9fb | ||
|
|
68dd16d8f0 | ||
|
|
d2e10eefd7 | ||
|
|
e86655bbf4 | ||
|
|
7e0bc29012 | ||
|
|
ff00749dfc | ||
|
|
13a0f5576a | ||
|
|
8c14af82c6 | ||
|
|
6bc36a0c46 | ||
|
|
482a9c28e7 | ||
|
|
c502d81a8c | ||
|
|
fcb21bb3dd | ||
|
|
b503983d85 | ||
|
|
28c2f17960 | ||
|
|
308c378ccd | ||
|
|
d663d78cd2 | ||
|
|
170b7275c0 | ||
|
|
453f95c192 | ||
|
|
b6f7e6e79c | ||
|
|
af92c5f1e0 | ||
|
|
33d5f5d1e8 | ||
|
|
8b2f7c2183 | ||
|
|
e8d0919d43 | ||
|
|
4935d0bfab | ||
|
|
5d0b400f69 | ||
|
|
a3204d77e7 | ||
|
|
f801cf4618 | ||
|
|
407d3db6a4 | ||
|
|
5c3bd21963 | ||
|
|
825fe56892 | ||
|
|
ef73979a41 | ||
|
|
345e57b0b1 | ||
|
|
5dcd9c2dfc | ||
|
|
b5ad01c7e1 | ||
|
|
f1bb1129f3 | ||
|
|
111a57ca26 | ||
|
|
bdeb1f6c43 | ||
|
|
f09101079e | ||
|
|
c902bbdd90 | ||
|
|
f1b5d46cd0 | ||
|
|
bf9b274e27 | ||
|
|
7a96201ee1 | ||
|
|
4e1695576c | ||
|
|
ba181d404d | ||
|
|
5b6ae0b603 | ||
|
|
ad7624ada3 | ||
|
|
cd7ba8ad55 | ||
|
|
69e501fc70 | ||
|
|
cb41664db2 | ||
|
|
a195bb78b9 | ||
|
|
f26b04712e | ||
|
|
2f8642a903 | ||
|
|
3a316cfc63 | ||
|
|
0bdce69c79 | ||
|
|
6d4656f116 | ||
|
|
4e12ec74ae | ||
|
|
25fe312b3c | ||
|
|
ba44b1ae08 | ||
|
|
5c1ee8c836 | ||
|
|
e266d672e7 | ||
|
|
70de2942b2 | ||
|
|
2efbc227cd | ||
|
|
7cdea30a3a | ||
|
|
3cb8efae13 | ||
|
|
dad8a4ddef | ||
|
|
dfcb3cebf1 | ||
|
|
6da129cef0 | ||
|
|
a0ccc0f0fa | ||
|
|
259abfa839 | ||
|
|
53afd20aeb | ||
|
|
a157eb2f68 | ||
|
|
1b6d1ca4f0 | ||
|
|
a4dc3ff34d | ||
|
|
308106c0e9 | ||
|
|
c2750822ff | ||
|
|
cf5071ad05 | ||
|
|
dc2de300b4 | ||
|
|
a8b44cd899 | ||
|
|
dd89c8e90f | ||
|
|
e3a1fa7e57 | ||
|
|
a8c227e175 | ||
|
|
66490d45e1 | ||
|
|
1e38ef6718 | ||
|
|
6fedfb6124 | ||
|
|
148fc61872 | ||
|
|
125e2a0a9d | ||
|
|
e71411f9cf | ||
|
|
74384b3c19 | ||
|
|
60cce86d0e | ||
|
|
8ae76fa4b8 | ||
|
|
8f9fb4a106 | ||
|
|
47190b32e5 | ||
|
|
6c3284f8b3 | ||
|
|
bdbd06d85d | ||
|
|
e35d1e08f3 | ||
|
|
93ec8e0821 | ||
|
|
c7e81f4894 | ||
|
|
26ef64312a | ||
|
|
6ca79dd149 | ||
|
|
f4a3f6412b | ||
|
|
8f0c245f72 | ||
|
|
7e2733da8c | ||
|
|
feb14ea872 | ||
|
|
001f6a53bf | ||
|
|
70d440330d | ||
|
|
f0a9b781f3 | ||
|
|
a6d8395557 | ||
|
|
06d9eb3c63 | ||
|
|
10108d7e30 | ||
|
|
fab67b684e | ||
|
|
177a90f97a | ||
|
|
33bd53a7eb | ||
|
|
8cc6ceb4e3 | ||
|
|
424a41f878 | ||
|
|
7a3f473c04 | ||
|
|
c09748b14e | ||
|
|
b0235a2610 | ||
|
|
7922ae388e | ||
|
|
d38fe20df6 | ||
|
|
5ecebe5b9b | ||
|
|
fb396557fc | ||
|
|
90ccb5c3c3 | ||
|
|
8ec42ced80 | ||
|
|
8f3aee85de | ||
|
|
99e1300a0f | ||
|
|
30f904dbe9 | ||
|
|
62f6b579d0 | ||
|
|
7d205bba0a | ||
|
|
7d0aded13a | ||
|
|
bada3f7a86 | ||
|
|
029e143471 | ||
|
|
3c79c08dbe | ||
|
|
1f09e9d19e | ||
|
|
613c5e8046 | ||
|
|
357424423c | ||
|
|
ed5a2bc1c1 | ||
|
|
00648b6875 | ||
|
|
5acd9c4053 | ||
|
|
e112a68bf8 | ||
|
|
c61fb7260a | ||
|
|
608559dead | ||
|
|
523675b2c1 | ||
|
|
337242feea | ||
|
|
dd577725d1 | ||
|
|
3e841b44be | ||
|
|
6b00c16d2a | ||
|
|
a99e92e6a4 | ||
|
|
8277409a9b | ||
|
|
70e0f8e200 | ||
|
|
12616e370c | ||
|
|
a259cbdda7 | ||
|
|
46342f6398 | ||
|
|
9ab7c47000 | ||
|
|
68b0945687 | ||
|
|
f2e9f4e8c6 | ||
|
|
86c0d2aa05 | ||
|
|
97caaff719 | ||
|
|
f03301ce82 | ||
|
|
b4331b2ff3 | ||
|
|
0b16cecb99 | ||
|
|
7ee9828c26 | ||
|
|
26785f6af5 | ||
|
|
91831f41ad | ||
|
|
b8c258a970 | ||
|
|
fc4c7a05f6 | ||
|
|
1b6963230b | ||
|
|
46b63fe7d8 | ||
|
|
075334af96 | ||
|
|
72e84fcd82 | ||
|
|
e679eed61b | ||
|
|
47a25f0d0c | ||
|
|
581f5fc68d | ||
|
|
cc3fdd8ba4 | ||
|
|
913b88d15b | ||
|
|
b6e0e867d0 | ||
|
|
6c974c824d | ||
|
|
ed621aae38 | ||
|
|
5e5e9e3987 | ||
|
|
59bb6d185e | ||
|
|
c1c11c021b | ||
|
|
3374ffecf8 | ||
|
|
9138b343aa | ||
|
|
02b1c11ecd | ||
|
|
d7724485b0 | ||
|
|
c76847d107 | ||
|
|
be4198eb41 | ||
|
|
86f1fce5f7 | ||
|
|
5f8f3dcb79 | ||
|
|
5a14bf5fac | ||
|
|
5b12b8e122 | ||
|
|
881cdef5f8 | ||
|
|
a1db18bc05 | ||
|
|
d55bfb91a2 | ||
|
|
cb8e3dee9f | ||
|
|
782591cf13 | ||
|
|
bda2e5da5a | ||
|
|
cfbbd94627 | ||
|
|
b1c594d52d | ||
|
|
52d1190883 | ||
|
|
dabebe412f | ||
|
|
4ae0c873e0 | ||
|
|
6e1122dda4 | ||
|
|
1f6cd26a93 | ||
|
|
01765e3079 | ||
|
|
865bf6bcb2 | ||
|
|
5c45961845 | ||
|
|
f593b6e712 | ||
|
|
8ffd55478e | ||
|
|
99b1524474 | ||
|
|
3f1c23b315 | ||
|
|
c8018386da | ||
|
|
030a17ca60 | ||
|
|
535456397c | ||
|
|
0596de6267 | ||
|
|
e7ced517bc | ||
|
|
a0ec9c282b | ||
|
|
e8955b876c | ||
|
|
f0e328cc04 | ||
|
|
fb169f7aa9 | ||
|
|
59a9d9a0c6 | ||
|
|
6563fc39b1 | ||
|
|
76d6b9f4db | ||
|
|
61b39ecc7c | ||
|
|
7c70c816f5 | ||
|
|
59dd5665a5 | ||
|
|
4f1c1bbf1a | ||
|
|
cec54e1fa0 | ||
|
|
8ad18f496a | ||
|
|
40b7936a5b | ||
|
|
721b337b15 | ||
|
|
b587321096 | ||
|
|
a9de601138 | ||
|
|
32ffaa8982 | ||
|
|
af9a3abb3d | ||
|
|
626fb1b02f | ||
|
|
beccb8a0fc | ||
|
|
00c4e5f00d | ||
|
|
c08dc5f646 | ||
|
|
e4c9a6f3b6 | ||
|
|
9a720f99fe | ||
|
|
f2b142f6ed | ||
|
|
23635d656a | ||
|
|
ebfebfd7d5 | ||
|
|
76a8599736 | ||
|
|
c7e0a521db | ||
|
|
e188e7797b | ||
|
|
296e21f2e2 | ||
|
|
f6f202dc71 | ||
|
|
7f44286aa5 | ||
|
|
2923f64c28 | ||
|
|
c1ddb82ac1 | ||
|
|
dadea7dc74 | ||
|
|
3a4c43cbd4 | ||
|
|
e37ee97a58 | ||
|
|
08359be858 | ||
|
|
55822485c6 | ||
|
|
c896a5b7eb | ||
|
|
1e057e17d2 | ||
|
|
dd0a7fa13b | ||
|
|
f667d55efe | ||
|
|
dbd93b2c55 | ||
|
|
110d933a57 | ||
|
|
5b959f0bf9 | ||
|
|
2195fe47db | ||
|
|
ebb18c5186 | ||
|
|
1cffcb401a | ||
|
|
77dedb3c64 | ||
|
|
00eea738d6 | ||
|
|
fbf49aeddf | ||
|
|
54574a282d | ||
|
|
0fc1c9c519 | ||
|
|
66ba0b4f33 | ||
|
|
47af32527b | ||
|
|
e142838d1f | ||
|
|
2c0357db80 | ||
|
|
8a92fbce85 | ||
|
|
aff5c20a6a | ||
|
|
dbad502865 | ||
|
|
f3da4919c4 | ||
|
|
2ec529c035 | ||
|
|
4e08487549 | ||
|
|
a4521b7901 | ||
|
|
a976ca99a9 | ||
|
|
32da9c96ae | ||
|
|
1eeac2048a | ||
|
|
ff30c61329 | ||
|
|
69ced48cf8 | ||
|
|
43189639fd | ||
|
|
4149edf118 | ||
|
|
325c3b869f | ||
|
|
8bdc6f991e | ||
|
|
ba355ce887 | ||
|
|
bf80a61b14 | ||
|
|
0336d9cdb4 | ||
|
|
06e935bae9 | ||
|
|
90f4f15617 | ||
|
|
7feda84aeb | ||
|
|
115a5b36dd | ||
|
|
b9edfdfa25 | ||
|
|
a6b09480ff | ||
|
|
366d729046 | ||
|
|
3b1e202378 | ||
|
|
d8b3b84ca2 | ||
|
|
e8a0753656 | ||
|
|
472566b543 | ||
|
|
7ca11cb3e0 | ||
|
|
f08e413f1d | ||
|
|
334cebba07 | ||
|
|
4680324b24 | ||
|
|
6ad28abc14 | ||
|
|
9d07161dd9 | ||
|
|
d9baac8b0b | ||
|
|
23d2b5d557 | ||
|
|
b37820aecb | ||
|
|
871b69723e | ||
|
|
944f0399ac | ||
|
|
d91625d139 | ||
|
|
692fa69934 | ||
|
|
386f73823a | ||
|
|
69a777556e | ||
|
|
400bf73d17 | ||
|
|
0e3517d34f | ||
|
|
d7a07d62a4 | ||
|
|
b1e0f6c5a5 | ||
|
|
c3e149d06f | ||
|
|
c0b2724d4d | ||
|
|
b65a911b8a | ||
|
|
a3e98d0e36 | ||
|
|
5140343f45 | ||
|
|
415aa7e257 | ||
|
|
b84234d23c | ||
|
|
9d23b171a5 | ||
|
|
4cb3d328ca | ||
|
|
d42db65e89 | ||
|
|
7461ce3958 | ||
|
|
1b4769d016 | ||
|
|
ab2f0d00f3 | ||
|
|
3b787c97d3 | ||
|
|
6fca8e80d0 | ||
|
|
82ac7b92e3 | ||
|
|
cf1821d116 | ||
|
|
2233570f16 | ||
|
|
81a6f5be7c | ||
|
|
5650be2d1a | ||
|
|
ff421d9424 | ||
|
|
0b107827ec | ||
|
|
488453cdfc | ||
|
|
37d1a0330a | ||
|
|
3ddf8006a1 | ||
|
|
b807327433 | ||
|
|
c352249db1 | ||
|
|
769c50cbdc | ||
|
|
0068ead81c | ||
|
|
0aba80fb13 | ||
|
|
a02d99ab61 | ||
|
|
ceb07d21b0 | ||
|
|
c80e3a0d13 | ||
|
|
629b737016 | ||
|
|
35c2e47c60 | ||
|
|
cb6d2f2a45 | ||
|
|
c326a3bd9c | ||
|
|
2a7ae0367b | ||
|
|
ec704e0077 | ||
|
|
c9aad08a90 | ||
|
|
2fba171a67 | ||
|
|
7a775b6c59 | ||
|
|
4b9482eaee | ||
|
|
2381dacdad | ||
|
|
3a7b11863a | ||
|
|
9ac4f9ad6b | ||
|
|
fd07eb96af | ||
|
|
7b895e1dd8 | ||
|
|
8eab66f667 | ||
|
|
81bcd314a9 | ||
|
|
cde5029461 | ||
|
|
39e26205e1 | ||
|
|
b4f238fbd5 | ||
|
|
6e77ce012f | ||
|
|
6fd9729b82 | ||
|
|
c1b0e4f686 | ||
|
|
99af0ce575 | ||
|
|
93bdf382dc | ||
|
|
0c50bcd929 | ||
|
|
d2e60f3110 | ||
|
|
55e0df638b | ||
|
|
72e8ef707b | ||
|
|
8d5525df85 | ||
|
|
d1b7de066e | ||
|
|
16c2af26b6 | ||
|
|
07df6630f1 | ||
|
|
31bbe63ebf | ||
|
|
f1e311ef7d | ||
|
|
357d94328c | ||
|
|
f41c524ca9 | ||
|
|
7b5b6d239e | ||
|
|
a50b051538 | ||
|
|
a692fe88cd | ||
|
|
cf823b47ed | ||
|
|
6050e78143 | ||
|
|
4de0ac5388 | ||
|
|
8dd246fb2c | ||
|
|
8dc9f39570 | ||
|
|
e92f4b1a7c | ||
|
|
7155aa6f1d | ||
|
|
3079b8dde8 | ||
|
|
02fb07aa85 | ||
|
|
17fd0e9ce4 | ||
|
|
fc9ed51a3a | ||
|
|
f89d080191 | ||
|
|
f45283113b | ||
|
|
c409265f9d | ||
|
|
b7e1b629e9 | ||
|
|
6b1ef6ad02 | ||
|
|
8f3a8710ca | ||
|
|
bbeea7dd99 | ||
|
|
0c4cec81b2 | ||
|
|
0de4e03305 | ||
|
|
5697dc8f80 | ||
|
|
c7440f2f36 | ||
|
|
b3c12e8d55 | ||
|
|
19a00efd98 | ||
|
|
e5d4ba944f | ||
|
|
e53f4cce8a | ||
|
|
48b241d52d | ||
|
|
a20adf6924 | ||
|
|
b1439fa810 | ||
|
|
9ac4fea3b0 | ||
|
|
670fb1977b | ||
|
|
b06253f597 | ||
|
|
4e2e8d118c | ||
|
|
b23a2aebf0 | ||
|
|
3e7f74caf1 | ||
|
|
061f0b454c | ||
|
|
82868270dc | ||
|
|
a177131e71 | ||
|
|
6192c80307 | ||
|
|
e9a9c23a6d | ||
|
|
b7041a91cd | ||
|
|
ee27a10d49 | ||
|
|
c5d62ca899 | ||
|
|
308171a2ef | ||
|
|
b9d042d2d2 | ||
|
|
51c5bf8aa7 | ||
|
|
0cf58a4755 | ||
|
|
57d23e5062 | ||
|
|
88885a82ae | ||
|
|
e96bb5fed1 | ||
|
|
e00ffb3e51 | ||
|
|
29dec8ea7c | ||
|
|
fe00929980 | ||
|
|
8430e2d4de | ||
|
|
961a24ac3c | ||
|
|
14e7962b30 | ||
|
|
e9519f5e6a | ||
|
|
0324f05566 | ||
|
|
1c45b31cc6 | ||
|
|
33504deb83 | ||
|
|
6e6ba4f064 | ||
|
|
2f798dc842 | ||
|
|
777884558a | ||
|
|
348e91e02f | ||
|
|
10ab09069d | ||
|
|
990fdaed07 | ||
|
|
f7e1da0cfb | ||
|
|
ac472bb111 | ||
|
|
cda42fdc77 | ||
|
|
223bdd1173 | ||
|
|
9603f61cda | ||
|
|
3e59374ccd | ||
|
|
7648354b80 | ||
|
|
0f76f393ed | ||
|
|
41c8a10740 | ||
|
|
fa935398b3 | ||
|
|
d4657ce265 | ||
|
|
9c3f82fbd7 | ||
|
|
51bb0fe2d2 | ||
|
|
cc2669fedf | ||
|
|
08a5424f60 | ||
|
|
5fba5c2e3a | ||
|
|
5aed216f47 | ||
|
|
5fcec401bd | ||
|
|
e488529430 | ||
|
|
2752394064 | ||
|
|
e554086467 | ||
|
|
485b5dea69 | ||
|
|
7b9929e309 | ||
|
|
0878e52087 | ||
|
|
393852a414 | ||
|
|
32a131ea70 | ||
|
|
a81cc2ac7e | ||
|
|
0710ab3955 | ||
|
|
dbf542c008 | ||
|
|
0ae06ebea6 | ||
|
|
c5371d7618 | ||
|
|
7702c7f760 | ||
|
|
563990e64e | ||
|
|
4f9adf902b | ||
|
|
392b7d3249 | ||
|
|
6a89177036 | ||
|
|
50e3990f2a | ||
|
|
528bd520b8 | ||
|
|
443d342905 | ||
|
|
d834917bca | ||
|
|
fcea67a3c2 | ||
|
|
e252013bee | ||
|
|
eff696a3b0 | ||
|
|
315ab68bd1 | ||
|
|
06eb364890 | ||
|
|
ebcd96a9c1 | ||
|
|
a90b492bff | ||
|
|
8c870f14c1 | ||
|
|
786b220e46 | ||
|
|
52c7a6352b | ||
|
|
0a5b0304ad | ||
|
|
602c716f76 | ||
|
|
0ffdaff795 | ||
|
|
6f1ae47a37 | ||
|
|
c16ae673e3 | ||
|
|
89a2c4a783 | ||
|
|
f5efc5224f | ||
|
|
b951fb9fe1 | ||
|
|
d1060f63b7 | ||
|
|
2fae4fbfa6 | ||
|
|
0824b43ecd | ||
|
|
f4b0229467 | ||
|
|
4990fdaba6 | ||
|
|
78b07da7ae | ||
|
|
394f5403a0 | ||
|
|
6137e3add0 | ||
|
|
9ce6dadd48 | ||
|
|
fa7b8028af | ||
|
|
1c9e159ffe | ||
|
|
7740e853f4 | ||
|
|
0aa8d4d88a | ||
|
|
3ab17f5e04 | ||
|
|
60daa9be2b | ||
|
|
3c69283e0b | ||
|
|
6ce1aa0ffe | ||
|
|
1673b04a23 | ||
|
|
b257bab294 | ||
|
|
1fa894c6b9 | ||
|
|
7089b2cff0 | ||
|
|
5d88bae6df | ||
|
|
f4a7d2cba2 | ||
|
|
caa51543a8 | ||
|
|
1f8fb63581 | ||
|
|
cac6687a6a | ||
|
|
edf83e5d1f | ||
|
|
e53af0ed74 | ||
|
|
d8f67a62cc | ||
|
|
1560a6ea38 | ||
|
|
3f6b6fbe93 | ||
|
|
60dc75f4f4 | ||
|
|
bb11cbee94 | ||
|
|
231fc4d781 | ||
|
|
d27ec1d3bd | ||
|
|
8b72343753 | ||
|
|
a9602d1b34 | ||
|
|
eb4fd07b5a | ||
|
|
4f4db8799c | ||
|
|
2eb782130a | ||
|
|
d20da589dd | ||
|
|
3552beb08b | ||
|
|
60c9d88951 | ||
|
|
527a6edb3e | ||
|
|
3b3ae10c5b | ||
|
|
c3247876b1 | ||
|
|
fcdc7614d7 | ||
|
|
88a94bbe7f | ||
|
|
79b2eb993e | ||
|
|
faba610060 | ||
|
|
9c547117ec | ||
|
|
e7896ce1ce | ||
|
|
db5a8eaa54 | ||
|
|
456b97b9fa | ||
|
|
f2bc1b43de | ||
|
|
28943c415b | ||
|
|
c9cd62c1b5 | ||
|
|
cc7ae0a7fe | ||
|
|
49a11118ee | ||
|
|
99ef5765f5 | ||
|
|
840ad09105 | ||
|
|
8a0b4729cd | ||
|
|
305950acf9 | ||
|
|
d4d9cbd52d | ||
|
|
65100aa371 | ||
|
|
f385b0d537 | ||
|
|
7143164de9 | ||
|
|
74e0060526 | ||
|
|
aeaab5204b | ||
|
|
389e928176 | ||
|
|
dd27fe612c | ||
|
|
c04144fb39 | ||
|
|
b5ef63b550 | ||
|
|
ab072288ad | ||
|
|
9e08a0d8c5 | ||
|
|
23d32fec25 | ||
|
|
3a1c4de359 | ||
|
|
4a6f93f895 | ||
|
|
75f4e51a1a | ||
|
|
2e3ab09a52 | ||
|
|
d06dd11291 | ||
|
|
feb79ce8ea | ||
|
|
c7513e1776 | ||
|
|
f48ae2195a | ||
|
|
a947f3b755 | ||
|
|
210d04b05f | ||
|
|
1942f47bcf | ||
|
|
6e0eb24b7b | ||
|
|
b54b3fcf29 | ||
|
|
4bba12dbee | ||
|
|
fa28c69b55 | ||
|
|
f1850c6156 | ||
|
|
7bed6ec213 | ||
|
|
d987b06112 | ||
|
|
4b29d11f74 | ||
|
|
61cb9cc547 | ||
|
|
91d63fa0ae | ||
|
|
59da54f0fd | ||
|
|
912daba464 | ||
|
|
a7f482142e | ||
|
|
87fe8971ed | ||
|
|
bb696c61ac | ||
|
|
212cd31641 | ||
|
|
a496d41ac7 | ||
|
|
a0aca32d35 | ||
|
|
8019ed0b59 | ||
|
|
7417af566e | ||
|
|
17eca872f1 | ||
|
|
637df34074 | ||
|
|
b3cafaa61d | ||
|
|
1a195c1ee0 | ||
|
|
9e79829ab8 | ||
|
|
6f5ba815f0 | ||
|
|
862d74c6ff | ||
|
|
ce47ef777f | ||
|
|
720769743e | ||
|
|
721e652427 | ||
|
|
732ae085dc | ||
|
|
2a3c0587ed | ||
|
|
afb0efe139 | ||
|
|
a30bf0f61a | ||
|
|
a13344aefd | ||
|
|
4a7802b82b | ||
|
|
9ded3f59ed | ||
|
|
02a0bd53e8 | ||
|
|
76c13682e4 | ||
|
|
5f8d6d5bb5 | ||
|
|
24b1316f8b | ||
|
|
b608652f7e | ||
|
|
d0347999e6 | ||
|
|
9b63d7d513 | ||
|
|
860fe3d4d7 | ||
|
|
79b36622aa | ||
|
|
603fc9dbe0 | ||
|
|
7eb9d11fa2 | ||
|
|
0a6b3c2d4b | ||
|
|
c02719a4c8 | ||
|
|
20d45c853d | ||
|
|
75f3194882 | ||
|
|
d1b7eede73 | ||
|
|
dde94c349e | ||
|
|
0820bef83e | ||
|
|
73db2056a3 | ||
|
|
a6d41f7a75 | ||
|
|
a11a6d9b34 | ||
|
|
65bf87c4a6 | ||
|
|
d419d8a417 | ||
|
|
7b1ea8aa2a | ||
|
|
64fc9df55b | ||
|
|
f4990be635 | ||
|
|
71c9b82d5e | ||
|
|
ed84ad426b | ||
|
|
bf24ca6741 | ||
|
|
80955cf224 | ||
|
|
eb5b8163f9 | ||
|
|
d7bfa3617f | ||
|
|
d54152f057 | ||
|
|
336a743068 | ||
|
|
01553cb8f7 | ||
|
|
955b84369e | ||
|
|
24810fd216 | ||
|
|
b904ca7ec3 | ||
|
|
2f8b5057c1 | ||
|
|
0cbde329bd | ||
|
|
56d35fd969 | ||
|
|
5e388aa257 | ||
|
|
823e63252b | ||
|
|
b247ef2d89 | ||
|
|
886039ab68 | ||
|
|
7aaa1ad229 | ||
|
|
27535adaa9 | ||
|
|
6e1a85e781 | ||
|
|
7e33b49405 | ||
|
|
45e119b7d2 | ||
|
|
987b0ac639 | ||
|
|
a4eb58bc33 | ||
|
|
306a2e07e1 | ||
|
|
b285c91189 | ||
|
|
825a2ae17e | ||
|
|
b1b8ff96bb | ||
|
|
b9b39067e0 | ||
|
|
1b35c60118 | ||
|
|
8c138d7844 | ||
|
|
447d13e82b | ||
|
|
3d90128b16 | ||
|
|
41b9ce962a | ||
|
|
a07c8f9247 | ||
|
|
bdb6e538ac | ||
|
|
10b62203a3 | ||
|
|
5044553875 | ||
|
|
09fa6e9c54 | ||
|
|
e6d35a86f3 | ||
|
|
fad3139684 | ||
|
|
1a4865d8fe | ||
|
|
2bd76c2d86 | ||
|
|
2c75e81cde | ||
|
|
3c017d7d37 | ||
|
|
b797818c8b | ||
|
|
41f7a9fb39 | ||
|
|
e7edf48b8d | ||
|
|
88ce565d7d | ||
|
|
42306f8ed4 | ||
|
|
982f1ff8ff | ||
|
|
85594d2856 | ||
|
|
6783ce354c | ||
|
|
cb28551c3e | ||
|
|
8123f8221a | ||
|
|
c2a9dcb897 | ||
|
|
b51ffb25fe | ||
|
|
ea8166cf62 | ||
|
|
0911e4e78a | ||
|
|
a3911962c7 | ||
|
|
3690a875f2 | ||
|
|
40c3252951 | ||
|
|
45a0d7e3f4 | ||
|
|
7d347f2afd | ||
|
|
455c125685 | ||
|
|
f05aa59a26 | ||
|
|
7ffa2b1bea | ||
|
|
a3dcbef52b | ||
|
|
e13eb463e0 | ||
|
|
6cef6bca1f | ||
|
|
d4ab4456d0 | ||
|
|
8448745891 | ||
|
|
35a0e27e88 | ||
|
|
f1df456412 | ||
|
|
6c4187b4c9 | ||
|
|
a46cd31c83 | ||
|
|
b643da672a | ||
|
|
0ce5cbc925 | ||
|
|
e4291accaa | ||
|
|
a9e2b5463d | ||
|
|
2b3a190501 | ||
|
|
086035bede | ||
|
|
4d7d1ab871 | ||
|
|
22a432b587 | ||
|
|
286c8ac306 | ||
|
|
14d6c0ee9a | ||
|
|
e002bb98e1 | ||
|
|
cdc63fc21a | ||
|
|
1e0306a7c9 | ||
|
|
ec04239a6f | ||
|
|
1116fc1e5e | ||
|
|
97483389cb | ||
|
|
3682dd9ae0 | ||
|
|
38a1ea7b99 | ||
|
|
213ab6eb36 | ||
|
|
19a6303205 | ||
|
|
c9f0f2ec22 | ||
|
|
daef205d04 | ||
|
|
0d2f2074cb | ||
|
|
0d118ea88a | ||
|
|
dd1b2c3208 | ||
|
|
d476ce138b | ||
|
|
b7d9ed39c2 | ||
|
|
ada561507a | ||
|
|
48688a2dbc | ||
|
|
8de7487ffd | ||
|
|
26cab92853 | ||
|
|
9f18db936f | ||
|
|
be410798d0 | ||
|
|
2c428c1bd7 | ||
|
|
5e202882c9 | ||
|
|
16591dbcc5 | ||
|
|
14bc79b1b8 | ||
|
|
a51eaab41a | ||
|
|
c8ad738d4e | ||
|
|
18a18f7f10 | ||
|
|
e37a9c67d8 | ||
|
|
e4c1c566d4 | ||
|
|
c9ebe22dd0 | ||
|
|
29e7e2890b | ||
|
|
f261344af9 | ||
|
|
b337ae979d | ||
|
|
207c05e2e9 | ||
|
|
956fde680a | ||
|
|
3ee8b91dee | ||
|
|
d849a118c2 | ||
|
|
9f35a8b04e | ||
|
|
67f67925b8 | ||
|
|
63df2d99fd | ||
|
|
46a289c796 | ||
|
|
c17a5d1278 | ||
|
|
57295db6c7 | ||
|
|
f698c360f5 | ||
|
|
fcf96afeb2 | ||
|
|
d7f3dc097e | ||
|
|
0c323c00b7 | ||
|
|
bec199165a | ||
|
|
80b2b54f41 | ||
|
|
0a46593a38 | ||
|
|
3ac8dfa8b7 | ||
|
|
3723a9591e | ||
|
|
5ee3764068 | ||
|
|
7149676a0b | ||
|
|
386b3e971b | ||
|
|
058f9c2056 | ||
|
|
e7bbbd07df | ||
|
|
cfc1dffd14 | ||
|
|
f99cdd5afe | ||
|
|
b994a10148 | ||
|
|
196080ac0f | ||
|
|
e49c1ba04e | ||
|
|
e53a56af53 | ||
|
|
df6c92e506 | ||
|
|
9423da6a4d | ||
|
|
2ac614f94d | ||
|
|
fc48c675e1 | ||
|
|
9ae8cffe92 | ||
|
|
009522483e | ||
|
|
3a713f8075 | ||
|
|
deec94bf4a | ||
|
|
6765de0c65 | ||
|
|
c8458f779c | ||
|
|
fb6eace960 | ||
|
|
3d3bf48b9a | ||
|
|
8405400213 | ||
|
|
202c36682b | ||
|
|
2dffa66ef7 | ||
|
|
67a1e576db | ||
|
|
827cbbba31 | ||
|
|
cec338c647 | ||
|
|
5b1c9ffe2d | ||
|
|
944f2cdf8d | ||
|
|
b2ec30bfe3 | ||
|
|
0b4463911f | ||
|
|
9974e02bc0 | ||
|
|
c47f6becf2 | ||
|
|
108c788d37 | ||
|
|
bd11f8643d | ||
|
|
d59da45c98 | ||
|
|
6ef73c4282 | ||
|
|
60030b5631 | ||
|
|
147edec689 | ||
|
|
1d0c7360ef | ||
|
|
e808e596ab | ||
|
|
8bc0ed5a5a | ||
|
|
97ab252c0c | ||
|
|
9c15560115 | ||
|
|
d195d4bf55 | ||
|
|
f55a1344ad | ||
|
|
fbd74f00cf | ||
|
|
3cdc486039 | ||
|
|
fb762aa6b0 | ||
|
|
5b03d4b08d | ||
|
|
e5b940c6cb | ||
|
|
bec75e8c14 |
124
CMakeFilters.cmake
Normal file
124
CMakeFilters.cmake
Normal file
@@ -0,0 +1,124 @@
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Options for HDF5 Filters
|
||||
#-----------------------------------------------------------------------------
|
||||
MACRO (HDF5_SETUP_FILTERS FILTER)
|
||||
option (HDF5_USE_FILTER_${FILTER} "Use the ${FILTER} Filter" ON)
|
||||
if (HDF5_USE_FILTER_${FILTER})
|
||||
set (H5_HAVE_FILTER_${FILTER} 1)
|
||||
set (FILTERS "${FILTERS} ${FILTER}")
|
||||
endif (HDF5_USE_FILTER_${FILTER})
|
||||
# message (STATUS "Filter ${FILTER} is ${HDF5_USE_FILTER_${FILTER}}")
|
||||
ENDMACRO (HDF5_SETUP_FILTERS)
|
||||
|
||||
HDF5_SETUP_FILTERS (SHUFFLE)
|
||||
HDF5_SETUP_FILTERS (FLETCHER32)
|
||||
HDF5_SETUP_FILTERS (NBIT)
|
||||
HDF5_SETUP_FILTERS (SCALEOFFSET)
|
||||
|
||||
include (ExternalProject)
|
||||
#option (HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building (NO SVN TGZ)" "NO")
|
||||
set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO SVN TGZ)")
|
||||
set_property (CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO SVN TGZ)
|
||||
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
|
||||
option (ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" 1)
|
||||
option (SZIP_USE_EXTERNAL "Use External Library Building for SZIP" 1)
|
||||
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN")
|
||||
set (ZLIB_URL ${ZLIB_SVN_URL})
|
||||
set (SZIP_URL ${SZIP_SVN_URL})
|
||||
elseif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
|
||||
if (NOT TGZPATH)
|
||||
set (TGZPATH ${HDF5_SOURCE_DIR})
|
||||
endif (NOT TGZPATH)
|
||||
set (ZLIB_URL ${TGZPATH}/${ZLIB_TGZ_NAME})
|
||||
set (SZIP_URL ${TGZPATH}/${SZIP_TGZ_NAME})
|
||||
else (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN")
|
||||
set (ZLIB_USE_EXTERNAL 0)
|
||||
set (SZIP_USE_EXTERNAL 0)
|
||||
endif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN")
|
||||
endif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Option for ZLib support
|
||||
#-----------------------------------------------------------------------------
|
||||
option (HDF5_ENABLE_Z_LIB_SUPPORT "Enable Zlib Filters" OFF)
|
||||
if (HDF5_ENABLE_Z_LIB_SUPPORT)
|
||||
if (NOT H5_ZLIB_HEADER)
|
||||
if (NOT ZLIB_USE_EXTERNAL)
|
||||
find_package (ZLIB NAMES ${ZLIB_PACKAGE_NAME}${HDF_PACKAGE_EXT})
|
||||
if (NOT ZLIB_FOUND)
|
||||
find_package (ZLIB) # Legacy find
|
||||
endif (NOT ZLIB_FOUND)
|
||||
endif (NOT ZLIB_USE_EXTERNAL)
|
||||
if (ZLIB_FOUND)
|
||||
set (H5_HAVE_FILTER_DEFLATE 1)
|
||||
set (H5_HAVE_ZLIB_H 1)
|
||||
set (H5_HAVE_LIBZ 1)
|
||||
set (H5_ZLIB_HEADER "zlib.h")
|
||||
set (ZLIB_INCLUDE_DIR_GEN ${ZLIB_INCLUDE_DIR})
|
||||
set (ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR})
|
||||
else (ZLIB_FOUND)
|
||||
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
|
||||
EXTERNAL_ZLIB_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${LIB_TYPE})
|
||||
set (H5_HAVE_FILTER_DEFLATE 1)
|
||||
set (H5_HAVE_ZLIB_H 1)
|
||||
set (H5_HAVE_LIBZ 1)
|
||||
message (STATUS "Filter ZLIB is built")
|
||||
else (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
|
||||
message (FATAL_ERROR " ZLib is Required for ZLib support in HDF5")
|
||||
endif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
|
||||
endif (ZLIB_FOUND)
|
||||
else (NOT H5_ZLIB_HEADER)
|
||||
# This project is being called from within another and ZLib is already configured
|
||||
set (H5_HAVE_FILTER_DEFLATE 1)
|
||||
set (H5_HAVE_ZLIB_H 1)
|
||||
set (H5_HAVE_LIBZ 1)
|
||||
endif (NOT H5_ZLIB_HEADER)
|
||||
if (H5_HAVE_FILTER_DEFLATE)
|
||||
set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DEFLATE")
|
||||
endif (H5_HAVE_FILTER_DEFLATE)
|
||||
set (LINK_LIBS ${LINK_LIBS} ${ZLIB_LIBRARIES})
|
||||
INCLUDE_DIRECTORIES (${ZLIB_INCLUDE_DIRS})
|
||||
message (STATUS "Filter ZLIB is ON")
|
||||
endif (HDF5_ENABLE_Z_LIB_SUPPORT)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Option for SzLib support
|
||||
#-----------------------------------------------------------------------------
|
||||
option (HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" OFF)
|
||||
if (HDF5_ENABLE_SZIP_SUPPORT)
|
||||
option (HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" OFF)
|
||||
if (NOT SZIP_USE_EXTERNAL)
|
||||
find_package (SZIP NAMES ${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT})
|
||||
if (NOT SZIP_FOUND)
|
||||
find_package (SZIP) # Legacy find
|
||||
endif (NOT SZIP_FOUND)
|
||||
endif (NOT SZIP_USE_EXTERNAL)
|
||||
if (SZIP_FOUND)
|
||||
set (H5_HAVE_FILTER_SZIP 1)
|
||||
set (H5_HAVE_SZLIB_H 1)
|
||||
set (H5_HAVE_LIBSZ 1)
|
||||
set (SZIP_INCLUDE_DIR_GEN ${SZIP_INCLUDE_DIR})
|
||||
set (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIR})
|
||||
else (SZIP_FOUND)
|
||||
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
|
||||
EXTERNAL_SZIP_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${LIB_TYPE} ${HDF5_ENABLE_SZIP_ENCODING})
|
||||
set (H5_HAVE_FILTER_SZIP 1)
|
||||
set (H5_HAVE_SZLIB_H 1)
|
||||
set (H5_HAVE_LIBSZ 1)
|
||||
message (STATUS "Filter SZIP is built")
|
||||
else (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
|
||||
message (FATAL_ERROR "SZIP is Required for SZIP support in HDF5")
|
||||
endif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
|
||||
endif (SZIP_FOUND)
|
||||
set (LINK_LIBS ${LINK_LIBS} ${SZIP_LIBRARIES})
|
||||
INCLUDE_DIRECTORIES (${SZIP_INCLUDE_DIRS})
|
||||
message (STATUS "Filter SZIP is ON")
|
||||
if (H5_HAVE_FILTER_SZIP)
|
||||
set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DECODE")
|
||||
endif (H5_HAVE_FILTER_SZIP)
|
||||
if (HDF5_ENABLE_SZIP_ENCODING)
|
||||
set (H5_HAVE_SZIP_ENCODER 1)
|
||||
set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} ENCODE")
|
||||
endif (HDF5_ENABLE_SZIP_ENCODING)
|
||||
endif (HDF5_ENABLE_SZIP_SUPPORT)
|
||||
573
CMakeInstallation.cmake
Normal file
573
CMakeInstallation.cmake
Normal file
@@ -0,0 +1,573 @@
|
||||
include (${HDF_RESOURCES_DIR}/CMakePackageConfigHelpers.cmake)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Check for Installation Utilities
|
||||
#-----------------------------------------------------------------------------
|
||||
if (WIN32)
|
||||
set (PF_ENV_EXT "(x86)")
|
||||
find_program (NSIS_EXECUTABLE NSIS.exe PATHS "$ENV{ProgramFiles}\\NSIS" "$ENV{ProgramFiles${PF_ENV_EXT}}\\NSIS")
|
||||
if(NOT CPACK_WIX_ROOT)
|
||||
file(TO_CMAKE_PATH "$ENV{WIX}" CPACK_WIX_ROOT)
|
||||
endif()
|
||||
find_program (WIX_EXECUTABLE candle PATHS "${CPACK_WIX_ROOT}/bin")
|
||||
endif (WIN32)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Add file(s) to CMake Install
|
||||
#-----------------------------------------------------------------------------
|
||||
if (NOT HDF5_INSTALL_NO_DEVELOPMENT)
|
||||
install (
|
||||
FILES ${PROJECT_BINARY_DIR}/H5pubconf.h
|
||||
DESTINATION ${HDF5_INSTALL_INCLUDE_DIR}
|
||||
COMPONENT headers
|
||||
)
|
||||
endif (NOT HDF5_INSTALL_NO_DEVELOPMENT)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Add Target(s) to CMake Install for import into other projects
|
||||
#-----------------------------------------------------------------------------
|
||||
if (NOT HDF5_EXTERNALLY_CONFIGURED)
|
||||
install (
|
||||
EXPORT ${HDF5_EXPORTED_TARGETS}
|
||||
DESTINATION ${HDF5_INSTALL_CMAKE_DIR}
|
||||
FILE ${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-targets.cmake
|
||||
COMPONENT configinstall
|
||||
)
|
||||
endif (NOT HDF5_EXTERNALLY_CONFIGURED)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Export all exported targets to the build tree for use by parent project
|
||||
#-----------------------------------------------------------------------------
|
||||
if (NOT HDF5_EXTERNALLY_CONFIGURED)
|
||||
export (
|
||||
TARGETS ${HDF5_LIBRARIES_TO_EXPORT} ${HDF5_LIB_DEPENDENCIES}
|
||||
FILE ${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-targets.cmake
|
||||
)
|
||||
endif (NOT HDF5_EXTERNALLY_CONFIGURED)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Set includes needed for build
|
||||
#-----------------------------------------------------------------------------
|
||||
set (HDF5_INCLUDES_BUILD_TIME
|
||||
${HDF5_SRC_DIR} ${HDF5_CPP_SRC_DIR} ${HDF5_HL_SRC_DIR}
|
||||
${HDF5_TOOLS_SRC_DIR} ${HDF5_BINARY_DIR}
|
||||
)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Set variables needed for installation
|
||||
#-----------------------------------------------------------------------------
|
||||
set (HDF5_VERSION_STRING ${HDF5_PACKAGE_VERSION})
|
||||
set (HDF5_VERSION_MAJOR ${HDF5_PACKAGE_VERSION_MAJOR})
|
||||
set (HDF5_VERSION_MINOR ${HDF5_PACKAGE_VERSION_MINOR})
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Configure the hdf5-config.cmake file for the build directory
|
||||
#-----------------------------------------------------------------------------
|
||||
set (INCLUDE_INSTALL_DIR ${HDF5_INSTALL_INCLUDE_DIR})
|
||||
set (SHARE_INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/${HDF5_INSTALL_CMAKE_DIR}" )
|
||||
set (CURRENT_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}" )
|
||||
configure_package_config_file (
|
||||
${HDF_RESOURCES_DIR}/hdf5-config.cmake.in
|
||||
"${HDF5_BINARY_DIR}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake"
|
||||
INSTALL_DESTINATION "${HDF5_INSTALL_CMAKE_DIR}"
|
||||
PATH_VARS INCLUDE_INSTALL_DIR SHARE_INSTALL_DIR CURRENT_BUILD_DIR
|
||||
INSTALL_PREFIX "${CMAKE_CURRENT_BINARY_DIR}"
|
||||
)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Configure the FindHDF5.cmake file for the install directory
|
||||
#-----------------------------------------------------------------------------
|
||||
if (NOT HDF5_EXTERNALLY_CONFIGURED)
|
||||
configure_file (
|
||||
${HDF_RESOURCES_DIR}/FindHDF5.cmake.in
|
||||
${HDF5_BINARY_DIR}/CMakeFiles/FindHDF5${HDF_PACKAGE_EXT}.cmake @ONLY
|
||||
)
|
||||
install (
|
||||
FILES ${HDF5_BINARY_DIR}/CMakeFiles/FindHDF5${HDF_PACKAGE_EXT}.cmake
|
||||
DESTINATION ${HDF5_INSTALL_CMAKE_DIR}
|
||||
COMPONENT configinstall
|
||||
)
|
||||
endif (NOT HDF5_EXTERNALLY_CONFIGURED)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Configure the hdf5-config.cmake file for the install directory
|
||||
#-----------------------------------------------------------------------------
|
||||
set (INCLUDE_INSTALL_DIR ${HDF5_INSTALL_INCLUDE_DIR})
|
||||
set (SHARE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${HDF5_INSTALL_CMAKE_DIR}" )
|
||||
set (CURRENT_BUILD_DIR "${CMAKE_INSTALL_PREFIX}" )
|
||||
configure_package_config_file (
|
||||
${HDF_RESOURCES_DIR}/hdf5-config.cmake.in
|
||||
"${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake"
|
||||
INSTALL_DESTINATION "${HDF5_INSTALL_CMAKE_DIR}"
|
||||
PATH_VARS INCLUDE_INSTALL_DIR SHARE_INSTALL_DIR CURRENT_BUILD_DIR
|
||||
)
|
||||
|
||||
if (NOT HDF5_EXTERNALLY_CONFIGURED)
|
||||
install (
|
||||
FILES ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake
|
||||
DESTINATION ${HDF5_INSTALL_CMAKE_DIR}
|
||||
COMPONENT configinstall
|
||||
)
|
||||
endif (NOT HDF5_EXTERNALLY_CONFIGURED)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Configure the hdf5-config-version .cmake file for the install directory
|
||||
#-----------------------------------------------------------------------------
|
||||
if (NOT HDF5_EXTERNALLY_CONFIGURED)
|
||||
configure_file (
|
||||
${HDF_RESOURCES_DIR}/hdf5-config-version.cmake.in
|
||||
${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake @ONLY
|
||||
)
|
||||
install (
|
||||
FILES ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake
|
||||
DESTINATION ${HDF5_INSTALL_CMAKE_DIR}
|
||||
COMPONENT configinstall
|
||||
)
|
||||
endif (NOT HDF5_EXTERNALLY_CONFIGURED)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Configure the libhdf5.settings file for the lib info
|
||||
#-----------------------------------------------------------------------------
|
||||
if (H5_WORDS_BIGENDIAN)
|
||||
set (BYTESEX big-endian)
|
||||
else (H5_WORDS_BIGENDIAN)
|
||||
set (BYTESEX little-endian)
|
||||
endif (H5_WORDS_BIGENDIAN)
|
||||
configure_file (
|
||||
${HDF_RESOURCES_DIR}/libhdf5.settings.cmake.in
|
||||
${HDF5_BINARY_DIR}/libhdf5.settings @ONLY
|
||||
)
|
||||
install (
|
||||
FILES ${HDF5_BINARY_DIR}/libhdf5.settings
|
||||
DESTINATION ${HDF5_INSTALL_CMAKE_DIR}
|
||||
COMPONENT libraries
|
||||
)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Create pkgconfig files
|
||||
#-----------------------------------------------------------------------------
|
||||
#foreach (libs ${LINK_LIBS})
|
||||
# set (LIBS "${LIBS} -l${libs}")
|
||||
#endforeach (libs ${LINK_LIBS})
|
||||
#foreach (libs ${HDF5_LIBRARIES_TO_EXPORT})
|
||||
# set (HDF5LIBS "${HDF5LIBS} -l${libs}")
|
||||
#endforeach (libs ${HDF5_LIBRARIES_TO_EXPORT})
|
||||
#configure_file (
|
||||
# ${HDF_RESOURCES_DIR}/libhdf5.pc.in
|
||||
# ${HDF5_BINARY_DIR}/CMakeFiles/libhdf5.pc @ONLY
|
||||
#)
|
||||
#install (
|
||||
# FILES ${HDF5_BINARY_DIR}/CMakeFiles/libhdf5.pc
|
||||
# DESTINATION ${HDF5_INSTALL_LIB_DIR}/pkgconfig
|
||||
#)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Configure the HDF518_Examples.cmake file and the examples
|
||||
#-----------------------------------------------------------------------------
|
||||
option (HDF5_PACK_EXAMPLES "Package the HDF5 Library Examples Compressed File" OFF)
|
||||
if (HDF5_PACK_EXAMPLES)
|
||||
configure_file (
|
||||
${HDF_RESOURCES_DIR}/HDF518_Examples.cmake.in
|
||||
${HDF5_BINARY_DIR}/HDF518_Examples.cmake @ONLY
|
||||
)
|
||||
install (
|
||||
FILES ${HDF5_BINARY_DIR}/HDF518_Examples.cmake
|
||||
DESTINATION ${HDF5_INSTALL_DATA_DIR}
|
||||
COMPONENT hdfdocuments
|
||||
)
|
||||
if (EXISTS "${HDF5_EXAMPLES_COMPRESSED_DIR}/${HDF5_EXAMPLES_COMPRESSED}")
|
||||
install (
|
||||
FILES
|
||||
${HDF5_EXAMPLES_COMPRESSED_DIR}/${HDF5_EXAMPLES_COMPRESSED}
|
||||
${HDF5_SOURCE_DIR}/release_docs/USING_CMake_Examples.txt
|
||||
DESTINATION ${HDF5_INSTALL_DATA_DIR}
|
||||
COMPONENT hdfdocuments
|
||||
)
|
||||
endif (EXISTS "${HDF5_EXAMPLES_COMPRESSED_DIR}/${HDF5_EXAMPLES_COMPRESSED}")
|
||||
endif (HDF5_PACK_EXAMPLES)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Configure the README.txt file for the binary package
|
||||
#-----------------------------------------------------------------------------
|
||||
HDF_README_PROPERTIES(HDF5_BUILD_FORTRAN)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Configure the COPYING.txt file for the windows binary package
|
||||
#-----------------------------------------------------------------------------
|
||||
if (WIN32)
|
||||
configure_file (${HDF5_SOURCE_DIR}/COPYING ${HDF5_BINARY_DIR}/COPYING.txt @ONLY)
|
||||
endif (WIN32)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Add Document File(s) to CMake Install
|
||||
#-----------------------------------------------------------------------------
|
||||
if (NOT HDF5_EXTERNALLY_CONFIGURED)
|
||||
install (
|
||||
FILES
|
||||
${HDF5_SOURCE_DIR}/COPYING
|
||||
DESTINATION ${HDF5_INSTALL_DATA_DIR}
|
||||
COMPONENT hdfdocuments
|
||||
)
|
||||
if (EXISTS "${HDF5_SOURCE_DIR}/release_docs" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/release_docs")
|
||||
set (release_files
|
||||
${HDF5_SOURCE_DIR}/release_docs/USING_HDF5_CMake.txt
|
||||
${HDF5_SOURCE_DIR}/release_docs/COPYING
|
||||
${HDF5_SOURCE_DIR}/release_docs/RELEASE.txt
|
||||
)
|
||||
if (WIN32)
|
||||
set (release_files
|
||||
${release_files}
|
||||
${HDF5_SOURCE_DIR}/release_docs/USING_HDF5_VS.txt
|
||||
)
|
||||
endif (WIN32)
|
||||
if (HDF5_PACK_INSTALL_DOCS)
|
||||
set (release_files
|
||||
${release_files}
|
||||
${HDF5_SOURCE_DIR}/release_docs/INSTALL_CMake.txt
|
||||
${HDF5_SOURCE_DIR}/release_docs/HISTORY-1_8.txt
|
||||
${HDF5_SOURCE_DIR}/release_docs/INSTALL
|
||||
)
|
||||
if (WIN32)
|
||||
set (release_files
|
||||
${release_files}
|
||||
${HDF5_SOURCE_DIR}/release_docs/INSTALL_Windows.txt
|
||||
)
|
||||
endif (WIN32)
|
||||
if (CYGWIN)
|
||||
set (release_files
|
||||
${release_files}
|
||||
${HDF5_SOURCE_DIR}/release_docs/INSTALL_Cygwin.txt
|
||||
)
|
||||
endif (CYGWIN)
|
||||
if (HDF5_ENABLE_PARALLEL)
|
||||
set (release_files
|
||||
${release_files}
|
||||
${HDF5_SOURCE_DIR}/release_docs/INSTALL_parallel
|
||||
)
|
||||
endif (HDF5_ENABLE_PARALLEL)
|
||||
endif (HDF5_PACK_INSTALL_DOCS)
|
||||
install (
|
||||
FILES ${release_files}
|
||||
DESTINATION ${HDF5_INSTALL_DATA_DIR}
|
||||
COMPONENT hdfdocuments
|
||||
)
|
||||
endif (EXISTS "${HDF5_SOURCE_DIR}/release_docs" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/release_docs")
|
||||
endif (NOT HDF5_EXTERNALLY_CONFIGURED)
|
||||
|
||||
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
if (CMAKE_HOST_UNIX)
|
||||
set (CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/HDF_Group/${HDF5_PACKAGE_NAME}/${HDF5_PACKAGE_VERSION}"
|
||||
CACHE PATH "Install path prefix, prepended onto install directories." FORCE)
|
||||
else (CMAKE_HOST_UNIX)
|
||||
GetDefaultWindowsPrefixBase(CMAKE_GENERIC_PROGRAM_FILES)
|
||||
set (CMAKE_INSTALL_PREFIX
|
||||
"${CMAKE_GENERIC_PROGRAM_FILES}/HDF_Group/${HDF5_PACKAGE_NAME}/${HDF5_PACKAGE_VERSION}"
|
||||
CACHE PATH "Install path prefix, prepended onto install directories." FORCE)
|
||||
set (CMAKE_GENERIC_PROGRAM_FILES)
|
||||
endif (CMAKE_HOST_UNIX)
|
||||
endif (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Set the cpack variables
|
||||
#-----------------------------------------------------------------------------
|
||||
if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
|
||||
set (CPACK_PACKAGE_VENDOR "HDF_Group")
|
||||
set (CPACK_PACKAGE_NAME "${HDF5_PACKAGE_NAME}")
|
||||
if (CDASH_LOCAL)
|
||||
set (CPACK_PACKAGE_VERSION "${HDF5_PACKAGE_VERSION}")
|
||||
else (CDASH_LOCAL)
|
||||
set (CPACK_PACKAGE_VERSION "${HDF5_PACKAGE_VERSION_STRING}")
|
||||
endif (CDASH_LOCAL)
|
||||
set (CPACK_PACKAGE_VERSION_MAJOR "${HDF5_PACKAGE_VERSION_MAJOR}")
|
||||
set (CPACK_PACKAGE_VERSION_MINOR "${HDF5_PACKAGE_VERSION_MINOR}")
|
||||
set (CPACK_PACKAGE_VERSION_PATCH "")
|
||||
if (EXISTS "${HDF5_SOURCE_DIR}/release_docs")
|
||||
set (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/release_docs/RELEASE.txt")
|
||||
set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/release_docs/COPYING")
|
||||
set (CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/release_docs/RELEASE.txt")
|
||||
endif (EXISTS "${HDF5_SOURCE_DIR}/release_docs")
|
||||
set (CPACK_PACKAGE_RELOCATABLE TRUE)
|
||||
set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}")
|
||||
set (CPACK_PACKAGE_ICON "${HDF_RESOURCES_EXT_DIR}/hdf.bmp")
|
||||
|
||||
set (CPACK_GENERATOR "TGZ")
|
||||
if (WIN32)
|
||||
set (CPACK_GENERATOR "ZIP")
|
||||
|
||||
if (NSIS_EXECUTABLE)
|
||||
list (APPEND CPACK_GENERATOR "NSIS")
|
||||
endif (NSIS_EXECUTABLE)
|
||||
# Installers for 32- vs. 64-bit CMake:
|
||||
# - Root install directory (displayed to end user at installer-run time)
|
||||
# - "NSIS package/display name" (text used in the installer GUI)
|
||||
# - Registry key used to store info about the installation
|
||||
set (CPACK_NSIS_PACKAGE_NAME "${HDF5_PACKAGE_STRING}")
|
||||
if (CMAKE_CL_64)
|
||||
set (CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64")
|
||||
set (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION} (Win64)")
|
||||
else (CMAKE_CL_64)
|
||||
set (CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES")
|
||||
set (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")
|
||||
endif (CMAKE_CL_64)
|
||||
# set the install/unistall icon used for the installer itself
|
||||
# There is a bug in NSI that does not handle full unix paths properly.
|
||||
set (CPACK_NSIS_MUI_ICON "${HDF_RESOURCES_EXT_DIR}\\\\hdf.ico")
|
||||
set (CPACK_NSIS_MUI_UNIICON "${HDF_RESOURCES_EXT_DIR}\\\\hdf.ico")
|
||||
# set the package header icon for MUI
|
||||
set (CPACK_PACKAGE_ICON "${HDF_RESOURCES_EXT_DIR}\\\\hdf.bmp")
|
||||
set (CPACK_NSIS_DISPLAY_NAME "${CPACK_NSIS_PACKAGE_NAME}")
|
||||
set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}\\\\${CPACK_PACKAGE_NAME}\\\\${CPACK_PACKAGE_VERSION}")
|
||||
set (CPACK_MONOLITHIC_INSTALL ON)
|
||||
set (CPACK_NSIS_CONTACT "${HDF5_PACKAGE_BUGREPORT}")
|
||||
set (CPACK_NSIS_MODIFY_PATH ON)
|
||||
|
||||
if (WIX_EXECUTABLE)
|
||||
list (APPEND CPACK_GENERATOR "WIX")
|
||||
endif (WIX_EXECUTABLE)
|
||||
#WiX variables
|
||||
set (CPACK_WIX_UNINSTALL "1")
|
||||
# .. variable:: CPACK_WIX_LICENSE_RTF
|
||||
# RTF License File
|
||||
#
|
||||
# If CPACK_RESOURCE_FILE_LICENSE has an .rtf extension it is used as-is.
|
||||
#
|
||||
# If CPACK_RESOURCE_FILE_LICENSE has an .txt extension it is implicitly
|
||||
# converted to RTF by the WiX Generator.
|
||||
# The expected encoding of the .txt file is UTF-8.
|
||||
#
|
||||
# With CPACK_WIX_LICENSE_RTF you can override the license file used by the
|
||||
# WiX Generator in case CPACK_RESOURCE_FILE_LICENSE is in an unsupported
|
||||
# format or the .txt -> .rtf conversion does not work as expected.
|
||||
set (CPACK_RESOURCE_FILE_LICENSE "${HDF5_BINARY_DIR}/COPYING.txt")
|
||||
# .. variable:: CPACK_WIX_PRODUCT_ICON
|
||||
# The Icon shown next to the program name in Add/Remove programs.
|
||||
set(CPACK_WIX_PRODUCT_ICON "${HDF_RESOURCES_EXT_DIR}\\\\hdf.ico")
|
||||
#
|
||||
# .. variable:: CPACK_WIX_UI_BANNER
|
||||
#
|
||||
# The bitmap will appear at the top of all installer pages other than the
|
||||
# welcome and completion dialogs.
|
||||
#
|
||||
# If set, this image will replace the default banner image.
|
||||
#
|
||||
# This image must be 493 by 58 pixels.
|
||||
#
|
||||
# .. variable:: CPACK_WIX_UI_DIALOG
|
||||
#
|
||||
# Background bitmap used on the welcome and completion dialogs.
|
||||
#
|
||||
# If this variable is set, the installer will replace the default dialog
|
||||
# image.
|
||||
#
|
||||
# This image must be 493 by 312 pixels.
|
||||
#
|
||||
elseif (APPLE)
|
||||
list (APPEND CPACK_GENERATOR "DragNDrop")
|
||||
set (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON)
|
||||
set (CPACK_PACKAGING_INSTALL_PREFIX "/${CPACK_PACKAGE_INSTALL_DIRECTORY}")
|
||||
set (CPACK_PACKAGE_ICON "${HDF_RESOURCES_EXT_DIR}/hdf.icns")
|
||||
|
||||
if (HDF5_PACK_MACOSX_BUNDLE)
|
||||
list (APPEND CPACK_GENERATOR "Bundle")
|
||||
set (CPACK_BUNDLE_NAME "${HDF5_PACKAGE_STRING}")
|
||||
set (CPACK_BUNDLE_LOCATION "/") # make sure CMAKE_INSTALL_PREFIX ends in /
|
||||
set (CMAKE_INSTALL_PREFIX "/${CPACK_BUNDLE_NAME}.framework/Versions/${CPACK_PACKAGE_VERSION}/${CPACK_PACKAGE_NAME}/")
|
||||
set (CPACK_BUNDLE_ICON "${HDF_RESOURCES_EXT_DIR}/hdf.icns")
|
||||
set (CPACK_BUNDLE_PLIST "${HDF5_BINARY_DIR}/CMakeFiles/Info.plist")
|
||||
set (CPACK_APPLE_GUI_INFO_STRING "HDF5 (Hierarchical Data Format 5) Software Library and Utilities")
|
||||
set (CPACK_APPLE_GUI_COPYRIGHT "Copyright © 2006-2014 by The HDF Group. All rights reserved.")
|
||||
set (CPACK_SHORT_VERSION_STRING "${CPACK_PACKAGE_VERSION}")
|
||||
set (CPACK_APPLE_GUI_BUNDLE_NAME "${HDF5_PACKAGE_STRING}")
|
||||
set (CPACK_APPLE_GUI_VERSION_STRING "${CPACK_PACKAGE_VERSION_STRING}")
|
||||
set (CPACK_APPLE_GUI_SHORT_VERSION_STRING "${CPACK_PACKAGE_VERSION}")
|
||||
#-----------------------------------------------------------------------------
|
||||
# Configure the Info.plist file for the install bundle
|
||||
#-----------------------------------------------------------------------------
|
||||
configure_file (
|
||||
${HDF_RESOURCES_EXT_DIR}/CPack.Info.plist.in
|
||||
${HDF5_BINARY_DIR}/CMakeFiles/Info.plist @ONLY
|
||||
)
|
||||
configure_file (
|
||||
${HDF_RESOURCES_DIR}/PkgInfo.in
|
||||
${HDF5_BINARY_DIR}/CMakeFiles/PkgInfo @ONLY
|
||||
)
|
||||
configure_file (
|
||||
${HDF_RESOURCES_EXT_DIR}/version.plist.in
|
||||
${HDF5_BINARY_DIR}/CMakeFiles/version.plist @ONLY
|
||||
)
|
||||
install (
|
||||
FILES ${HDF5_BINARY_DIR}/CMakeFiles/PkgInfo
|
||||
${HDF5_BINARY_DIR}/CMakeFiles/version.plist
|
||||
DESTINATION ..
|
||||
)
|
||||
endif (HDF5_PACK_MACOSX_BUNDLE)
|
||||
else (WIN32)
|
||||
list (APPEND CPACK_GENERATOR "STGZ")
|
||||
set (CPACK_PACKAGING_INSTALL_PREFIX "/${CPACK_PACKAGE_INSTALL_DIRECTORY}")
|
||||
set (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON)
|
||||
|
||||
set (CPACK_DEBIAN_PACKAGE_SECTION "Libraries")
|
||||
set (CPACK_DEBIAN_PACKAGE_MAINTAINER "${HDF5_PACKAGE_BUGREPORT}")
|
||||
|
||||
# list (APPEND CPACK_GENERATOR "RPM")
|
||||
set (CPACK_RPM_PACKAGE_RELEASE "1")
|
||||
set (CPACK_RPM_COMPONENT_INSTALL ON)
|
||||
set (CPACK_RPM_PACKAGE_RELOCATABLE ON)
|
||||
set (CPACK_RPM_PACKAGE_LICENSE "BSD-style")
|
||||
set (CPACK_RPM_PACKAGE_GROUP "Development/Libraries")
|
||||
set (CPACK_RPM_PACKAGE_URL "${HDF5_PACKAGE_URL}")
|
||||
set (CPACK_RPM_PACKAGE_SUMMARY "HDF5 is a unique technology suite that makes possible the management of extremely large and complex data collections.")
|
||||
set (CPACK_RPM_PACKAGE_DESCRIPTION
|
||||
"The HDF5 technology suite includes:
|
||||
|
||||
* A versatile data model that can represent very complex data objects and a wide variety of metadata.
|
||||
|
||||
* A completely portable file format with no limit on the number or size of data objects in the collection.
|
||||
|
||||
* A software library that runs on a range of computational platforms, from laptops to massively parallel systems, and implements a high-level API with C, C++, Fortran 90, and Java interfaces.
|
||||
|
||||
* A rich set of integrated performance features that allow for access time and storage space optimizations.
|
||||
|
||||
* Tools and applications for managing, manipulating, viewing, and analyzing the data in the collection.
|
||||
|
||||
The HDF5 data model, file format, API, library, and tools are open and distributed without charge.
|
||||
"
|
||||
)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Configure the spec file for the install RPM
|
||||
#-----------------------------------------------------------------------------
|
||||
# configure_file ("${HDF5_RESOURCES_DIR}/hdf5.spec.in" "${CMAKE_CURRENT_BINARY_DIR}/${HDF5_PACKAGE_NAME}.spec" @ONLY IMMEDIATE)
|
||||
# set (CPACK_RPM_USER_BINARY_SPECFILE "${CMAKE_CURRENT_BINARY_DIR}/${HDF5_PACKAGE_NAME}.spec")
|
||||
endif (WIN32)
|
||||
|
||||
# By default, do not warn when built on machines using only VS Express:
|
||||
if (NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
|
||||
set (CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
|
||||
endif (NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
|
||||
include (InstallRequiredSystemLibraries)
|
||||
|
||||
set (CPACK_INSTALL_CMAKE_PROJECTS "${HDF5_BINARY_DIR};HDF5;ALL;/")
|
||||
|
||||
if (HDF5_PACKAGE_EXTLIBS)
|
||||
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
|
||||
if (ZLIB_FOUND AND ZLIB_USE_EXTERNAL)
|
||||
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;libraries;/")
|
||||
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;headers;/")
|
||||
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;configinstall;/")
|
||||
endif (ZLIB_FOUND AND ZLIB_USE_EXTERNAL)
|
||||
if (SZIP_FOUND AND SZIP_USE_EXTERNAL)
|
||||
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;libraries;/")
|
||||
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;headers;/")
|
||||
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;configinstall;/")
|
||||
endif (SZIP_FOUND AND SZIP_USE_EXTERNAL)
|
||||
endif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
|
||||
endif (HDF5_PACKAGE_EXTLIBS)
|
||||
|
||||
include (CPack)
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Now list the cpack commands
|
||||
#---------------------------------------------------------------------------
|
||||
CPACK_ADD_COMPONENT (hdfapplications
|
||||
DISPLAY_NAME "HDF5 Applications"
|
||||
DEPENDS libraries
|
||||
GROUP Applications
|
||||
)
|
||||
CPACK_ADD_COMPONENT (libraries
|
||||
DISPLAY_NAME "HDF5 Libraries"
|
||||
GROUP Runtime
|
||||
)
|
||||
CPACK_ADD_COMPONENT (headers
|
||||
DISPLAY_NAME "HDF5 Headers"
|
||||
DEPENDS libraries
|
||||
GROUP Development
|
||||
)
|
||||
CPACK_ADD_COMPONENT (hdfdocuments
|
||||
DISPLAY_NAME "HDF5 Documents"
|
||||
GROUP Documents
|
||||
)
|
||||
CPACK_ADD_COMPONENT (configinstall
|
||||
DISPLAY_NAME "HDF5 CMake files"
|
||||
DEPENDS libraries
|
||||
GROUP Development
|
||||
)
|
||||
|
||||
if (HDF5_BUILD_FORTRAN)
|
||||
CPACK_ADD_COMPONENT (fortlibraries
|
||||
DISPLAY_NAME "HDF5 Fortran Libraries"
|
||||
DEPENDS libraries
|
||||
GROUP Runtime
|
||||
)
|
||||
CPACK_ADD_COMPONENT (fortheaders
|
||||
DISPLAY_NAME "HDF5 Fortran Headers"
|
||||
DEPENDS fortlibraries
|
||||
GROUP Development
|
||||
)
|
||||
endif (HDF5_BUILD_FORTRAN)
|
||||
|
||||
if (HDF5_BUILD_CPP_LIB)
|
||||
CPACK_ADD_COMPONENT (cpplibraries
|
||||
DISPLAY_NAME "HDF5 C++ Libraries"
|
||||
DEPENDS libraries
|
||||
GROUP Runtime
|
||||
)
|
||||
CPACK_ADD_COMPONENT (cppheaders
|
||||
DISPLAY_NAME "HDF5 C++ Headers"
|
||||
DEPENDS cpplibraries
|
||||
GROUP Development
|
||||
)
|
||||
endif (HDF5_BUILD_CPP_LIB)
|
||||
|
||||
if (HDF5_BUILD_TOOLS)
|
||||
CPACK_ADD_COMPONENT (toolsapplications
|
||||
DISPLAY_NAME "HDF5 Tools Applications"
|
||||
DEPENDS toolslibraries
|
||||
GROUP Applications
|
||||
)
|
||||
CPACK_ADD_COMPONENT (toolslibraries
|
||||
DISPLAY_NAME "HDF5 Tools Libraries"
|
||||
DEPENDS libraries
|
||||
GROUP Runtime
|
||||
)
|
||||
CPACK_ADD_COMPONENT (toolsheaders
|
||||
DISPLAY_NAME "HDF5 Tools Headers"
|
||||
DEPENDS toolslibraries
|
||||
GROUP Development
|
||||
)
|
||||
endif (HDF5_BUILD_TOOLS)
|
||||
|
||||
if (HDF5_BUILD_HL_LIB)
|
||||
CPACK_ADD_COMPONENT (hllibraries
|
||||
DISPLAY_NAME "HDF5 HL Libraries"
|
||||
DEPENDS libraries
|
||||
GROUP Runtime
|
||||
)
|
||||
CPACK_ADD_COMPONENT (hlheaders
|
||||
DISPLAY_NAME "HDF5 HL Headers"
|
||||
DEPENDS hllibraries
|
||||
GROUP Development
|
||||
)
|
||||
CPACK_ADD_COMPONENT (hltoolsapplications
|
||||
DISPLAY_NAME "HDF5 HL Tools Applications"
|
||||
DEPENDS hllibraries
|
||||
GROUP Applications
|
||||
)
|
||||
CPACK_ADD_COMPONENT (hlcpplibraries
|
||||
DISPLAY_NAME "HDF5 HL C++ Libraries"
|
||||
DEPENDS hllibraries
|
||||
GROUP Runtime
|
||||
)
|
||||
CPACK_ADD_COMPONENT (hlcppheaders
|
||||
DISPLAY_NAME "HDF5 HL C++ Headers"
|
||||
DEPENDS hlcpplibraries
|
||||
GROUP Development
|
||||
)
|
||||
CPACK_ADD_COMPONENT (hlfortlibraries
|
||||
DISPLAY_NAME "HDF5 HL Fortran Libraries"
|
||||
DEPENDS fortlibraries
|
||||
GROUP Runtime
|
||||
)
|
||||
endif (HDF5_BUILD_HL_LIB)
|
||||
|
||||
endif (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
|
||||
1418
CMakeLists.txt
1418
CMakeLists.txt
File diff suppressed because it is too large
Load Diff
8
COPYING
8
COPYING
@@ -4,7 +4,7 @@ HDF5 (Hierarchical Data Format 5) Software Library and Utilities
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
HDF5 (Hierarchical Data Format 5) Software Library and Utilities
|
||||
Copyright 2006-2012 by The HDF Group.
|
||||
Copyright 2006-2014 by The HDF Group.
|
||||
|
||||
NCSA HDF5 (Hierarchical Data Format 5) Software Library and Utilities
|
||||
Copyright 1998-2006 by the Board of Trustees of the University of Illinois.
|
||||
@@ -87,6 +87,12 @@ and/or accompanying materials:
|
||||
opinions of authors expressed herein do not necessarily state or reflect
|
||||
those of the United States Government or the University of California,
|
||||
and shall not be used for advertising or product endorsement purposes.
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
HDF5 is available with the SZIP compression library but SZIP is not part
|
||||
of HDF5 and has separate copyright and license terms. See “Szip Compression
|
||||
in HDF Products” (www.hdfgroup.org/doc_resource/SZIP/) for further details.
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -4,26 +4,28 @@
|
||||
## # The following are required to uses Dart and the Cdash dashboard
|
||||
## ENABLE_TESTING()
|
||||
## INCLUDE(CTest)
|
||||
SET (CTEST_PROJECT_NAME "HDF5")
|
||||
SET (CTEST_NIGHTLY_START_TIME "18:00:00 CST")
|
||||
set (CTEST_PROJECT_NAME "HDF5")
|
||||
set (CTEST_NIGHTLY_START_TIME "18:00:00 CST")
|
||||
|
||||
SET (CTEST_DROP_METHOD "http")
|
||||
IF (CDASH_LOCAL)
|
||||
SET (CTEST_DROP_SITE "nei.hdfgroup.uiuc.edu")
|
||||
SET (CTEST_DROP_LOCATION "/cdash/submit.php?project=HDF5+Trunk")
|
||||
ELSE (CDASH_LOCAL)
|
||||
SET (CTEST_DROP_SITE "cdash.hdfgroup.uiuc.edu")
|
||||
SET (CTEST_DROP_LOCATION "/submit.php?project=HDF5+Trunk")
|
||||
ENDIF (CDASH_LOCAL)
|
||||
SET (CTEST_DROP_SITE_CDASH TRUE)
|
||||
set (CTEST_DROP_METHOD "http")
|
||||
if (CDASH_LOCAL)
|
||||
set (CTEST_DROP_SITE "72.36.68.252")
|
||||
set (CTEST_DROP_LOCATION "/submit.php?project=HDF5Trunk")
|
||||
else (CDASH_LOCAL)
|
||||
set (CTEST_DROP_SITE "cdash.hdfgroup.uiuc.edu")
|
||||
set (CTEST_DROP_LOCATION "/submit.php?project=HDF5+Trunk")
|
||||
endif (CDASH_LOCAL)
|
||||
set (CTEST_DROP_SITE_CDASH TRUE)
|
||||
|
||||
SET (UPDATE_TYPE svn)
|
||||
SET (VALGRIND_COMMAND "/usr/bin/valgrind")
|
||||
SET (VALGRIND_COMMAND_OPTIONS "-v --tool=memcheck --leak-check=full --track-fds=yes --num-callers=50 --show-reachable=yes --track-origins=yes --malloc-fill=0xff --free-fill=0xfe")
|
||||
set (UPDATE_TYPE svn)
|
||||
set (VALGRIND_COMMAND "/usr/bin/valgrind")
|
||||
set (VALGRIND_COMMAND_OPTIONS "-v --tool=memcheck --leak-check=full --track-fds=yes --num-callers=50 --show-reachable=yes --track-origins=yes --malloc-fill=0xff --free-fill=0xfe")
|
||||
set (CTEST_MEMORYCHECK_COMMAND "/usr/bin/valgrind")
|
||||
set (CTEST_MEMORYCHECK_COMMAND_OPTIONS "-v --tool=memcheck --leak-check=full --track-fds=yes --num-callers=50 --show-reachable=yes --track-origins=yes --malloc-fill=0xff --free-fill=0xfe")
|
||||
|
||||
SET (CTEST_TEST_TIMEOUT 3600 CACHE STRING
|
||||
set (CTEST_TEST_TIMEOUT 1200 CACHE STRING
|
||||
"Maximum time allowed before CTest will kill the test.")
|
||||
SET (DART_TESTING_TIMEOUT 3600 CACHE STRING
|
||||
set (DART_TESTING_TIMEOUT 1200 CACHE STRING
|
||||
"Maximum time allowed before CTest will kill the test." FORCE)
|
||||
|
||||
SET(CTEST_SUBMIT_RETRY_DELAY 20 CACHE STRING
|
||||
|
||||
22
Makefile.am
22
Makefile.am
@@ -73,8 +73,8 @@ else
|
||||
endif
|
||||
|
||||
SUBDIRS = src test $(TESTPARALLEL_DIR) tools . $(CXX_DIR) $(FORTRAN_DIR) \
|
||||
$(HDF5_HL_DIR) perform
|
||||
DIST_SUBDIRS = src test testpar tools . c++ fortran hl perform examples
|
||||
$(HDF5_HL_DIR)
|
||||
DIST_SUBDIRS = src test testpar tools . c++ fortran hl examples
|
||||
|
||||
# Some files generated during configure that should be cleaned
|
||||
DISTCLEANFILES=config/stamp1 config/stamp2
|
||||
@@ -93,25 +93,17 @@ lib progs check-p check-s:
|
||||
fi; \
|
||||
done
|
||||
|
||||
# Make all, tests, and (un)install also recurse into perform directory
|
||||
all-local:
|
||||
@cd perform && $(MAKE) $(AM_MAKEFLAGS) all
|
||||
|
||||
# Make all, tests, and (un)install
|
||||
tests:
|
||||
@@SETX@; for d in $(SUBDIRS) perform; do \
|
||||
@@SETX@; for d in $(SUBDIRS); do \
|
||||
if test $$d != .; then \
|
||||
(cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
install-exec-local:
|
||||
@cd perform && $(MAKE) $(AM_MAKEFLAGS) install
|
||||
uninstall-local:
|
||||
@cd perform && $(MAKE) $(AM_MAKEFLAGS) uninstall
|
||||
done
|
||||
|
||||
# Check-clean also recurses into examples directory
|
||||
check-clean:
|
||||
@@SETX@; for d in $(SUBDIRS) examples perform; do \
|
||||
@@SETX@; for d in $(SUBDIRS) examples; do \
|
||||
if test $$d != .; then \
|
||||
(cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
|
||||
fi; \
|
||||
@@ -201,4 +193,4 @@ check-vfd:
|
||||
$(top_builddir)/config.status:
|
||||
|
||||
# Don't include conclude.am in root Makefile; tests target needs to
|
||||
# recurse into perform directory as well as reguar subdirs.
|
||||
# recurse into reguar subdirs.
|
||||
|
||||
429
Makefile.in
429
Makefile.in
@@ -1,9 +1,8 @@
|
||||
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.14.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
|
||||
# Inc.
|
||||
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
@@ -48,6 +47,51 @@
|
||||
$(MAKE) all
|
||||
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
@@ -66,14 +110,19 @@ PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(top_srcdir)/config/commence.am \
|
||||
$(top_srcdir)/configure COPYING bin/COPYING bin/README \
|
||||
bin/compile bin/config.guess bin/config.sub bin/depcomp \
|
||||
bin/install-sh bin/ltmain.sh bin/missing bin/mkinstalldirs
|
||||
DIST_COMMON = $(top_srcdir)/config/commence.am $(srcdir)/Makefile.in \
|
||||
$(srcdir)/Makefile.am $(top_srcdir)/configure \
|
||||
$(am__configure_deps) $(top_srcdir)/bin/mkinstalldirs COPYING \
|
||||
bin/COPYING bin/README bin/compile bin/config.guess \
|
||||
bin/config.sub bin/depcomp bin/install-sh bin/missing \
|
||||
bin/mkinstalldirs bin/ltmain.sh $(top_srcdir)/bin/compile \
|
||||
$(top_srcdir)/bin/config.guess $(top_srcdir)/bin/config.sub \
|
||||
$(top_srcdir)/bin/install-sh $(top_srcdir)/bin/ltmain.sh \
|
||||
$(top_srcdir)/bin/missing
|
||||
subdir = .
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \
|
||||
$(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
@@ -82,35 +131,71 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/src/H5config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_GEN = $(am__v_GEN_$(V))
|
||||
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
AM_V_at = $(am__v_at_$(V))
|
||||
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-dvi-recursive install-exec-recursive \
|
||||
install-html-recursive install-info-recursive \
|
||||
install-pdf-recursive install-ps-recursive install-recursive \
|
||||
installcheck-recursive installdirs-recursive pdf-recursive \
|
||||
ps-recursive uninstall-recursive
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
|
||||
ctags-recursive dvi-recursive html-recursive info-recursive \
|
||||
install-data-recursive install-dvi-recursive \
|
||||
install-exec-recursive install-html-recursive \
|
||||
install-info-recursive install-pdf-recursive \
|
||||
install-ps-recursive install-recursive installcheck-recursive \
|
||||
installdirs-recursive pdf-recursive ps-recursive \
|
||||
tags-recursive uninstall-recursive
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||
distclean-recursive maintainer-clean-recursive
|
||||
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
|
||||
$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
|
||||
distdir dist dist-all distcheck
|
||||
am__recursive_targets = \
|
||||
$(RECURSIVE_TARGETS) \
|
||||
$(RECURSIVE_CLEAN_TARGETS) \
|
||||
$(am__extra_recursive_targets)
|
||||
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
|
||||
cscope distdir dist dist-all distcheck
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
# and print each of them once, without duplicates. Input order is
|
||||
# *not* preserved.
|
||||
am__uniquify_input = $(AWK) '\
|
||||
BEGIN { nonempty = 0; } \
|
||||
{ items[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in items) print i; }; } \
|
||||
'
|
||||
# Make sure the list of sources is unique. This is necessary because,
|
||||
# e.g., the same source file might be shared among _SOURCES variables
|
||||
# for different programs/libraries.
|
||||
am__define_uniq_tagged_files = \
|
||||
list='$(am__tagged_files)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
CSCOPE = cscope
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
am__remove_distdir = \
|
||||
{ test ! -d "$(distdir)" \
|
||||
|| { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -fr "$(distdir)"; }; }
|
||||
if test -d "$(distdir)"; then \
|
||||
find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -rf "$(distdir)" \
|
||||
|| { sleep 5 && rm -rf "$(distdir)"; }; \
|
||||
else :; fi
|
||||
am__post_remove_distdir = $(am__remove_distdir)
|
||||
am__relativize = \
|
||||
dir0=`pwd`; \
|
||||
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
|
||||
@@ -138,9 +223,12 @@ am__relativize = \
|
||||
reldir="$$dir2"
|
||||
DIST_ARCHIVES = $(distdir).tar.gz
|
||||
GZIP_ENV = --best
|
||||
DIST_TARGETS = dist-gzip
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
|
||||
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
ACLOCAL = /home1/packages/automake/automake-1.9.6/bin/aclocal-1.9 -I /afs/ncsa/projects/hdf/packages/libtool_1.5.14/Linux_2.4/share/aclocal
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@
|
||||
AMTAR = @AMTAR@
|
||||
|
||||
@@ -158,12 +246,9 @@ AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
|
||||
AM_MAKEFLAGS = @AM_MAKEFLAGS@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
|
||||
# Set the paths for AFS installs of autotools for Linux machines
|
||||
# Ideally, these tools should never be needed during the build.
|
||||
AUTOCONF = /home1/packages/autoconf/autoconf-2.60/bin/autoconf
|
||||
AUTOHEADER = /home1/packages/autoconf/autoconf-2.60/bin/autoheader
|
||||
AUTOMAKE = /home1/packages/automake/automake-1.9.6/bin/automake-1.9
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BYTESEX = @BYTESEX@
|
||||
CC = @CC@
|
||||
@@ -213,7 +298,6 @@ FC_VERSION = @FC_VERSION@
|
||||
FGREP = @FGREP@
|
||||
FILTERS = @FILTERS@
|
||||
FSEARCH_DIRS = @FSEARCH_DIRS@
|
||||
GPFS = @GPFS@
|
||||
GREP = @GREP@
|
||||
H5_CFLAGS = @H5_CFLAGS@
|
||||
H5_CPPFLAGS = @H5_CPPFLAGS@
|
||||
@@ -227,6 +311,7 @@ H5_VERSION = @H5_VERSION@
|
||||
HADDR_T = @HADDR_T@
|
||||
HAVE_DMALLOC = @HAVE_DMALLOC@
|
||||
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
|
||||
HAVE_PTHREAD = @HAVE_PTHREAD@
|
||||
HDF5_HL = @HDF5_HL@
|
||||
HDF5_INTERFACES = @HDF5_INTERFACES@
|
||||
HDF_CXX = @HDF_CXX@
|
||||
@@ -244,7 +329,6 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INSTRUMENT = @INSTRUMENT@
|
||||
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
|
||||
LARGEFILE = @LARGEFILE@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
@@ -260,7 +344,6 @@ MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MPE = @MPE@
|
||||
MPI_GET_SIZE = @MPI_GET_SIZE@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
@@ -278,7 +361,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PARALLEL = @PARALLEL@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PERL = @PERL@
|
||||
PTHREAD = @PTHREAD@
|
||||
RANLIB = @RANLIB@
|
||||
ROOT = @ROOT@
|
||||
RUNPARALLEL = @RUNPARALLEL@
|
||||
@@ -443,16 +525,16 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *-tmp
|
||||
@BUILD_HDF5_HL_CONDITIONAL_FALSE@HDF5_HL_DIR =
|
||||
@BUILD_HDF5_HL_CONDITIONAL_TRUE@HDF5_HL_DIR = hl
|
||||
SUBDIRS = src test $(TESTPARALLEL_DIR) tools . $(CXX_DIR) $(FORTRAN_DIR) \
|
||||
$(HDF5_HL_DIR) perform
|
||||
$(HDF5_HL_DIR)
|
||||
|
||||
DIST_SUBDIRS = src test testpar tools . c++ fortran hl perform examples
|
||||
DIST_SUBDIRS = src test testpar tools . c++ fortran hl examples
|
||||
|
||||
# Some files generated during configure that should be cleaned
|
||||
DISTCLEANFILES = config/stamp1 config/stamp2
|
||||
all: all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
am--refresh:
|
||||
am--refresh: Makefile
|
||||
@:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/commence.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
@@ -477,6 +559,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
$(top_srcdir)/config/commence.am:
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
$(am__cd) $(srcdir) && $(AUTOCONF)
|
||||
@@ -494,22 +577,25 @@ distclean-libtool:
|
||||
-rm -f libtool config.lt
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@fail= failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
# into them and run 'make' without going through this Makefile.
|
||||
# To change the values of 'make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in 'config.status', edit 'config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run 'make');
|
||||
# (2) otherwise, pass the desired values on the 'make' command line.
|
||||
$(am__recursive_targets):
|
||||
@fail=; \
|
||||
if $(am__make_keepgoing); then \
|
||||
failcom='fail=yes'; \
|
||||
else \
|
||||
failcom='exit 1'; \
|
||||
fi; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
@@ -524,57 +610,12 @@ $(RECURSIVE_TARGETS):
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
$(RECURSIVE_CLEAN_TARGETS):
|
||||
@fail= failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
ID: $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||
tags: tags-recursive
|
||||
TAGS: tags
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
@@ -590,12 +631,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
$(am__define_uniq_tagged_files); \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
@@ -607,15 +643,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
ctags: ctags-recursive
|
||||
|
||||
CTAGS: ctags
|
||||
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
@@ -624,9 +656,31 @@ GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
cscope: cscope.files
|
||||
test ! -s cscope.files \
|
||||
|| $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
|
||||
clean-cscope:
|
||||
-rm -f cscope.files
|
||||
cscope.files: clean-cscope cscopelist
|
||||
cscopelist: cscopelist-recursive
|
||||
|
||||
cscopelist-am: $(am__tagged_files)
|
||||
list='$(am__tagged_files)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
@@ -662,13 +716,10 @@ distdir: $(DISTFILES)
|
||||
done
|
||||
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
$(am__make_dryrun) \
|
||||
|| test -d "$(distdir)/$$subdir" \
|
||||
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
|
||||
$(am__relativize); \
|
||||
new_distdir=$$reldir; \
|
||||
@@ -697,36 +748,42 @@ distdir: $(DISTFILES)
|
||||
|| chmod -R a+r "$(distdir)"
|
||||
dist-gzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-bzip2: distdir
|
||||
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||
$(am__remove_distdir)
|
||||
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-lzma: distdir
|
||||
tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
|
||||
$(am__remove_distdir)
|
||||
dist-lzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-xz: distdir
|
||||
tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
|
||||
$(am__remove_distdir)
|
||||
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-tarZ: distdir
|
||||
@echo WARNING: "Support for shar distribution archives is" \
|
||||
"deprecated." >&2
|
||||
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
|
||||
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||
$(am__remove_distdir)
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-shar: distdir
|
||||
@echo WARNING: "Support for distribution archives compressed with" \
|
||||
"legacy program 'compress' is deprecated." >&2
|
||||
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
|
||||
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||
$(am__remove_distdir)
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-zip: distdir
|
||||
-rm -f $(distdir).zip
|
||||
zip -rq $(distdir).zip $(distdir)
|
||||
$(am__remove_distdir)
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist dist-all: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
dist dist-all:
|
||||
$(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
@@ -737,8 +794,8 @@ distcheck: dist
|
||||
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
|
||||
*.tar.bz2*) \
|
||||
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.lzma*) \
|
||||
lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
|
||||
*.tar.lz*) \
|
||||
lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
|
||||
*.tar.xz*) \
|
||||
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
|
||||
*.tar.Z*) \
|
||||
@@ -748,17 +805,19 @@ distcheck: dist
|
||||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
esac
|
||||
chmod -R a-w $(distdir); chmod a+w $(distdir)
|
||||
mkdir $(distdir)/_build
|
||||
mkdir $(distdir)/_inst
|
||||
chmod -R a-w $(distdir)
|
||||
chmod u+w $(distdir)
|
||||
mkdir $(distdir)/_build $(distdir)/_inst
|
||||
chmod a-w $(distdir)
|
||||
test -d $(distdir)/_build || exit 0; \
|
||||
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||
&& am__cwd=`pwd` \
|
||||
&& $(am__cd) $(distdir)/_build \
|
||||
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
|
||||
&& ../configure \
|
||||
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
--srcdir=.. --prefix="$$dc_install_base" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
@@ -781,13 +840,21 @@ distcheck: dist
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
|
||||
&& cd "$$am__cwd" \
|
||||
|| exit 1
|
||||
$(am__remove_distdir)
|
||||
$(am__post_remove_distdir)
|
||||
@(echo "$(distdir) archives ready for distribution: "; \
|
||||
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
|
||||
distuninstallcheck:
|
||||
@$(am__cd) '$(distuninstallcheck_dir)' \
|
||||
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|
||||
@test -n '$(distuninstallcheck_dir)' || { \
|
||||
echo 'ERROR: trying to run $@ with an empty' \
|
||||
'$$(distuninstallcheck_dir)' >&2; \
|
||||
exit 1; \
|
||||
}; \
|
||||
$(am__cd) '$(distuninstallcheck_dir)' || { \
|
||||
echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
|
||||
exit 1; \
|
||||
}; \
|
||||
test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left after uninstall:" ; \
|
||||
if test -n "$(DESTDIR)"; then \
|
||||
echo " (check DESTDIR support)"; \
|
||||
@@ -805,7 +872,7 @@ distcleancheck: distclean
|
||||
exit 1; } >&2
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile all-local
|
||||
all-am: Makefile
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
install-exec: install-exec-recursive
|
||||
@@ -816,10 +883,15 @@ install-am: all-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
@@ -860,7 +932,7 @@ install-dvi: install-dvi-recursive
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am: install-exec-local
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-recursive
|
||||
|
||||
@@ -901,27 +973,26 @@ ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-local
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
|
||||
install-am install-strip tags-recursive
|
||||
.MAKE: $(am__recursive_targets) install-am install-strip
|
||||
|
||||
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
|
||||
all all-am all-local am--refresh check check-am clean \
|
||||
clean-generic clean-libtool ctags ctags-recursive dist \
|
||||
dist-all dist-bzip2 dist-gzip dist-lzma dist-shar dist-tarZ \
|
||||
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
|
||||
am--refresh check check-am clean clean-cscope clean-generic \
|
||||
clean-libtool cscope cscopelist-am ctags ctags-am dist \
|
||||
dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \
|
||||
dist-xz dist-zip distcheck distclean distclean-generic \
|
||||
distclean-libtool distclean-tags distcleancheck distdir \
|
||||
distuninstallcheck dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-exec-local \
|
||||
install-html install-html-am install-info install-info-am \
|
||||
install-man install-pdf install-pdf-am install-ps \
|
||||
install-ps-am install-strip installcheck installcheck-am \
|
||||
installcheck-local installdirs installdirs-am maintainer-clean \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am install-man \
|
||||
install-pdf install-pdf-am install-ps install-ps-am \
|
||||
install-strip installcheck installcheck-am installcheck-local \
|
||||
installdirs installdirs-am maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic \
|
||||
mostlyclean-libtool mostlyclean-local pdf pdf-am ps ps-am tags \
|
||||
tags-recursive uninstall uninstall-am uninstall-local
|
||||
tags-am uninstall uninstall-am
|
||||
|
||||
|
||||
# List all build rules defined by HDF5 Makefiles as "PHONY" targets here.
|
||||
@@ -946,25 +1017,17 @@ lib progs check-p check-s:
|
||||
fi; \
|
||||
done
|
||||
|
||||
# Make all, tests, and (un)install also recurse into perform directory
|
||||
all-local:
|
||||
@cd perform && $(MAKE) $(AM_MAKEFLAGS) all
|
||||
|
||||
# Make all, tests, and (un)install
|
||||
tests:
|
||||
@@SETX@; for d in $(SUBDIRS) perform; do \
|
||||
@@SETX@; for d in $(SUBDIRS); do \
|
||||
if test $$d != .; then \
|
||||
(cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
install-exec-local:
|
||||
@cd perform && $(MAKE) $(AM_MAKEFLAGS) install
|
||||
uninstall-local:
|
||||
@cd perform && $(MAKE) $(AM_MAKEFLAGS) uninstall
|
||||
done
|
||||
|
||||
# Check-clean also recurses into examples directory
|
||||
check-clean:
|
||||
@@SETX@; for d in $(SUBDIRS) examples perform; do \
|
||||
@@SETX@; for d in $(SUBDIRS) examples; do \
|
||||
if test $$d != .; then \
|
||||
(cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
|
||||
fi; \
|
||||
@@ -1054,7 +1117,7 @@ check-vfd:
|
||||
$(top_builddir)/config.status:
|
||||
|
||||
# Don't include conclude.am in root Makefile; tests target needs to
|
||||
# recurse into perform directory as well as reguar subdirs.
|
||||
# recurse into reguar subdirs.
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
|
||||
15
README.txt
15
README.txt
@@ -1,4 +1,4 @@
|
||||
HDF5 version 1.9.109 currently under development
|
||||
HDF5 version 1.9.215 currently under development
|
||||
Please refer to the release_docs/INSTALL file for installation instructions.
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
@@ -21,20 +21,17 @@ The following mailing lists are currently set up for HDF5 Library users:
|
||||
hdf-forum - For general discussion of the HDF5 library with
|
||||
other users.
|
||||
|
||||
hdf5dev - For discussion of the HDF5 library development
|
||||
with developers and other interested parties.
|
||||
|
||||
To subscribe to a list, send mail to "<list>-subscribe@hdfgroup.org".
|
||||
To subscribe to a list, send mail to "<list>-subscribe@lists.hdfgroup.org".
|
||||
where <list> is the name of the list. For example, send a request
|
||||
to subscribe to the 'news' mail list to the following address:
|
||||
news-subscribe@hdfgroup.org
|
||||
news-subscribe@lists.hdfgroup.org
|
||||
|
||||
Messages to be sent to the list should be sent to "<list>@hdfgroup.org".
|
||||
Messages sent to the list should be addressed to "<list>@lists.hdfgroup.org".
|
||||
|
||||
Periodic code snapshots are provided at the following URL:
|
||||
ftp://ftp.hdfgroup.uiuc.edu/pub/outgoing/hdf5/snapshots
|
||||
Please read the README.txt file in that directory before working with a library
|
||||
snapshot.
|
||||
Please read the README.txt file in that directory before working with a
|
||||
library snapshot.
|
||||
|
||||
The HDF5 website is located at http://hdfgroup.org/HDF5/
|
||||
|
||||
|
||||
22
UserMacros.cmake
Normal file
22
UserMacros.cmake
Normal file
@@ -0,0 +1,22 @@
|
||||
########################################################
|
||||
# Include file for user options
|
||||
########################################################
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
#------------------- E X A M P L E B E G I N--------------------------------
|
||||
#-----------------------------------------------------------------------------
|
||||
# Option to Build with User Defined Values
|
||||
#-----------------------------------------------------------------------------
|
||||
MACRO (MACRO_USER_DEFINED_LIBS)
|
||||
set (USER_DEFINED_VALUE "FALSE")
|
||||
ENDMACRO (MACRO_USER_DEFINED_LIBS)
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
option (BUILD_USER_DEFINED_LIBS "Build With User Defined Values" OFF)
|
||||
if (BUILD_USER_DEFINED_LIBS)
|
||||
MACRO_USER_DEFINED_LIBS ()
|
||||
endif (BUILD_USER_DEFINED_LIBS)
|
||||
#-----------------------------------------------------------------------------
|
||||
#------------------- E X A M P L E E N D -----------------------------------
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
1009
aclocal.m4
vendored
1009
aclocal.m4
vendored
File diff suppressed because it is too large
Load Diff
66
bin/checkapi
66
bin/checkapi
@@ -17,33 +17,51 @@ require 5.003;
|
||||
|
||||
# Purpose: insures that API functions aren't called internally.
|
||||
# Usage: checkapi H5*.c
|
||||
my $comment = 0;
|
||||
while (<>) {
|
||||
my $filename = "";
|
||||
my $lastname = "";
|
||||
|
||||
# Remove comments within the line.
|
||||
s/\/\*.*?\*\///g;
|
||||
if(<>) {
|
||||
while (<>) {
|
||||
if($ARGV =~ /\//) {
|
||||
($filename) = ($ARGV =~ /^.*\/([A-Za-z0-9_]*)\.c$/);
|
||||
} else {
|
||||
($filename) = ($ARGV =~ /([A-Za-z0-9_]*)\.c$/);
|
||||
}
|
||||
|
||||
# Process comment begin and end tokens on this line.
|
||||
$comment-- if /\*\//; # count comment ends
|
||||
next if $comment; # skip line if in comment
|
||||
$comment++ if /\/\*/; # count comment starts
|
||||
s/(.*)\/\*.*/$1/; # remove comments that begin on this line
|
||||
if($filename =~ /H5FDmulti|H5FDstdio/) {
|
||||
if($filename ne $lastname) {
|
||||
print "$ARGV is exempt from checking\n";
|
||||
$lastname = $filename;
|
||||
}
|
||||
} else {
|
||||
# Get rid of comments by removing the inside part.
|
||||
s|/\*.*?\*/||g;
|
||||
if ($in_comment) {
|
||||
if (/\*\//) {
|
||||
s|.*?\*/||;
|
||||
$in_comment = 0;
|
||||
} else {
|
||||
$_="\n";
|
||||
}
|
||||
} elsif (m|/\*|) {
|
||||
s|/\*.*||;
|
||||
$in_comment = 1;
|
||||
}
|
||||
|
||||
# Remove character strings
|
||||
s/\\.//g; # remove escaped characters
|
||||
s/\".*?\"//g; # remove string constants
|
||||
# Remove character strings
|
||||
s/\\.//g; # remove escaped characters
|
||||
s/\".*?\"//g; # remove string constants
|
||||
|
||||
# Disregard the following hits
|
||||
next if /^H5/;
|
||||
next if /^\#/;
|
||||
next if /FUNC_ENTER(_NOINIT)*/;
|
||||
# Disregard the following hits
|
||||
next if /^H5/;
|
||||
next if /^\#/;
|
||||
next if /FUNC_ENTER(_NOINIT)*/;
|
||||
|
||||
next unless /(H5[A-Z]{1,2}[a-z]\w*)/;
|
||||
print "$ARGV:$.: $1\n";
|
||||
} continue {
|
||||
if (eof) {
|
||||
print "$ARGV:$.: bad comment nesting\n" if $comment;
|
||||
$comment = 0;
|
||||
close ARGV; # reset line number
|
||||
}
|
||||
next unless /(H5[A-Z]{1,2}[a-z]\w*)/;
|
||||
print "$ARGV:$.: $1\n";
|
||||
}
|
||||
} continue {
|
||||
close ARGV if eof; # reset line number
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
121
bin/checkposix
121
bin/checkposix
@@ -1,4 +1,4 @@
|
||||
#!/usr/local/bin/perl -w
|
||||
#!/usr/bin/perl -w
|
||||
require 5.003;
|
||||
|
||||
#
|
||||
@@ -27,60 +27,89 @@ require 5.003;
|
||||
# use `next-error' (usually bound to M-`) to find each name
|
||||
# violation.
|
||||
|
||||
while (<>) {
|
||||
if(<>) {
|
||||
if($ARGV =~ /\//) {
|
||||
($filename) = ($ARGV =~ /^.*\/([A-Za-z0-9_]*)\.c$/);
|
||||
} else {
|
||||
($filename) = ($ARGV =~ /([A-Za-z0-9_]*)\.c$/);
|
||||
}
|
||||
|
||||
# Get rid of comments by removing the inside part.
|
||||
s|/\*.*?\*/||g;
|
||||
if ($in_comment) {
|
||||
if (/\*\//) {
|
||||
s|.*?\*/||;
|
||||
$in_comment = 0;
|
||||
} else {
|
||||
$_="\n";
|
||||
}
|
||||
} elsif (m|/\*|) {
|
||||
s|/\*.*||;
|
||||
$in_comment = 1;
|
||||
}
|
||||
if($filename =~ /H5FDmulti|H5FDstdio/) {
|
||||
print "$ARGV is exempt from using Standard library macro wrappers\n";
|
||||
} else {
|
||||
while (<>) {
|
||||
|
||||
# Get rid of string constants if they begin and end on this line.
|
||||
s/([\'\"])([^\1]|\\\1)*?\1/$1$1/g;
|
||||
# Get rid of comments by removing the inside part.
|
||||
s|/\*.*?\*/||g;
|
||||
if ($in_comment) {
|
||||
if (/\*\//) {
|
||||
s|.*?\*/||;
|
||||
$in_comment = 0;
|
||||
} else {
|
||||
$_="\n";
|
||||
}
|
||||
} elsif (m|/\*|) {
|
||||
s|/\*.*||;
|
||||
$in_comment = 1;
|
||||
}
|
||||
|
||||
# Get rid of preprocessor directives
|
||||
s/^\#.*//;
|
||||
# Get rid of string constants if they begin and end on this line.
|
||||
s/([\'\"])([^\1]|\\\1)*?\1/$1$1/g;
|
||||
|
||||
# Now find all function calls on this line
|
||||
while (($name)=/\b([a-gi-z_A-GI-Z]\w*)\s*\(/) {
|
||||
$_ = $';
|
||||
|
||||
# Ignore C statements that look sort of like function
|
||||
# calls.
|
||||
next if $name =~ /^(if|for|return|sizeof|switch|while|void)$/;
|
||||
# Get rid of preprocessor directives
|
||||
s/^\#.*//;
|
||||
|
||||
# Ignore things that get misdetected because of the simplified
|
||||
# parsing that takes place here.
|
||||
next if $name =~ /^int$/;
|
||||
# Skip callbacks invoked as methods in a struct
|
||||
next if $_ =~ /\b(\)?->|\.)\(?([a-z_A-Z]\w*)\s*\(/;
|
||||
|
||||
# These are really HDF5 functions/macros even though they don't
|
||||
# start with `h' or `H'.
|
||||
next if $name =~ /^FUNC_(ENTER|LEAVE)(_INIT)?$/;
|
||||
next if $name =~ /^U?INT(8|16|32|64)(ENCODE|DECODE)$/;
|
||||
next if $name =~ /^(MIN3?|MAX3?|NELMTS|BOUND|CONSTR)$/;
|
||||
next if $name =~ /^IS_H5FD_MPIO$/;
|
||||
next if $name =~ /^addr_defined$/;
|
||||
# Now find all function calls on this line which don't start with 'H'
|
||||
while (($name)=/\b([a-z_A-GI-Z]\w*)\s*\(/) {
|
||||
$_ = $';
|
||||
|
||||
# Ignore C statements that look sort of like function
|
||||
# calls.
|
||||
next if $name =~ /^(if|for|offsetof|return|sizeof|switch|while|void)$/;
|
||||
|
||||
# These functions/macros are exempt.
|
||||
next if $name =~ /^(assert|main|[fs]?printf|va_(start|arg|end))$/;
|
||||
# Ignore things that get misdetected because of the simplified
|
||||
# parsing that takes place here.
|
||||
next if $name =~ /^(int|herr_t|_term_interface)$/;
|
||||
|
||||
# These are MPI function calls. Ignore them.
|
||||
next if $name =~ /^MPI_/;
|
||||
# These are really HDF5 functions/macros even though they don't
|
||||
# start with `h' or `H'.
|
||||
next if $name =~ /^FUNC_(ENTER|LEAVE)(_(NO)?API|_PACKAGE|_STATIC)?(_NOFS|_NOCLEAR|_NOINIT)?(_NOFUNC|_TAG)?$/;
|
||||
next if $name =~ /^(BEGIN|END)_FUNC$/;
|
||||
next if $name =~ /^U?INT(8|16|32|64)(ENCODE|DECODE)(_VAR)?$/;
|
||||
next if $name =~ /^CI_(PRINT_STATS|INC_SRC|INC_DST)$/;
|
||||
next if $name =~ /^(ABS|ADDR_OVERFLOW|ALL_MEMBERS|BOUND|CONSTR|DETECT_[I|F|M]|DOWN)$/;
|
||||
next if $name =~ /^(MIN3?|MAX3?|NELMTS|POWER_OF_TWO|REGION_OVERFLOW)$/;
|
||||
next if $name =~ /^(UNIQUE_MEMBERS)$/;
|
||||
next if $name =~ /^addr_defined$/;
|
||||
|
||||
# These are POSIX threads function calls. Ignore them.
|
||||
next if $name =~ /^pthread_/;
|
||||
# These functions/macros are exempt.
|
||||
next if $name =~ /^(main|[fs]?printf|va_(start|arg|end))$/;
|
||||
|
||||
print "$ARGV:$.: $name\n";
|
||||
}
|
||||
# These are Windows system calls. Ignore them.
|
||||
next if $name =~ /^(_get_osfhandle|GetFileInformationByHandle|SetFilePointer|GetLastError|SetEndOfFile)$/;
|
||||
next if $name =~ /^(FindNextFile|FindClose|_tzset|Wgettimeofday|GetSystemTimeAsFileTime|Wgetlogin|GetUserName)$/;
|
||||
|
||||
} continue {
|
||||
close ARGV if eof;
|
||||
# These are MPI function calls. Ignore them.
|
||||
next if $name =~ /^(MPI_|MPE_)/;
|
||||
|
||||
# These are POSIX threads function calls. Ignore them.
|
||||
next if $name =~ /^pthread_/;
|
||||
|
||||
# These are Windows threads function calls. Ignore them.
|
||||
next if $name =~ /^(_beginthread|(Initialize|Enter|Leave)CriticalSection|TlsAlloc)$/;
|
||||
|
||||
# These are zlib & szlib function calls. Ignore them.
|
||||
next if $name =~ /^(inflate|SZ_)/;
|
||||
next if $name =~ /^compress2$/;
|
||||
|
||||
print "$ARGV:$.: $name\n";
|
||||
}
|
||||
|
||||
} continue {
|
||||
close ARGV if eof; # reset line number
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
# Created Date: 2004/12/07
|
||||
|
||||
#
|
||||
# Configure: should be generated by autoconf version 2.68.
|
||||
# autoconf: should be of version 2.68.
|
||||
# Configure: should be generated by autoconf version 2.69.
|
||||
# autoconf: should be of version 2.69.
|
||||
|
||||
# variable initialization
|
||||
nerrors=0
|
||||
AUTOCONFVERSION=2.68
|
||||
AUTOCONFVERSION=2.69
|
||||
AUTOCONFVERSIONLEAD='Generated by GNU Autoconf'
|
||||
CONFIGUREFILES="configure"
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ SH_COPYRIGHT=/tmp/h5chkright_SH.$$ # SHELL style copyright
|
||||
SH_COPYRIGHT2=/tmp/h5chkright_SH2.$$ # SHELL style copyright, 2nd style.
|
||||
WINBAT_COPYRIGHT=/tmp/h5chkright_WINBAT.$$ # Windows Batch file Copyright notice
|
||||
VMSCMD_COPYRIGHT=/tmp/h5chkright_VMSCMD.$$ # VMS command file Copyright notice
|
||||
CONFIGURE_IN_COPYRIGHT=/tmp/h5chkright_CONFIGURE_IN.$$ # configure.in file Copyright notice
|
||||
CONFIGURE_AC_COPYRIGHT=/tmp/h5chkright_CONFIGURE_AC.$$ # configure.ac file Copyright notice
|
||||
|
||||
tmpfixfile=/tmp/h5chkright_fix.$$ # Temporary fixed copy of file
|
||||
|
||||
@@ -207,8 +207,8 @@ EOF
|
||||
@REM access to either file, you may request a copy from help@hdfgroup.org.
|
||||
EOF
|
||||
|
||||
# configure.in file Copyright notice
|
||||
cat > ${CONFIGURE_IN_COPYRIGHT} << \EOF
|
||||
# configure.ac file Copyright notice
|
||||
cat > ${CONFIGURE_AC_COPYRIGHT} << \EOF
|
||||
dnl Copyright by The HDF Group.
|
||||
dnl Copyright by the Board of Trustees of the University of Illinois.
|
||||
dnl All rights reserved.
|
||||
@@ -635,10 +635,10 @@ VMSCMD_FILE()
|
||||
|
||||
# Check Configure.in type files
|
||||
#
|
||||
CONFIGURE_IN_FILE()
|
||||
CONFIGURE_AC_FILE()
|
||||
{
|
||||
f=$1
|
||||
case `MATCH_COPYRIGHT $CONFIGURE_IN_COPYRIGHT $f` in
|
||||
case `MATCH_COPYRIGHT $CONFIGURE_AC_COPYRIGHT $f` in
|
||||
PASSED)
|
||||
PASSED $f
|
||||
return
|
||||
@@ -646,9 +646,9 @@ CONFIGURE_IN_FILE()
|
||||
FAILED)
|
||||
# show the difference
|
||||
FAILED $f
|
||||
$DIFF ${EXTRACTEDFILE} ${CONFIGURE_IN_COPYRIGHT}
|
||||
$DIFF ${EXTRACTEDFILE} ${CONFIGURE_AC_COPYRIGHT}
|
||||
if [ -n "$FIXIT" ]; then
|
||||
FIX_COPYRIGHT $CONFIGURE_IN_COPYRIGHT $f
|
||||
FIX_COPYRIGHT $CONFIGURE_AC_COPYRIGHT $f
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
@@ -681,8 +681,8 @@ GUESS_File_Type()
|
||||
# Put this after C_SOURCE which may have #define and such lines.
|
||||
echo SHELL_FILE
|
||||
elif grep '^dnl' < $tmpfile > /dev/null; then
|
||||
# Some lines start with a "dnl". It may be a configure.in type file.
|
||||
echo CONFIGURE_IN_FILE
|
||||
# Some lines start with a "dnl". It may be a configure.ac type file.
|
||||
echo CONFIGURE_AC_FILE
|
||||
elif grep -i '^<html>' < $tmpfile > /dev/null || \
|
||||
grep '^<!--' < $tmpfile > /dev/null ; then
|
||||
# Some lines start with a "<html>" or having an html comment tag.
|
||||
@@ -827,8 +827,8 @@ while read file; do
|
||||
*Makefile | *Makefile.in | *Makefile.am | Makefile.dist )
|
||||
MAKE_FILE ${file}
|
||||
;;
|
||||
configure.in )
|
||||
CONFIGURE_IN_FILE ${file}
|
||||
configure.ac )
|
||||
CONFIGURE_AC_FILE ${file}
|
||||
;;
|
||||
*.bat | *.BAT )
|
||||
# Windows Batch files
|
||||
|
||||
483
bin/cmakehdf5
Executable file
483
bin/cmakehdf5
Executable file
@@ -0,0 +1,483 @@
|
||||
#! /bin/sh
|
||||
# Build and Test HDF5 using cmake.
|
||||
# Author: Allen Byrne
|
||||
# Albert Cheng
|
||||
# Creation Date: Nov 2012
|
||||
# Modified:
|
||||
# Changed to use the quick steps described in INSTALL_CMake.txt. (AKC 2014/1/1)
|
||||
|
||||
# Copyright: The HDF Group, 2012-14
|
||||
|
||||
# Debug Print: remove the comment hash if you want DPRINT to do echo
|
||||
DPRINT=:
|
||||
#DPRINT=echo
|
||||
|
||||
# use the ctest scripting method if --script is given
|
||||
if [ "$1" != "--script" ]; then
|
||||
# variable names
|
||||
# The "extra" number is the step number and easier to see all logfiles in
|
||||
# the sorted order of steps
|
||||
progname=`basename $0` # program name
|
||||
configlog="#${progname}_1config.log"
|
||||
makelog="#${progname}_2build.log"
|
||||
testlog="#${progname}_3test.log"
|
||||
packlog="#${progname}_4pack.log"
|
||||
installlog="#${progname}_5install.log"
|
||||
exit_code=0
|
||||
|
||||
# This command should be in the source directory's bin/
|
||||
# and should have invoked as "$srcdir/bin/$progname" or
|
||||
# "bin/$progname". So, by striping bin/$program from $0,
|
||||
# we can find $srcdir.
|
||||
if [ $0 == bin/$progname ]; then
|
||||
srcdir="." # current directory
|
||||
else
|
||||
# $0 is $srdir/bin/$progname
|
||||
srcdir=`echo $0 | sed -e s%/bin/$progname\$%%`
|
||||
fi
|
||||
# Sanity check
|
||||
if [ ! -r $srcdir/bin/$progname ]; then
|
||||
echo "encountered error while trying to find srcdir($srdir)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Cmake build options
|
||||
cacheinit=$srcdir/config/cmake/cacheinit.cmake
|
||||
build_cpp_lib=-DHDF5_BUILD_CPP_LIB:BOOL=OFF # C++ interface default off
|
||||
build_fortran=-DHDF5_BUILD_FORTRAN:BOOL=OFF # Fortran interface default off
|
||||
build_hl_lib=-DHDF5_BUILD_HL_LIB:BOOL=ON # High Level interface default on
|
||||
build_testing=-DBUILD_TESTING:BOOL=ON # Build tests default on
|
||||
build_tools=-DHDF5_BUILD_TOOLS:BOOL=ON # Build tools default on
|
||||
|
||||
|
||||
#=============
|
||||
# Function definitions
|
||||
#=============
|
||||
|
||||
# Show user brief help page
|
||||
HELP_BRIEF()
|
||||
{
|
||||
cat << EOF
|
||||
Usage: $progname [options]
|
||||
--help: shows details help page
|
||||
EOF
|
||||
}
|
||||
|
||||
# Show user detail help page
|
||||
HELP()
|
||||
{
|
||||
cat << EOF
|
||||
Usage: $progname [<options>]
|
||||
where options are:
|
||||
--enable-fortran | --disable-fortran:
|
||||
enable or disable fortran API. Default is off.
|
||||
--enable-cxx | --disable-cxx:
|
||||
enable or disable c++ API. Default is off.
|
||||
--enable-hl | --disable-hl:
|
||||
enable or disable high level API. Default is on.
|
||||
--enable-tools | --disable-tools:
|
||||
enable or disable building tools. Default is on.
|
||||
--enable-testing | --disable-testing:
|
||||
enable or disable building tests. Default is on.
|
||||
--help: shows details help page
|
||||
EOF
|
||||
}
|
||||
|
||||
# Display a time stamp
|
||||
TIMESTAMP()
|
||||
{
|
||||
echo "=====" "`date`" "====="
|
||||
}
|
||||
|
||||
|
||||
# Do one step bracketed with time stamps
|
||||
# The '< /dev/null' is needed to prevent some applications like MPI
|
||||
# jobs blocked for reading when they read stdin unnecessary.
|
||||
# $1 is banner message to be displayed.
|
||||
# $2 is command to run
|
||||
# $3 is logfile name for saving output from the command
|
||||
STEP()
|
||||
{
|
||||
banner="$1"
|
||||
command="$2"
|
||||
logfile="$3"
|
||||
|
||||
echo "$banner" with output saved in $logfile
|
||||
(TIMESTAMP; nerror=0 ;
|
||||
echo "eval $command"
|
||||
eval $command || nerror=1 ;
|
||||
TIMESTAMP; exit $nerror) < /dev/null >> "$logfile" 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "error in '$banner'. $progname aborted."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
#==========
|
||||
# main
|
||||
#==========
|
||||
|
||||
# Show a start time stamp
|
||||
TIMESTAMP
|
||||
|
||||
# Parse Cmake configure options
|
||||
# --enable-XXX or --disable-XXX will enable or disable feature XXX.
|
||||
# XXX can be:
|
||||
# fortran Fortran interface
|
||||
# cxx C++ interface
|
||||
# hl Highlevel interface
|
||||
# testing Build tests
|
||||
# tools Build tools
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
--enable-fortran)
|
||||
build_fortran=-DHDF5_BUILD_FORTRAN:BOOL=ON
|
||||
;;
|
||||
--disable-fortran)
|
||||
build_fortran=-DHDF5_BUILD_FORTRAN:BOOL=OFF
|
||||
;;
|
||||
--enable-cxx)
|
||||
build_cpp_lib=-DHDF5_BUILD_CPP_LIB:BOOL=ON
|
||||
;;
|
||||
--disable-cxx)
|
||||
build_cpp_lib=-DHDF5_BUILD_CPP_LIB:BOOL=OFF
|
||||
;;
|
||||
--enable-hl)
|
||||
build_hl_lib=-DHDF5_BUILD_HL_LIB:BOOL=ON
|
||||
;;
|
||||
--disable-hl)
|
||||
build_hl_lib=-DHDF5_BUILD_HL_LIB:BOOL=OFF
|
||||
;;
|
||||
--enable-tools)
|
||||
build_tools=-DHDF5_BUILD_TOOLS:BOOL=ON
|
||||
;;
|
||||
--disable-tools)
|
||||
build_tools=-DHDF5_BUILD_TOOLS:BOOL=OFF
|
||||
;;
|
||||
--enable-testing)
|
||||
build_testing=-DBUILD_TESTING:BOOL=ON
|
||||
;;
|
||||
--disable-testing)
|
||||
build_testing=-DBUILD_TESTING:BOOL=OFF
|
||||
;;
|
||||
--help)
|
||||
# print the detail help page and exit
|
||||
HELP
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo "Unknown options"
|
||||
HELP
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# Always display the brief help page
|
||||
HELP_BRIEF
|
||||
|
||||
# Verify there is a valid hdf5 source directory present
|
||||
if [ ! -d $srcdir ]; then
|
||||
echo $srcdir not found. Aborted.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# figure out version information
|
||||
vers=bin/h5vers
|
||||
if [ ! -x $srcdir/$vers ]; then
|
||||
echo $srcdir/$vers not found or not executable. Aborted.
|
||||
exit 1
|
||||
fi
|
||||
version=`cd $srcdir; $vers`
|
||||
if [ $? != 0 ]; then
|
||||
echo $vers failed. Aborted.
|
||||
exit 1
|
||||
fi
|
||||
echo Running Cmake for HDF5-${version} ...
|
||||
|
||||
# 4. Configure the C library, tools and tests with this command:
|
||||
STEP "Configure..." "cmake \
|
||||
$build_cpp_lib \
|
||||
$build_fortran \
|
||||
$build_hl_lib \
|
||||
$build_testing \
|
||||
$build_tools \
|
||||
$srcdir" $configlog
|
||||
|
||||
# 5. Build the C library, tools and tests with this command:
|
||||
STEP "Build the library, tools and tests, ..." "cmake --build . --config Release" $makelog
|
||||
|
||||
# 6. Test the C library and tools with this command:
|
||||
STEP "Test the library and tools..." "ctest . -C Release" $testlog
|
||||
|
||||
# 7. Create an install image with this command:
|
||||
STEP "Create an install image..." "cpack -C Release CPackConfig.cmake" $packlog
|
||||
|
||||
# 8. Install with this command:
|
||||
STEP "Install..." "./HDF5-${version}-Linux.sh --skip-license" $installlog
|
||||
# save the last exit code
|
||||
exit_code=$?
|
||||
|
||||
# Show a closing time stamp
|
||||
TIMESTAMP
|
||||
exit $exit_code
|
||||
|
||||
else
|
||||
# ---------------
|
||||
# older version
|
||||
# ---------------
|
||||
|
||||
# variable names
|
||||
progname=`basename $0` # program name
|
||||
cminfile="cmakemin.$$" # Cmake minimum file
|
||||
cfgfile=$progname.$$ # configure file
|
||||
ctest_log=ctest.log # output of ctest script
|
||||
install_log=install.log # output of installation
|
||||
$DPRINT $cfgfile
|
||||
|
||||
# Remove temporary generated files if exit 0
|
||||
trap "rm -f $cminfile $cfgfile" 0
|
||||
|
||||
#=============
|
||||
# Function definitions
|
||||
#=============
|
||||
TIMESTAMP()
|
||||
{
|
||||
echo "=====" "`date`" "====="
|
||||
}
|
||||
|
||||
|
||||
#==========
|
||||
# main
|
||||
#==========
|
||||
# Show a start time stamp
|
||||
TIMESTAMP
|
||||
|
||||
# Explain what and where log files are.
|
||||
cat <<EOF
|
||||
$ctest_log: output of ctest script.
|
||||
$install_log: output of installation
|
||||
Log files will be stored in Testing/Temporary:
|
||||
LastConfigure_<timestamp>.log: output of configure
|
||||
LastBuild_<timestamp>.log: output of build
|
||||
LastTest_<timestamp>.log: output of testing
|
||||
LastTestsFailed_<timestamp>.log: list of failed tests
|
||||
|
||||
EOF
|
||||
|
||||
# First generate the two needed input files, the $cimnfile and $cfgfile.
|
||||
# Then use ctest to use the two input files.
|
||||
|
||||
#==========
|
||||
# create the configure file
|
||||
#==========
|
||||
# Create the cmake minimum required file to be used by the following
|
||||
# configure file. Though not absolute needed, it is better to generate
|
||||
# this file before the configure file. Quote the EOF to preven substitution
|
||||
# in the text.
|
||||
#==========
|
||||
#==========
|
||||
cat > $cfgfile <<'EOF'
|
||||
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
|
||||
########################################################
|
||||
# This dashboard is maintained by The HDF Group
|
||||
# For any comments please contact cdashhelp@hdfgroup.org
|
||||
#
|
||||
########################################################
|
||||
|
||||
set (CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY})
|
||||
set (CTEST_SOURCE_DIRECTORY "../hdf5")
|
||||
set (CTEST_BINARY_DIRECTORY ".")
|
||||
set (CTEST_CMAKE_GENERATOR "Unix Makefiles")
|
||||
set (CTEST_BUILD_CONFIGURATION "Release")
|
||||
set (CTEST_MAX_N 8)
|
||||
|
||||
# -- CDash variables
|
||||
set (LOCAL_NO_SUBMIT TRUE) # No CDash submit.
|
||||
set (MODEL "Experimental")
|
||||
set (CDASH_LOCAL TRUE)
|
||||
set (SITE_BUILDNAME_SUFFIX "cmakehdf5")
|
||||
|
||||
# -- URL set for internal check, default is to not update
|
||||
set (LOCAL_SKIP_UPDATE TRUE)
|
||||
set (REPOSITORY_URL "http://svn.${hdfgroup_url}/hdf5/branches/hdf5_1_8")
|
||||
# -- Standard build options
|
||||
set (ADD_BUILD_OPTIONS "-DCMAKE_INSTALL_PREFIX:PATH=${CTEST_BINARY_DIRECTORY} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=\"SVN\" -DHDF5_PACKAGE_EXTLIBS:BOOL=ON")
|
||||
|
||||
# Use multiple CPU cores to build
|
||||
include(ProcessorCount)
|
||||
ProcessorCount(N)
|
||||
if(NOT N EQUAL 0)
|
||||
if(N GREATER ${CTEST_MAX_N})
|
||||
set(N ${CTEST_MAX_N})
|
||||
endif(N GREATER ${CTEST_MAX_N})
|
||||
set(CTEST_BUILD_FLAGS -j${N})
|
||||
set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N})
|
||||
endif()
|
||||
|
||||
# -----------------------------------------------------------
|
||||
# -- Get environment
|
||||
# -----------------------------------------------------------
|
||||
## -- set hostname
|
||||
## --------------------------
|
||||
find_program (HOSTNAME_CMD NAMES hostname)
|
||||
exec_program (${HOSTNAME_CMD} ARGS OUTPUT_VARIABLE HOSTNAME)
|
||||
set (CTEST_SITE "${HOSTNAME}${CTEST_SITE_EXT}")
|
||||
find_program (UNAME NAMES uname)
|
||||
macro (getuname name flag)
|
||||
exec_program ("${UNAME}" ARGS "${flag}" OUTPUT_VARIABLE "${name}")
|
||||
endmacro (getuname)
|
||||
|
||||
getuname (osname -s)
|
||||
getuname (osrel -r)
|
||||
getuname (cpu -m)
|
||||
|
||||
if (SITE_BUILDNAME_SUFFIX)
|
||||
set (CTEST_BUILD_NAME "${osname}-${osrel}-${cpu}-${SITE_BUILDNAME_SUFFIX}")
|
||||
else (SITE_BUILDNAME_SUFFIX)
|
||||
set (CTEST_BUILD_NAME "${osname}-${osrel}-${cpu}")
|
||||
endif (SITE_BUILDNAME_SUFFIX)
|
||||
# -----------------------------------------------------------
|
||||
|
||||
set (BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}")
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# MAC machines need special option
|
||||
#-----------------------------------------------------------------------------
|
||||
if (APPLE)
|
||||
# Compiler choice
|
||||
execute_process(COMMAND xcrun --find cc OUTPUT_VARIABLE XCODE_CC OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(COMMAND xcrun --find c++ OUTPUT_VARIABLE XCODE_CXX OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
SET(ENV{CC} "${XCODE_CC}")
|
||||
SET(ENV{CXX} "${XCODE_CXX}")
|
||||
# Shared fortran is not supported, build static
|
||||
set (BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC")
|
||||
set (BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF")
|
||||
endif (APPLE)
|
||||
|
||||
|
||||
# -----------------------------------------------------------
|
||||
find_package (Subversion)
|
||||
set (CTEST_UPDATE_COMMAND "${Subversion_SVN_EXECUTABLE}")
|
||||
# -- Only clean build folder if LOCAL_CLEAR_BUILD is set
|
||||
if (LOCAL_CLEAR_BUILD)
|
||||
set (CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE)
|
||||
ctest_empty_binary_directory (${CTEST_BINARY_DIRECTORY})
|
||||
endif (LOCAL_CLEAR_BUILD)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Send the main script as a note.
|
||||
list (APPEND CTEST_NOTES_FILES
|
||||
"${CMAKE_CURRENT_LIST_FILE}"
|
||||
"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake"
|
||||
)
|
||||
|
||||
# Check for required variables.
|
||||
foreach (req
|
||||
CTEST_CMAKE_GENERATOR
|
||||
CTEST_SITE
|
||||
CTEST_BUILD_NAME
|
||||
)
|
||||
if (NOT DEFINED ${req})
|
||||
message(FATAL_ERROR "The containing script must set ${req}")
|
||||
endif (NOT DEFINED ${req})
|
||||
endforeach (req)
|
||||
|
||||
## -- set output to english
|
||||
set($ENV{LC_MESSAGES} "en_EN")
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Initialize the CTEST commands
|
||||
#------------------------------
|
||||
set (CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"")
|
||||
set (CTEST_CONFIGURE_COMMAND
|
||||
"${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\"")
|
||||
|
||||
# Print summary information.
|
||||
foreach (v
|
||||
CTEST_SITE
|
||||
CTEST_BUILD_NAME
|
||||
CTEST_SOURCE_DIRECTORY
|
||||
CTEST_BINARY_DIRECTORY
|
||||
CTEST_CMAKE_GENERATOR
|
||||
CTEST_BUILD_CONFIGURATION
|
||||
CTEST_CONFIGURE_COMMAND
|
||||
CTEST_SCRIPT_DIRECTORY
|
||||
)
|
||||
set (vars "${vars} ${v}=[${${v}}]\n")
|
||||
endforeach (v)
|
||||
message ("Dashboard script configuration:\n${vars}\n")
|
||||
|
||||
CTEST_START (${MODEL} TRACK ${MODEL})
|
||||
if (NOT LOCAL_SKIP_UPDATE)
|
||||
CTEST_UPDATE (SOURCE "${CTEST_SOURCE_DIRECTORY}")
|
||||
endif (NOT LOCAL_SKIP_UPDATE)
|
||||
CTEST_CONFIGURE (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
|
||||
if(NOT res STREQUAL "0")
|
||||
message (FATAL_ERROR "Configure FAILED")
|
||||
endif()
|
||||
message ("Configure DONE")
|
||||
CTEST_READ_CUSTOM_FILES ("${CTEST_BINARY_DIRECTORY}")
|
||||
if (NOT LOCAL_NO_SUBMIT)
|
||||
CTEST_SUBMIT (PARTS Update Configure Notes)
|
||||
endif (NOT LOCAL_NO_SUBMIT)
|
||||
CTEST_BUILD (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND RETURN_VALUE res)
|
||||
if (NOT LOCAL_NO_SUBMIT)
|
||||
CTEST_SUBMIT (PARTS Build)
|
||||
endif (NOT LOCAL_NO_SUBMIT)
|
||||
if(NOT res STREQUAL "0")
|
||||
message (FATAL_ERROR "Build FAILED")
|
||||
endif()
|
||||
message ("build DONE")
|
||||
if (NOT LOCAL_SKIP_TEST)
|
||||
CTEST_TEST (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res)
|
||||
if (NOT LOCAL_NO_SUBMIT)
|
||||
CTEST_SUBMIT (PARTS Test)
|
||||
endif (NOT LOCAL_NO_SUBMIT)
|
||||
if(NOT res STREQUAL "0")
|
||||
message (FATAL_ERROR "Test FAILED")
|
||||
endif()
|
||||
message ("test DONE")
|
||||
endif (NOT LOCAL_SKIP_TEST)
|
||||
if(NOT LOCAL_MEMCHECK_TEST)
|
||||
##-----------------------------------------------
|
||||
## Package the product
|
||||
##-----------------------------------------------
|
||||
execute_process(COMMAND cpack -C ${CTEST_BUILD_CONFIGURATION} -V
|
||||
WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY}
|
||||
RESULT_VARIABLE cpackResult
|
||||
OUTPUT_VARIABLE cpackLog
|
||||
ERROR_VARIABLE cpackLog.err
|
||||
)
|
||||
file(WRITE ${CTEST_BINARY_DIRECTORY}/cpack.log "${cpackLog.err}" "${cpackLog}")
|
||||
endif(NOT LOCAL_MEMCHECK_TEST)
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
message ("DONE")
|
||||
EOF
|
||||
|
||||
|
||||
# Run ctest
|
||||
ctest -S $cfgfile -C Release -V -O $ctest_log
|
||||
exit_code=$?
|
||||
if [ $exit_code = 0 ]; then
|
||||
echo CTest script completed without error
|
||||
else
|
||||
echo Error encountered CTest script
|
||||
fi
|
||||
# Using HDF5-*.sh because actual name is unavailable
|
||||
install_sh=HDF5-*.sh
|
||||
echo installing with $install_sh ...
|
||||
./$install_sh --skip-license > $install_log
|
||||
exit_code=$?
|
||||
if [ $exit_code = 0 ]; then
|
||||
echo Complete without error
|
||||
else
|
||||
echo Error encountered
|
||||
fi
|
||||
TIMESTAMP
|
||||
exit $exit_code
|
||||
|
||||
fi
|
||||
|
||||
8
bin/config.guess
vendored
8
bin/config.guess
vendored
@@ -778,9 +778,9 @@ EOF
|
||||
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
|
||||
esac
|
||||
exit ;;
|
||||
i*:CYGWIN*:*)
|
||||
echo ${UNAME_MACHINE}-pc-cygwin
|
||||
exit ;;
|
||||
i*:CYGWIN*:* | x*:CYGWIN*:*)
|
||||
echo ${UNAME_MACHINE}-pc-cygwin
|
||||
exit ;;
|
||||
*:MINGW*:*)
|
||||
echo ${UNAME_MACHINE}-pc-mingw32
|
||||
exit ;;
|
||||
@@ -815,7 +815,7 @@ EOF
|
||||
i*:UWIN*:*)
|
||||
echo ${UNAME_MACHINE}-pc-uwin
|
||||
exit ;;
|
||||
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
|
||||
amd64:CYGWIN*:*:*)
|
||||
echo x86_64-unknown-cygwin
|
||||
exit ;;
|
||||
p*:CYGWIN*:*)
|
||||
|
||||
65
bin/genltanalyze
Executable file
65
bin/genltanalyze
Executable file
@@ -0,0 +1,65 @@
|
||||
#!/bin/sh
|
||||
##
|
||||
## 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 files COPYING and Copyright.html. COPYING can be found at the root
|
||||
## of the source code distribution tree; Copyright.html can be found at the
|
||||
## root level of an installed copy of the electronic HDF5 document set and
|
||||
## is linked from the top-level documents page. It can also be found at
|
||||
## http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have
|
||||
## access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu.
|
||||
##
|
||||
# regenerate hl/src/H5LTanalyze.c
|
||||
|
||||
# HDF5 currently uses the following versions of the bison flex:
|
||||
BISON_VERSION="bison (GNU Bison) 2.7"
|
||||
FLEX_VERSION="flex 2.5.37"
|
||||
|
||||
# If paths to bison flex are not specified by the user, assume tools are
|
||||
# running on jam in /mnt/hdf/packages and set paths accordingly.
|
||||
if test -z ${BISON}; then
|
||||
BISON=/usr/hdf/bin/bison
|
||||
fi
|
||||
if test -z ${FLEX}; then
|
||||
FLEX=/usr/hdf/bin/flex
|
||||
fi
|
||||
|
||||
# Check version numbers of all bison flex against the "correct" versions
|
||||
BI_VERS=`${BISON} --version 2>&1 | grep "^${BISON_VERSION}"`
|
||||
if test -z "${BI_VERS}"; then
|
||||
echo "${BISON} version is not ${BISON_VERSION}"
|
||||
exit 1
|
||||
fi
|
||||
FL_VERS=`${FLEX} --version 2>&1 | grep "^${FLEX_VERSION}"`
|
||||
if test -z "${FL_VERS}"; then
|
||||
echo "${FLEX} version is not ${FLEX_VERSION}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Make sure that the tools are in the path.
|
||||
BISON_DIR=`dirname ${BISON}`
|
||||
FLEX_DIR=`dirname ${FLEX}`
|
||||
|
||||
# Main body
|
||||
cd hl/src
|
||||
echo "Generate hl/src/H5LTparse.c from hl/src/H5LTparse.y"
|
||||
bison -pH5LTyy -o H5LTparse.c -d H5LTparse.y
|
||||
echo "Generate hl/src/H5LTanalyze.c from hl/src/H5LTanalyze.l"
|
||||
flex --nounistd -PH5LTyy -oH5LTanalyze.c H5LTanalyze.l
|
||||
|
||||
# fix H5LTparse.c to declare H5LTyyparse return type as an hid_t
|
||||
# instead of int. Currently the generated function H5LTyyparse is
|
||||
# generated with a return value of type int, which is a mapping to the
|
||||
# flex yyparse function. The return value in the HL library should be
|
||||
# an hid_t.
|
||||
# I propose to not use flex to generate this function, but for now I am
|
||||
# adding a perl command to find and replace this function declaration in
|
||||
# H5LTparse.c.
|
||||
perl -0777 -pi -e 's/int\nyyparse/hid_t\nyyparse/igs' H5LTparse.c
|
||||
perl -0777 -pi -e 's/int H5LTyyparse/hid_t H5LTyyparse/igs' H5LTparse.c
|
||||
cd ../..
|
||||
|
||||
exit 0
|
||||
26
bin/h5vers
26
bin/h5vers
@@ -71,7 +71,7 @@ use strict;
|
||||
# the command line) then the first line of the README.txt and RELEASE.txt files
|
||||
# one directory above the H5public.h file is also modified so it looks
|
||||
# something like: This is hdf5-1.2.3-pre1 currently under development.
|
||||
# The AC_INIT macro in configure.in will also change in this case to be
|
||||
# The AC_INIT macro in configure.ac will also change in this case to be
|
||||
# something like: AC_INIT([HDF5], [hdf5-1.2.3-pre1], [help@hdfgroup.org])
|
||||
# Version changes are also reflected in the Windows-maintained H5pubconf.h
|
||||
# file.
|
||||
@@ -159,10 +159,10 @@ while ($_ = shift) {
|
||||
die "mutually exclusive options given\n" if $set && $inc;
|
||||
|
||||
# Determine file to use as H5public.h, README.txt,
|
||||
# release_docs/RELEASE.txt, configure.in, windows/src/H5pubconf.h,
|
||||
# vms/src/h5pubcof.h and config/lt_vers.am.
|
||||
# The README.txt, release_docs/RELEASE.txt, configure.in,
|
||||
# windows/src/H5pubconf.h, vms/src/h5pubconf.h and config/lt_vers.am
|
||||
# release_docs/RELEASE.txt, configure.ac, windows/src/H5pubconf.h,
|
||||
# vms/src/h5pubconf.h and config/lt_vers.am.
|
||||
# The README.txt, release_docs/RELEASE.txt, configure.ac,
|
||||
# vms/src/h5pubconf.h, windows/src/H5pubconf.h, and config/lt_vers.am
|
||||
# files are always in the directory above H5public.h
|
||||
unless ($file) {
|
||||
for (@files) {
|
||||
@@ -183,14 +183,10 @@ die "unable to read file: $README\n" unless -r $file;
|
||||
my $RELEASE = $file;
|
||||
$RELEASE =~ s/[^\/]*$/..\/release_docs\/RELEASE.txt/;
|
||||
die "unable to read file: $RELEASE\n" unless -r $file;
|
||||
# configure.in
|
||||
# configure.ac
|
||||
my $CONFIGURE = $file;
|
||||
$CONFIGURE =~ s/[^\/]*$/..\/configure.in/;
|
||||
$CONFIGURE =~ s/[^\/]*$/..\/configure.ac/;
|
||||
die "unable to read file: $CONFIGURE\n" unless -r $file;
|
||||
# windows/src/H5pubconf.h
|
||||
my $H5PUBCONF = $file;
|
||||
$H5PUBCONF =~ s/[^\/]*$/..\/windows\/src\/H5pubconf.h/;
|
||||
die "unable to read file: $H5PUBCONF\n" unless -r $file;
|
||||
# vms/src/h5pubconf.h
|
||||
my $H5VMSPUBCONF = $file;
|
||||
$H5VMSPUBCONF =~ s/[^\/]*$/..\/vms\/src\/h5pubconf.h/;
|
||||
@@ -242,7 +238,6 @@ if ($set) {
|
||||
$README = "";
|
||||
$RELEASE = "";
|
||||
$CONFIGURE = "";
|
||||
$H5PUBCONF = "";
|
||||
$H5VMSPUBCONF = "";
|
||||
$LT_VERS = "";
|
||||
@newver = @curver;
|
||||
@@ -339,7 +334,7 @@ sub gen_configure {
|
||||
print FILE @contents;
|
||||
close FILE;
|
||||
|
||||
$conf =~ /^(.*?)\/?configure.in$/;
|
||||
$conf =~ /^(.*?)\/?configure.ac$/;
|
||||
|
||||
if ($1) {
|
||||
$rc = system("cd $1 && bin/reconfigure >/dev/null 2>/dev/null && rm -rf autom4te.cache");
|
||||
@@ -352,7 +347,7 @@ sub gen_configure {
|
||||
}
|
||||
}
|
||||
|
||||
# Update the configure.in files and regenerate them
|
||||
# Update the configure.ac files and regenerate them
|
||||
gen_configure("HDF5", $CONFIGURE) if $CONFIGURE;
|
||||
|
||||
sub gen_h5pubconf {
|
||||
@@ -392,9 +387,6 @@ sub gen_h5pubconf {
|
||||
close FILE;
|
||||
}
|
||||
|
||||
# Update the Windows-maintained H5pubconf.h file
|
||||
gen_h5pubconf("HDF5", $H5PUBCONF, @newver) if $H5PUBCONF;
|
||||
|
||||
# Update the VMS-maintained h5pubconf.h file
|
||||
gen_h5pubconf("HDF5", $H5VMSPUBCONF, @newver) if $H5VMSPUBCONF;
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
|
||||
# libtool (GNU libtool) 2.4
|
||||
# libtool (GNU libtool) 2.4.2
|
||||
# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
|
||||
|
||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
|
||||
# 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||
# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
|
||||
# This is free software; see the source for copying conditions. There is NO
|
||||
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
# --quiet, --silent don't print informational messages
|
||||
# --no-quiet, --no-silent
|
||||
# print informational messages (default)
|
||||
# --no-warn don't display warning messages
|
||||
# --tag=TAG use configuration variables from tag TAG
|
||||
# -v, --verbose print more informational messages than default
|
||||
# --no-verbose don't print the extra informational messages
|
||||
@@ -69,7 +70,7 @@
|
||||
# compiler: $LTCC
|
||||
# compiler flags: $LTCFLAGS
|
||||
# linker: $LD (gnu? $with_gnu_ld)
|
||||
# $progname: (GNU libtool) 2.4
|
||||
# $progname: (GNU libtool) 2.4.2
|
||||
# automake: $automake_version
|
||||
# autoconf: $autoconf_version
|
||||
#
|
||||
@@ -79,9 +80,9 @@
|
||||
|
||||
PROGRAM=libtool
|
||||
PACKAGE=libtool
|
||||
VERSION=2.4
|
||||
VERSION=2.4.2
|
||||
TIMESTAMP=""
|
||||
package_revision=1.3293
|
||||
package_revision=1.3337
|
||||
|
||||
# Be Bourne compatible
|
||||
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
|
||||
@@ -136,15 +137,10 @@ progpath="$0"
|
||||
|
||||
: ${CP="cp -f"}
|
||||
test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
|
||||
: ${EGREP="grep -E"}
|
||||
: ${FGREP="grep -F"}
|
||||
: ${GREP="grep"}
|
||||
: ${LN_S="ln -s"}
|
||||
: ${MAKE="make"}
|
||||
: ${MKDIR="mkdir"}
|
||||
: ${MV="mv -f"}
|
||||
: ${RM="rm -f"}
|
||||
: ${SED="sed"}
|
||||
: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
|
||||
: ${Xsed="$SED -e 1s/^X//"}
|
||||
|
||||
@@ -387,7 +383,7 @@ case $progpath in
|
||||
;;
|
||||
*)
|
||||
save_IFS="$IFS"
|
||||
IFS=:
|
||||
IFS=${PATH_SEPARATOR-:}
|
||||
for progdir in $PATH; do
|
||||
IFS="$save_IFS"
|
||||
test -x "$progdir/$progname" && break
|
||||
@@ -771,8 +767,8 @@ func_help ()
|
||||
s*\$LTCFLAGS*'"$LTCFLAGS"'*
|
||||
s*\$LD*'"$LD"'*
|
||||
s/\$with_gnu_ld/'"$with_gnu_ld"'/
|
||||
s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
|
||||
s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
|
||||
s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/
|
||||
s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/
|
||||
p
|
||||
d
|
||||
}
|
||||
@@ -1052,6 +1048,7 @@ opt_finish=false
|
||||
opt_help=false
|
||||
opt_help_all=false
|
||||
opt_silent=:
|
||||
opt_warning=:
|
||||
opt_verbose=:
|
||||
opt_silent=false
|
||||
opt_verbose=false
|
||||
@@ -1118,6 +1115,10 @@ esac
|
||||
;;
|
||||
--no-silent|--no-quiet)
|
||||
opt_silent=false
|
||||
func_append preserve_args " $opt"
|
||||
;;
|
||||
--no-warning|--no-warn)
|
||||
opt_warning=false
|
||||
func_append preserve_args " $opt"
|
||||
;;
|
||||
--no-verbose)
|
||||
@@ -2059,7 +2060,7 @@ func_mode_compile ()
|
||||
*.[cCFSifmso] | \
|
||||
*.ada | *.adb | *.ads | *.asm | \
|
||||
*.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
|
||||
*.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup)
|
||||
*.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup)
|
||||
func_xform "$libobj"
|
||||
libobj=$func_xform_result
|
||||
;;
|
||||
@@ -3201,11 +3202,13 @@ func_mode_install ()
|
||||
|
||||
# Set up the ranlib parameters.
|
||||
oldlib="$destdir/$name"
|
||||
func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
|
||||
tool_oldlib=$func_to_tool_file_result
|
||||
|
||||
func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
|
||||
|
||||
if test -n "$stripme" && test -n "$old_striplib"; then
|
||||
func_show_eval "$old_striplib $oldlib" 'exit $?'
|
||||
func_show_eval "$old_striplib $tool_oldlib" 'exit $?'
|
||||
fi
|
||||
|
||||
# Do each command in the postinstall commands.
|
||||
@@ -3470,7 +3473,7 @@ static const void *lt_preloaded_setup() {
|
||||
# linked before any other PIC object. But we must not use
|
||||
# pic_flag when linking with -static. The problem exists in
|
||||
# FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
|
||||
*-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
|
||||
*-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
|
||||
pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
|
||||
*-*-hpux*)
|
||||
pic_flag_for_symtable=" $pic_flag" ;;
|
||||
@@ -3982,14 +3985,17 @@ func_exec_program_core ()
|
||||
# launches target application with the remaining arguments.
|
||||
func_exec_program ()
|
||||
{
|
||||
for lt_wr_arg
|
||||
do
|
||||
case \$lt_wr_arg in
|
||||
--lt-*) ;;
|
||||
*) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
case \" \$* \" in
|
||||
*\\ --lt-*)
|
||||
for lt_wr_arg
|
||||
do
|
||||
case \$lt_wr_arg in
|
||||
--lt-*) ;;
|
||||
*) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
|
||||
esac
|
||||
shift
|
||||
done ;;
|
||||
esac
|
||||
func_exec_program_core \${1+\"\$@\"}
|
||||
}
|
||||
|
||||
@@ -5057,9 +5063,15 @@ void lt_dump_script (FILE* f)
|
||||
{
|
||||
EOF
|
||||
func_emit_wrapper yes |
|
||||
$SED -e 's/\([\\"]\)/\\\1/g' \
|
||||
-e 's/^/ fputs ("/' -e 's/$/\\n", f);/'
|
||||
|
||||
$SED -n -e '
|
||||
s/^\(.\{79\}\)\(..*\)/\1\
|
||||
\2/
|
||||
h
|
||||
s/\([\\"]\)/\\\1/g
|
||||
s/$/\\n/
|
||||
s/\([^\n]*\).*/ fputs ("\1", f);/p
|
||||
g
|
||||
D'
|
||||
cat <<"EOF"
|
||||
}
|
||||
EOF
|
||||
@@ -5643,7 +5655,8 @@ func_mode_link ()
|
||||
continue
|
||||
;;
|
||||
|
||||
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
|
||||
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
|
||||
|-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
|
||||
func_append compiler_flags " $arg"
|
||||
func_append compile_command " $arg"
|
||||
func_append finalize_command " $arg"
|
||||
@@ -6147,7 +6160,8 @@ func_mode_link ()
|
||||
lib=
|
||||
found=no
|
||||
case $deplib in
|
||||
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
|
||||
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
|
||||
|-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
|
||||
if test "$linkmode,$pass" = "prog,link"; then
|
||||
compile_deplibs="$deplib $compile_deplibs"
|
||||
finalize_deplibs="$deplib $finalize_deplibs"
|
||||
@@ -6831,7 +6845,7 @@ func_mode_link ()
|
||||
test "$hardcode_direct_absolute" = no; then
|
||||
add="$dir/$linklib"
|
||||
elif test "$hardcode_minus_L" = yes; then
|
||||
add_dir="-L$dir"
|
||||
add_dir="-L$absdir"
|
||||
# Try looking first in the location we're being installed to.
|
||||
if test -n "$inst_prefix_dir"; then
|
||||
case $libdir in
|
||||
@@ -7316,6 +7330,7 @@ func_mode_link ()
|
||||
# which has an extra 1 added just for fun
|
||||
#
|
||||
case $version_type in
|
||||
# correct linux to gnu/linux during the next big refactor
|
||||
darwin|linux|osf|windows|none)
|
||||
func_arith $number_major + $number_minor
|
||||
current=$func_arith_result
|
||||
@@ -7432,7 +7447,7 @@ func_mode_link ()
|
||||
versuffix="$major.$revision"
|
||||
;;
|
||||
|
||||
linux)
|
||||
linux) # correct to gnu/linux during the next big refactor
|
||||
func_arith $current - $age
|
||||
major=.$func_arith_result
|
||||
versuffix="$major.$age.$revision"
|
||||
@@ -8020,6 +8035,11 @@ EOF
|
||||
|
||||
# Test again, we may have decided not to build it any more
|
||||
if test "$build_libtool_libs" = yes; then
|
||||
# Remove ${wl} instances when linking with ld.
|
||||
# FIXME: should test the right _cmds variable.
|
||||
case $archive_cmds in
|
||||
*\$LD\ *) wl= ;;
|
||||
esac
|
||||
if test "$hardcode_into_libs" = yes; then
|
||||
# Hardcode the library paths
|
||||
hardcode_libdirs=
|
||||
@@ -8050,7 +8070,7 @@ EOF
|
||||
elif test -n "$runpath_var"; then
|
||||
case "$perm_rpath " in
|
||||
*" $libdir "*) ;;
|
||||
*) func_apped perm_rpath " $libdir" ;;
|
||||
*) func_append perm_rpath " $libdir" ;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
@@ -8058,11 +8078,7 @@ EOF
|
||||
if test -n "$hardcode_libdir_separator" &&
|
||||
test -n "$hardcode_libdirs"; then
|
||||
libdir="$hardcode_libdirs"
|
||||
if test -n "$hardcode_libdir_flag_spec_ld"; then
|
||||
eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
|
||||
else
|
||||
eval dep_rpath=\"$hardcode_libdir_flag_spec\"
|
||||
fi
|
||||
eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
|
||||
fi
|
||||
if test -n "$runpath_var" && test -n "$perm_rpath"; then
|
||||
# We should set the runpath_var.
|
||||
@@ -9152,6 +9168,8 @@ EOF
|
||||
esac
|
||||
done
|
||||
fi
|
||||
func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
|
||||
tool_oldlib=$func_to_tool_file_result
|
||||
eval cmds=\"$old_archive_cmds\"
|
||||
|
||||
func_len " $cmds"
|
||||
@@ -9261,7 +9279,8 @@ EOF
|
||||
*.la)
|
||||
func_basename "$deplib"
|
||||
name="$func_basename_result"
|
||||
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
|
||||
func_resolve_sysroot "$deplib"
|
||||
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
|
||||
test -z "$libdir" && \
|
||||
func_fatal_error "\`$deplib' is not a valid libtool archive"
|
||||
func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
|
||||
|
||||
446
bin/missing
446
bin/missing
@@ -1,11 +1,10 @@
|
||||
#! /bin/sh
|
||||
# Common stub for a few missing GNU programs while installing.
|
||||
# Common wrapper for a few potentially missing GNU programs.
|
||||
|
||||
scriptversion=2005-02-08.22
|
||||
scriptversion=2013-10-28.13; # UTC
|
||||
|
||||
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
||||
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -18,9 +17,7 @@ scriptversion=2005-02-08.22
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
@@ -28,63 +25,40 @@ scriptversion=2005-02-08.22
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
echo 1>&2 "Try '$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
run=:
|
||||
case $1 in
|
||||
|
||||
# In the cases where this matters, `missing' is being run in the
|
||||
# srcdir already.
|
||||
if test -f configure.ac; then
|
||||
configure_ac=configure.ac
|
||||
else
|
||||
configure_ac=configure.in
|
||||
fi
|
||||
--is-lightweight)
|
||||
# Used by our autoconf macros to check whether the available missing
|
||||
# script is modern enough.
|
||||
exit 0
|
||||
;;
|
||||
|
||||
msg="missing on your system"
|
||||
|
||||
case "$1" in
|
||||
--run)
|
||||
# Try to run requested program, and just exit if it succeeds.
|
||||
run=
|
||||
shift
|
||||
"$@" && exit 0
|
||||
# Exit code 63 means version mismatch. This often happens
|
||||
# when the user try to use an ancient version of a tool on
|
||||
# a file that requires a minimum version. In this case we
|
||||
# we should proceed has if the program had been absent, or
|
||||
# if --run hadn't been passed.
|
||||
if test $? = 63; then
|
||||
run=:
|
||||
msg="probably too old"
|
||||
fi
|
||||
;;
|
||||
--run)
|
||||
# Back-compat with the calling convention used by older automake.
|
||||
shift
|
||||
;;
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
||||
error status if there is no known handling for PROGRAM.
|
||||
Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
|
||||
to PROGRAM being missing or too old.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
--run try to run the given command, and emulate it if it fails
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal touch file \`aclocal.m4'
|
||||
autoconf touch file \`configure'
|
||||
autoheader touch file \`config.h.in'
|
||||
automake touch all \`Makefile.in' files
|
||||
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
flex create \`lex.yy.c', if possible, from existing .c
|
||||
help2man touch the output file
|
||||
lex create \`lex.yy.c', if possible, from existing .c
|
||||
makeinfo touch the output file
|
||||
tar try tar, gnutar, gtar, then tar without non-portable flags
|
||||
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
aclocal autoconf autoheader autom4te automake makeinfo
|
||||
bison yacc flex lex help2man
|
||||
|
||||
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
|
||||
'g' are ignored when checking the name.
|
||||
|
||||
Send bug reports to <bug-automake@gnu.org>."
|
||||
exit $?
|
||||
@@ -96,262 +70,146 @@ Send bug reports to <bug-automake@gnu.org>."
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: Unknown \`$1' option"
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
echo 1>&2 "$0: unknown '$1' option"
|
||||
echo 1>&2 "Try '$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
# Now exit if we have it, but it failed. Also exit now if we
|
||||
# don't have it and --version was passed (most likely to detect
|
||||
# the program).
|
||||
case "$1" in
|
||||
lex|yacc)
|
||||
# Not GNU programs, they don't have --version.
|
||||
# Run the given program, remember its exit status.
|
||||
"$@"; st=$?
|
||||
|
||||
# If it succeeded, we are done.
|
||||
test $st -eq 0 && exit 0
|
||||
|
||||
# Also exit now if we it failed (or wasn't found), and '--version' was
|
||||
# passed; such an option is passed most likely to detect whether the
|
||||
# program is present and works.
|
||||
case $2 in --version|--help) exit $st;; esac
|
||||
|
||||
# Exit code 63 means version mismatch. This often happens when the user
|
||||
# tries to use an ancient version of a tool on a file that requires a
|
||||
# minimum version.
|
||||
if test $st -eq 63; then
|
||||
msg="probably too old"
|
||||
elif test $st -eq 127; then
|
||||
# Program was missing.
|
||||
msg="missing on your system"
|
||||
else
|
||||
# Program was found and executed, but failed. Give up.
|
||||
exit $st
|
||||
fi
|
||||
|
||||
perl_URL=http://www.perl.org/
|
||||
flex_URL=http://flex.sourceforge.net/
|
||||
gnu_software_URL=http://www.gnu.org/software
|
||||
|
||||
program_details ()
|
||||
{
|
||||
case $1 in
|
||||
aclocal|automake)
|
||||
echo "The '$1' program is part of the GNU Automake package:"
|
||||
echo "<$gnu_software_URL/automake>"
|
||||
echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
|
||||
echo "<$gnu_software_URL/autoconf>"
|
||||
echo "<$gnu_software_URL/m4/>"
|
||||
echo "<$perl_URL>"
|
||||
;;
|
||||
autoconf|autom4te|autoheader)
|
||||
echo "The '$1' program is part of the GNU Autoconf package:"
|
||||
echo "<$gnu_software_URL/autoconf/>"
|
||||
echo "It also requires GNU m4 and Perl in order to run:"
|
||||
echo "<$gnu_software_URL/m4/>"
|
||||
echo "<$perl_URL>"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
give_advice ()
|
||||
{
|
||||
# Normalize program name to check for.
|
||||
normalized_program=`echo "$1" | sed '
|
||||
s/^gnu-//; t
|
||||
s/^gnu//; t
|
||||
s/^g//; t'`
|
||||
|
||||
printf '%s\n' "'$1' is $msg."
|
||||
|
||||
configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
|
||||
case $normalized_program in
|
||||
autoconf*)
|
||||
echo "You should only need it if you modified 'configure.ac',"
|
||||
echo "or m4 files included by it."
|
||||
program_details 'autoconf'
|
||||
;;
|
||||
autoheader*)
|
||||
echo "You should only need it if you modified 'acconfig.h' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'autoheader'
|
||||
;;
|
||||
automake*)
|
||||
echo "You should only need it if you modified 'Makefile.am' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'automake'
|
||||
;;
|
||||
aclocal*)
|
||||
echo "You should only need it if you modified 'acinclude.m4' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'aclocal'
|
||||
;;
|
||||
autom4te*)
|
||||
echo "You might have modified some maintainer files that require"
|
||||
echo "the 'autom4te' program to be rebuilt."
|
||||
program_details 'autom4te'
|
||||
;;
|
||||
bison*|yacc*)
|
||||
echo "You should only need it if you modified a '.y' file."
|
||||
echo "You may want to install the GNU Bison package:"
|
||||
echo "<$gnu_software_URL/bison/>"
|
||||
;;
|
||||
lex*|flex*)
|
||||
echo "You should only need it if you modified a '.l' file."
|
||||
echo "You may want to install the Fast Lexical Analyzer package:"
|
||||
echo "<$flex_URL>"
|
||||
;;
|
||||
help2man*)
|
||||
echo "You should only need it if you modified a dependency" \
|
||||
"of a man page."
|
||||
echo "You may want to install the GNU Help2man package:"
|
||||
echo "<$gnu_software_URL/help2man/>"
|
||||
;;
|
||||
makeinfo*)
|
||||
echo "You should only need it if you modified a '.texi' file, or"
|
||||
echo "any other file indirectly affecting the aspect of the manual."
|
||||
echo "You might want to install the Texinfo package:"
|
||||
echo "<$gnu_software_URL/texinfo/>"
|
||||
echo "The spurious makeinfo call might also be the consequence of"
|
||||
echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
|
||||
echo "want to install GNU make:"
|
||||
echo "<$gnu_software_URL/make/>"
|
||||
;;
|
||||
*)
|
||||
echo "You might have modified some files without having the proper"
|
||||
echo "tools for further handling them. Check the 'README' file, it"
|
||||
echo "often tells you about the needed prerequisites for installing"
|
||||
echo "this package. You may also peek at any GNU archive site, in"
|
||||
echo "case some other package contains this missing '$1' program."
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
tar)
|
||||
if test -n "$run"; then
|
||||
echo 1>&2 "ERROR: \`tar' requires --run"
|
||||
exit 1
|
||||
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
give_advice "$1" | sed -e '1s/^/WARNING: /' \
|
||||
-e '2,$s/^/ /' >&2
|
||||
|
||||
*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||
# Could not run --version or --help. This is probably someone
|
||||
# running `$TOOL --version' or `$TOOL --help' to check whether
|
||||
# $TOOL exists and not knowing $TOOL uses missing.
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# If it does not exist, or fails to run (possibly an outdated version),
|
||||
# try to emulate it.
|
||||
case "$1" in
|
||||
aclocal*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
|
||||
to install the \`Automake' and \`Perl' packages. Grab them from
|
||||
any GNU archive site."
|
||||
touch aclocal.m4
|
||||
;;
|
||||
|
||||
autoconf)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`${configure_ac}'. You might want to install the
|
||||
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
||||
archive site."
|
||||
touch configure
|
||||
;;
|
||||
|
||||
autoheader)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`acconfig.h' or \`${configure_ac}'. You might want
|
||||
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
||||
from any GNU archive site."
|
||||
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
|
||||
test -z "$files" && files="config.h"
|
||||
touch_files=
|
||||
for f in $files; do
|
||||
case "$f" in
|
||||
*:*) touch_files="$touch_files "`echo "$f" |
|
||||
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
||||
*) touch_files="$touch_files $f.in";;
|
||||
esac
|
||||
done
|
||||
touch $touch_files
|
||||
;;
|
||||
|
||||
automake*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
|
||||
You might want to install the \`Automake' and \`Perl' packages.
|
||||
Grab them from any GNU archive site."
|
||||
find . -type f -name Makefile.am -print |
|
||||
sed 's/\.am$/.in/' |
|
||||
while read f; do touch "$f"; done
|
||||
;;
|
||||
|
||||
autom4te)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, but is $msg.
|
||||
You might have modified some files without having the
|
||||
proper tools for further handling them.
|
||||
You can get \`$1' as part of \`Autoconf' from any GNU
|
||||
archive site."
|
||||
|
||||
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
|
||||
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo "#! /bin/sh"
|
||||
echo "# Created by GNU Automake missing as a replacement of"
|
||||
echo "# $ $@"
|
||||
echo "exit 0"
|
||||
chmod +x $file
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
bison|yacc)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' $msg. You should only need it if
|
||||
you modified a \`.y' file. You may need the \`Bison' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Bison' from any GNU archive site."
|
||||
rm -f y.tab.c y.tab.h
|
||||
if [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.y)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.c
|
||||
fi
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.h
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f y.tab.h ]; then
|
||||
echo >y.tab.h
|
||||
fi
|
||||
if [ ! -f y.tab.c ]; then
|
||||
echo 'main() { return 0; }' >y.tab.c
|
||||
fi
|
||||
;;
|
||||
|
||||
lex|flex)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a \`.l' file. You may need the \`Flex' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Flex' from any GNU archive site."
|
||||
rm -f lex.yy.c
|
||||
if [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.l)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" lex.yy.c
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f lex.yy.c ]; then
|
||||
echo 'main() { return 0; }' >lex.yy.c
|
||||
fi
|
||||
;;
|
||||
|
||||
help2man)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a dependency of a manual page. You may need the
|
||||
\`Help2man' package in order for those modifications to take
|
||||
effect. You can get \`Help2man' from any GNU archive site."
|
||||
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
|
||||
fi
|
||||
if [ -f "$file" ]; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo ".ab help2man is required to generate this page"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
makeinfo)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a \`.texi' or \`.texinfo' file, or any other file
|
||||
indirectly affecting the aspect of the manual. The spurious
|
||||
call might also be the consequence of using a buggy \`make' (AIX,
|
||||
DU, IRIX). You might want to install the \`Texinfo' package or
|
||||
the \`GNU make' package. Grab either from any GNU archive site."
|
||||
# The file to touch is that specified with -o ...
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
# ... or it is the one specified with @setfilename ...
|
||||
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
|
||||
# ... or it is derived from the source name (dir/f.texi becomes f.info)
|
||||
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
|
||||
fi
|
||||
touch $file
|
||||
;;
|
||||
|
||||
tar)
|
||||
shift
|
||||
|
||||
# We have already tried tar in the generic part.
|
||||
# Look for gnutar/gtar before invocation to avoid ugly error
|
||||
# messages.
|
||||
if (gnutar --version > /dev/null 2>&1); then
|
||||
gnutar "$@" && exit 0
|
||||
fi
|
||||
if (gtar --version > /dev/null 2>&1); then
|
||||
gtar "$@" && exit 0
|
||||
fi
|
||||
firstarg="$1"
|
||||
if shift; then
|
||||
case "$firstarg" in
|
||||
*o*)
|
||||
firstarg=`echo "$firstarg" | sed s/o//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
case "$firstarg" in
|
||||
*h*)
|
||||
firstarg=`echo "$firstarg" | sed s/h//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: I can't seem to be able to run \`tar' with the given arguments.
|
||||
You may want to install GNU tar or Free paxutils, or check the
|
||||
command line arguments."
|
||||
exit 1
|
||||
;;
|
||||
|
||||
*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and is $msg.
|
||||
You might have modified some files without having the
|
||||
proper tools for further handling them. Check the \`README' file,
|
||||
it often tells you about the needed prerequisites for installing
|
||||
this package. You may also peek at any GNU archive site, in case
|
||||
some other package would contain this missing \`$1' program."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
# Propagate the correct exit status (expected to be 127 for a program
|
||||
# not found, 63 for a program that failed due to version mismatch).
|
||||
exit $st
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
|
||||
@@ -28,11 +28,13 @@
|
||||
# of versions that can get confused (not even counting the m4 utility)!
|
||||
|
||||
# HDF5 currently uses the following versions of the autotools:
|
||||
AUTOCONF_VERSION="autoconf (GNU Autoconf) 2.68"
|
||||
AUTOMAKE_VERSION="automake (GNU automake) 1.11.1"
|
||||
AUTOHEADER_VERSION="autoheader (GNU Autoconf) 2.68"
|
||||
ACLOCAL_VERSION="aclocal (GNU automake) 1.11.1"
|
||||
LIBTOOL_VERSION="(GNU libtool) 2.4"
|
||||
AUTOCONF_VERSION="autoconf (GNU Autoconf) 2.69"
|
||||
AUTOMAKE_VERSION="automake (GNU automake) 1.14.1"
|
||||
AUTOHEADER_VERSION="autoheader (GNU Autoconf) 2.69"
|
||||
ACLOCAL_VERSION="aclocal (GNU automake) 1.14.1"
|
||||
LIBTOOL_VERSION="(GNU libtool) 2.4.2"
|
||||
M4_VERSION="m4 (GNU M4) 1.4.17"
|
||||
|
||||
#
|
||||
# When upgrading automake's version, don't forget to also update its
|
||||
# helper utilities, especially depcomp.
|
||||
@@ -40,20 +42,26 @@ LIBTOOL_VERSION="(GNU libtool) 2.4"
|
||||
|
||||
# If paths to autotools are not specified by the user, assume tools are
|
||||
# running on jam in /mnt/hdf/packages and set paths accordingly.
|
||||
if test -z ${AUTORECONF}; then
|
||||
AUTORECONF=/mnt/hdf/packages/autoconf/autoconf-2.69/bin/autoreconf
|
||||
fi
|
||||
if test -z ${AUTOCONF}; then
|
||||
AUTOCONF=/mnt/hdf/packages/autoconf/autoconf-2.68/bin/autoconf
|
||||
AUTOCONF=/mnt/hdf/packages/autoconf/autoconf-2.69/bin/autoconf
|
||||
fi
|
||||
if test -z ${AUTOMAKE}; then
|
||||
AUTOMAKE=/mnt/hdf/packages/automake/automake-1.11.1/bin/automake-1.11
|
||||
AUTOMAKE=/mnt/hdf/packages/automake/automake-1.14.1/bin/automake-1.14
|
||||
fi
|
||||
if test -z ${AUTOHEADER}; then
|
||||
AUTOHEADER=/mnt/hdf/packages/autoconf/autoconf-2.68/bin/autoheader
|
||||
AUTOHEADER=/mnt/hdf/packages/autoconf/autoconf-2.69/bin/autoheader
|
||||
fi
|
||||
if test -z ${ACLOCAL}; then
|
||||
ACLOCAL=/mnt/hdf/packages/automake/automake-1.11.1/bin/aclocal-1.11
|
||||
ACLOCAL=/mnt/hdf/packages/automake/automake-1.14.1/bin/aclocal-1.14
|
||||
fi
|
||||
if test -z ${LIBTOOL}; then
|
||||
LIBTOOL=/mnt/hdf/packages/libtool/libtool-2.4/bin/libtool
|
||||
LIBTOOL=/mnt/hdf/packages/libtool/libtool-2.4.2/bin/libtool
|
||||
fi
|
||||
if test -z ${M4}; then
|
||||
M4=/mnt/hdf/packages/m4/m4-1.4.17/bin/m4
|
||||
fi
|
||||
|
||||
# Check version numbers of all autotools against the "correct" versions
|
||||
@@ -82,14 +90,17 @@ if test -z "${LT_VERS}"; then
|
||||
echo "${LIBTOOL} version is not ${LIBTOOL_VERSION}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Use the latest version of M4
|
||||
PATH=/mnt/hdf/packages/m4/m4-1.4.15/bin:/mnt/hdf/packages/m4/m4-1.4.15/share:$PATH
|
||||
M4_VERS=`${M4} --version 2>&1 | grep "${M4_VERSION}"`
|
||||
if test -z "${M4_VERS}"; then
|
||||
echo "${M4} version is not ${M4_VERSION}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Make sure that the tools are in the path.
|
||||
AUTOCONF_DIR=`dirname ${AUTOCONF}`
|
||||
LIBTOOL_DIR=`dirname ${LIBTOOL}`
|
||||
PATH=${AUTOCONF_DIR}:$PATH
|
||||
M4_DIR=`dirname ${M4}`
|
||||
PATH=${AUTOCONF_DIR}:${M4_DIR}:$PATH
|
||||
|
||||
# Run autoconf/automake commands in order
|
||||
echo ${ACLOCAL} -I ${LIBTOOL_DIR}/../share/aclocal
|
||||
@@ -132,4 +143,10 @@ echo
|
||||
echo " Running API version generation script:"
|
||||
bin/make_vers src/H5vers.txt || exit 1
|
||||
|
||||
# Run flex
|
||||
# automatically generates the lexical file for hl/src/H5LTanalyze.c
|
||||
echo
|
||||
echo " Running flex generation script:"
|
||||
bin/genltanalyze || exit 1
|
||||
|
||||
exit 0
|
||||
|
||||
113
bin/release
113
bin/release
@@ -40,45 +40,114 @@
|
||||
USAGE()
|
||||
{
|
||||
cat << EOF
|
||||
Usage: $0 [--nocheck] [-d <dir>] [-h] <methods> ...
|
||||
Usage: $0 -d <dir> [-h] [--nocheck] [--private] <methods> ...
|
||||
-d DIR The name of the directory where the releas(es) should be
|
||||
placed. By default, the directory is ./releases
|
||||
|
||||
placed.
|
||||
-h print the help page.
|
||||
--nocheck Ignore errors in MANIFEST file.
|
||||
|
||||
--private Make a private release with today's date in version information.
|
||||
|
||||
This must be run at the top level of the source directory.
|
||||
The other command-line options are the names of the programs to use
|
||||
for compressing the resulting tar archive (if none are given then
|
||||
"tar md5" is assumed):
|
||||
|
||||
tar -- use tar and don't do any compressing.
|
||||
compress -- use compress and append ".Z" to the output name.
|
||||
gzip -- use gzip with "-9" and append ".gz" to the output name.
|
||||
bzip2 -- use bzip2 with "-9" and append ".bz2" to the output name.
|
||||
zip -- convert all text files to DOS style and form a zip file for Windows use.
|
||||
md5 -- produce a md5 checksum in addition to the archive.
|
||||
doc -- produce the latest doc tree in addition to the archive.
|
||||
|
||||
Examples:
|
||||
|
||||
$ release
|
||||
releases/hdf5-1.0.38.tar
|
||||
releases/hdf5-1.0.38.tar.md5
|
||||
$ bin/release -d /tmp
|
||||
/tmp/hdf5-1.8.13-RELEASE.txt
|
||||
/tmp/hdf5-1.8.13.tar
|
||||
/tmp/hdf5-1.8.13.tar.md5
|
||||
|
||||
$ release gzip
|
||||
releases/hdf5-1.0.38.tar.gz
|
||||
$ bin/release -d /tmp gzip
|
||||
/tmp/hdf5-1.8.13-RELEASE.txt
|
||||
/tmp/hdf5-1.8.13.tar.gz
|
||||
|
||||
$ release -d /tmp tar compress gzip bzip2 md5
|
||||
/tmp/hdf5-1.0.38.tar
|
||||
/tmp/hdf5-1.0.38.tar.Z
|
||||
/tmp/hdf5-1.0.38.tar.gz
|
||||
/tmp/hdf5-1.0.38.tar.bz2
|
||||
/tmp/hdf5-1.0.38.tar.md5
|
||||
$ bin/release -d /tmp tar gzip zip md5
|
||||
/tmp/hdf5-1.8.13-RELEASE.txt
|
||||
/tmp/hdf5-1.8.13.tar
|
||||
/tmp/hdf5-1.8.13.tar.gz
|
||||
/tmp/hdf5-1.8.13.tar.md5
|
||||
/tmp/hdf5-1.8.13.tar.zip
|
||||
|
||||
EOF
|
||||
|
||||
}
|
||||
|
||||
# Function name: tar2zip
|
||||
# Convert the release tarball to a Windows zipball.
|
||||
#
|
||||
# Programmer: Albert Cheng
|
||||
# Creation date: 2014-04-23
|
||||
#
|
||||
# Modifications
|
||||
#
|
||||
# Steps:
|
||||
# 1. untar the tarball in a temporay directory;
|
||||
# Note: do this in a temporary directory to avoid changing
|
||||
# the original source directory which maybe around.
|
||||
# 2. convert all its text files to DOS (LF-CR) style;
|
||||
# 3. form a zip file which is usable by Windows users.
|
||||
#
|
||||
# Parameters:
|
||||
# $1 version
|
||||
# $2 release tarball
|
||||
# $3 output zipball file name
|
||||
#
|
||||
# Returns 0 if successful; 1 otherwise
|
||||
#
|
||||
tar2zip()
|
||||
{
|
||||
if [ $# -ne 3 ]; then
|
||||
echo "usage: tar2zip <tarfilename> <zipfilename>"
|
||||
return 1
|
||||
fi
|
||||
ztmpdir=/tmp/tmpdir$$
|
||||
mkdir -p $ztmpdir
|
||||
version=$1
|
||||
tarfile=$2
|
||||
zipfile=$3
|
||||
|
||||
# step 1: untar tarball in ztmpdir
|
||||
(cd $ztmpdir; tar xf -) < $tarfile
|
||||
# sanity check
|
||||
if [ ! -d $ztmpdir/$version ]; then
|
||||
echo "untar did not create $ztmpdir/$version source dir"
|
||||
# cleanup
|
||||
rm -rf $ztmpdir
|
||||
return 1
|
||||
fi
|
||||
# step 2: convert text files
|
||||
# There maybe a simpler way to do this.
|
||||
# options used in unix2dos:
|
||||
# -k Keep the date stamp
|
||||
# -q quiet mode
|
||||
# grep redirect output to /dev/null because -q or -s are not portable.
|
||||
find $ztmpdir/$version | \
|
||||
while read inf; do \
|
||||
if file $inf | grep "$inf\: .*text" > /dev/null 2>&1 ; then \
|
||||
unix2dos -q -k $inf; \
|
||||
fi\
|
||||
done
|
||||
# step 3: make zipball
|
||||
# -9 maximum compression
|
||||
# -y Store symbolic links as such in the zip archive
|
||||
# -r recursive
|
||||
# -q quiet
|
||||
(cd $ztmpdir; zip -9 -y -r -q $version.zip $version)
|
||||
mv $ztmpdir/$version.zip $zipfile
|
||||
|
||||
# cleanup
|
||||
rm -rf $ztmpdir
|
||||
}
|
||||
|
||||
# This command must be run at the top level of the hdf5 source directory.
|
||||
# Verify this requirement.
|
||||
if [ ! \( -f configure -a -f bin/release \) ]; then
|
||||
@@ -225,10 +294,6 @@ for comp in $methods; do
|
||||
tar)
|
||||
cp -p $tmpdir/$HDF5_VERS.tar $DEST/$HDF5_VERS.tar
|
||||
;;
|
||||
compress)
|
||||
test "$verbose" && echo " Running compress..." 1>&2
|
||||
compress -c <$tmpdir/$HDF5_VERS.tar >$DEST/$HDF5_VERS.tar.Z
|
||||
;;
|
||||
gzip)
|
||||
test "$verbose" && echo " Running gzip..." 1>&2
|
||||
gzip -9 <$tmpdir/$HDF5_VERS.tar >$DEST/$HDF5_VERS.tar.gz
|
||||
@@ -237,6 +302,10 @@ for comp in $methods; do
|
||||
test "$verbose" && echo " Running bzip2..." 1>&2
|
||||
bzip2 -9 <$tmpdir/$HDF5_VERS.tar >$DEST/$HDF5_VERS.tar.bz2
|
||||
;;
|
||||
zip)
|
||||
test "$verbose" && echo " Creating zip ball..." 1>&2
|
||||
tar2zip $HDF5_VERS $tmpdir/$HDF5_VERS.tar $DEST/$HDF5_VERS.zip 1>&2
|
||||
;;
|
||||
md5)
|
||||
test "$verbose" && echo " Creating checksum..." 1>&2
|
||||
(cd $tmpdir; md5sum $HDF5_VERS.tar ) > $DEST/$HDF5_VERS.tar.md5
|
||||
@@ -255,6 +324,10 @@ for comp in $methods; do
|
||||
(cd $tmpdir && tar cf ${HDF5_VERS}_docs.tar ${HDF5_VERS}_docs)
|
||||
mv $tmpdir/${HDF5_VERS}_docs.tar $DEST
|
||||
;;
|
||||
*)
|
||||
echo "***Error*** Unknown method $comp"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ ZLIB_default=
|
||||
ZLIB=$ZLIB_default
|
||||
|
||||
# What compression methods to use? (md5 does checksum).
|
||||
METHODS="gzip bzip2 md5 doc"
|
||||
METHODS="gzip zip bzip2 md5 doc"
|
||||
|
||||
# Use User's MAKE if set. Else use generic make.
|
||||
MAKE=${MAKE:-make}
|
||||
|
||||
139
bin/test-driver
Executable file
139
bin/test-driver
Executable file
@@ -0,0 +1,139 @@
|
||||
#! /bin/sh
|
||||
# test-driver - basic testsuite driver script.
|
||||
|
||||
scriptversion=2013-07-13.22; # UTC
|
||||
|
||||
# Copyright (C) 2011-2013 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
# Make unconditional expansion of undefined variables an error. This
|
||||
# helps a lot in preventing typo-related bugs.
|
||||
set -u
|
||||
|
||||
usage_error ()
|
||||
{
|
||||
echo "$0: $*" >&2
|
||||
print_usage >&2
|
||||
exit 2
|
||||
}
|
||||
|
||||
print_usage ()
|
||||
{
|
||||
cat <<END
|
||||
Usage:
|
||||
test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
|
||||
[--expect-failure={yes|no}] [--color-tests={yes|no}]
|
||||
[--enable-hard-errors={yes|no}] [--]
|
||||
TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS]
|
||||
The '--test-name', '--log-file' and '--trs-file' options are mandatory.
|
||||
END
|
||||
}
|
||||
|
||||
test_name= # Used for reporting.
|
||||
log_file= # Where to save the output of the test script.
|
||||
trs_file= # Where to save the metadata of the test run.
|
||||
expect_failure=no
|
||||
color_tests=no
|
||||
enable_hard_errors=yes
|
||||
while test $# -gt 0; do
|
||||
case $1 in
|
||||
--help) print_usage; exit $?;;
|
||||
--version) echo "test-driver $scriptversion"; exit $?;;
|
||||
--test-name) test_name=$2; shift;;
|
||||
--log-file) log_file=$2; shift;;
|
||||
--trs-file) trs_file=$2; shift;;
|
||||
--color-tests) color_tests=$2; shift;;
|
||||
--expect-failure) expect_failure=$2; shift;;
|
||||
--enable-hard-errors) enable_hard_errors=$2; shift;;
|
||||
--) shift; break;;
|
||||
-*) usage_error "invalid option: '$1'";;
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
missing_opts=
|
||||
test x"$test_name" = x && missing_opts="$missing_opts --test-name"
|
||||
test x"$log_file" = x && missing_opts="$missing_opts --log-file"
|
||||
test x"$trs_file" = x && missing_opts="$missing_opts --trs-file"
|
||||
if test x"$missing_opts" != x; then
|
||||
usage_error "the following mandatory options are missing:$missing_opts"
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
usage_error "missing argument"
|
||||
fi
|
||||
|
||||
if test $color_tests = yes; then
|
||||
# Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
|
||||
red='[0;31m' # Red.
|
||||
grn='[0;32m' # Green.
|
||||
lgn='[1;32m' # Light green.
|
||||
blu='[1;34m' # Blue.
|
||||
mgn='[0;35m' # Magenta.
|
||||
std='[m' # No color.
|
||||
else
|
||||
red= grn= lgn= blu= mgn= std=
|
||||
fi
|
||||
|
||||
do_exit='rm -f $log_file $trs_file; (exit $st); exit $st'
|
||||
trap "st=129; $do_exit" 1
|
||||
trap "st=130; $do_exit" 2
|
||||
trap "st=141; $do_exit" 13
|
||||
trap "st=143; $do_exit" 15
|
||||
|
||||
# Test script is run here.
|
||||
"$@" >$log_file 2>&1
|
||||
estatus=$?
|
||||
if test $enable_hard_errors = no && test $estatus -eq 99; then
|
||||
estatus=1
|
||||
fi
|
||||
|
||||
case $estatus:$expect_failure in
|
||||
0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
|
||||
0:*) col=$grn res=PASS recheck=no gcopy=no;;
|
||||
77:*) col=$blu res=SKIP recheck=no gcopy=yes;;
|
||||
99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;;
|
||||
*:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;;
|
||||
*:*) col=$red res=FAIL recheck=yes gcopy=yes;;
|
||||
esac
|
||||
|
||||
# Report outcome to console.
|
||||
echo "${col}${res}${std}: $test_name"
|
||||
|
||||
# Register the test result, and other relevant metadata.
|
||||
echo ":test-result: $res" > $trs_file
|
||||
echo ":global-test-result: $res" >> $trs_file
|
||||
echo ":recheck: $recheck" >> $trs_file
|
||||
echo ":copy-in-global-log: $gcopy" >> $trs_file
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
@@ -38,6 +38,7 @@ $Source = "";
|
||||
"H5FD_mpio_chunk_opt_t" => "Dh",
|
||||
"H5D_mpio_actual_io_mode_t" => "Di",
|
||||
"H5D_layout_t" => "Dl",
|
||||
"H5D_mpio_no_collective_cause_t" => "Dn",
|
||||
"H5D_mpio_actual_chunk_opt_mode_t" => "Do",
|
||||
"H5D_space_status_t" => "Ds",
|
||||
"H5FD_mpio_xfer_t" => "Dt",
|
||||
@@ -63,6 +64,7 @@ $Source = "";
|
||||
"int32_t" => "Is",
|
||||
"unsigned" => "Iu",
|
||||
"unsigned int" => "Iu",
|
||||
"uint32_t" => "Iu",
|
||||
"H5I_type_t" => "It",
|
||||
"H5G_link_t" => "Ll", #Same as H5L_type_t now
|
||||
"H5L_type_t" => "Ll",
|
||||
@@ -75,6 +77,7 @@ $Source = "";
|
||||
"hobj_ref_t" => "r",
|
||||
"H5R_type_t" => "Rt",
|
||||
"char" => "s",
|
||||
"unsigned char" => "s",
|
||||
"H5S_class_t" => "Sc",
|
||||
"H5S_seloper_t" => "Ss",
|
||||
"H5S_sel_type" => "St",
|
||||
@@ -97,7 +100,9 @@ $Source = "";
|
||||
"H5A_operator2_t" => "x",
|
||||
"H5A_info_t" => "x",
|
||||
"H5AC_cache_config_t" => "x",
|
||||
"H5D_gather_func_t" => "x",
|
||||
"H5D_operator_t" => "x",
|
||||
"H5D_scatter_func_t" => "x",
|
||||
"H5E_auto_t" => "x",
|
||||
"H5E_auto1_t" => "x",
|
||||
"H5E_auto2_t" => "x",
|
||||
@@ -109,6 +114,7 @@ $Source = "";
|
||||
"H5FD_t" => "x",
|
||||
"H5FD_class_t" => "x",
|
||||
"H5FD_stream_fapl_t" => "x",
|
||||
"H5FD_file_image_callbacks_t" => "x",
|
||||
"H5G_iterate_t" => "x",
|
||||
"H5G_info_t" => "x",
|
||||
"H5I_free_t" => "x",
|
||||
@@ -119,6 +125,7 @@ $Source = "";
|
||||
"H5MM_free_t" => "x",
|
||||
"H5O_info_t" => "x",
|
||||
"H5O_iterate_t" => "x",
|
||||
"H5O_mcdt_search_cb_t" => "x",
|
||||
"H5P_cls_create_func_t" => "x",
|
||||
"H5P_cls_copy_func_t" => "x",
|
||||
"H5P_cls_close_func_t" => "x",
|
||||
@@ -135,6 +142,7 @@ $Source = "";
|
||||
"H5T_conv_except_func_t" => "x",
|
||||
"H5Z_func_t" => "x",
|
||||
"H5Z_filter_func_t" => "x",
|
||||
"va_list" => "x",
|
||||
"size_t" => "z",
|
||||
"H5Z_SO_scale_type_t" => "Za",
|
||||
"H5Z_class_t" => "Zc",
|
||||
|
||||
@@ -1,19 +1,24 @@
|
||||
cmake_minimum_required (VERSION 2.8.6)
|
||||
cmake_minimum_required (VERSION 3.1.0)
|
||||
PROJECT (HDF5_CPP)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Apply Definitions to compiler in this directory and below
|
||||
#-----------------------------------------------------------------------------
|
||||
add_definitions (${HDF_EXTRA_C_FLAGS})
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Shared/Static Libs
|
||||
#-----------------------------------------------------------------------------
|
||||
IF (BUILD_SHARED_LIBS)
|
||||
SET (CPP_BUILT_AS_DYNAMIC_LIB 1)
|
||||
ELSE (BUILD_SHARED_LIBS)
|
||||
SET (CPP_BUILT_AS_STATIC_LIB 1)
|
||||
ENDIF (BUILD_SHARED_LIBS)
|
||||
if (BUILD_SHARED_LIBS)
|
||||
set (CPP_BUILT_AS_DYNAMIC_LIB 1)
|
||||
else (BUILD_SHARED_LIBS)
|
||||
set (CPP_BUILT_AS_STATIC_LIB 1)
|
||||
endif (BUILD_SHARED_LIBS)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Generate configure file
|
||||
#-----------------------------------------------------------------------------
|
||||
CONFIGURE_FILE (${HDF5_RESOURCES_DIR}/H5cxx_config.h.in
|
||||
configure_file (${HDF_RESOURCES_DIR}/H5cxx_config.h.in
|
||||
${HDF5_BINARY_DIR}/H5cxx_pubconf.h
|
||||
)
|
||||
|
||||
@@ -26,23 +31,23 @@ INCLUDE_DIRECTORIES (${HDF5_BINARY_DIR})
|
||||
#-----------------------------------------------------------------------------
|
||||
# Parallel/MPI, prevent spurious cpp/cxx warnings
|
||||
#-----------------------------------------------------------------------------
|
||||
IF (H5_HAVE_PARALLEL)
|
||||
ADD_DEFINITIONS ("-DMPICH_SKIP_MPICXX")
|
||||
ADD_DEFINITIONS ("-DMPICH_IGNORE_CXX_SEEK")
|
||||
ENDIF (H5_HAVE_PARALLEL)
|
||||
if (H5_HAVE_PARALLEL)
|
||||
add_definitions ("-DMPICH_SKIP_MPICXX")
|
||||
add_definitions ("-DMPICH_IGNORE_CXX_SEEK")
|
||||
endif (H5_HAVE_PARALLEL)
|
||||
|
||||
ADD_SUBDIRECTORY (${HDF5_CPP_SOURCE_DIR}/src ${HDF5_CPP_BINARY_DIR}/src)
|
||||
add_subdirectory (${HDF5_CPP_SOURCE_DIR}/src ${HDF5_CPP_BINARY_DIR}/src)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Build the CPP Examples
|
||||
#-----------------------------------------------------------------------------
|
||||
IF (HDF5_BUILD_EXAMPLES)
|
||||
ADD_SUBDIRECTORY (${HDF5_CPP_SOURCE_DIR}/examples ${HDF5_CPP_BINARY_DIR}/examples)
|
||||
ENDIF (HDF5_BUILD_EXAMPLES)
|
||||
if (HDF5_BUILD_EXAMPLES)
|
||||
add_subdirectory (${HDF5_CPP_SOURCE_DIR}/examples ${HDF5_CPP_BINARY_DIR}/examples)
|
||||
endif (HDF5_BUILD_EXAMPLES)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Build the CPP unit tests
|
||||
#-----------------------------------------------------------------------------
|
||||
IF (BUILD_TESTING)
|
||||
ADD_SUBDIRECTORY (${HDF5_CPP_SOURCE_DIR}/test ${HDF5_CPP_BINARY_DIR}/test)
|
||||
ENDIF (BUILD_TESTING)
|
||||
if (BUILD_TESTING)
|
||||
add_subdirectory (${HDF5_CPP_SOURCE_DIR}/test ${HDF5_CPP_BINARY_DIR}/test)
|
||||
endif (BUILD_TESTING)
|
||||
|
||||
0
c++/COPYING
Executable file → Normal file
0
c++/COPYING
Executable file → Normal file
683
c++/Makefile.in
683
c++/Makefile.in
@@ -1,9 +1,8 @@
|
||||
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.14.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
|
||||
# Inc.
|
||||
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
@@ -32,6 +31,51 @@
|
||||
# Top-level HDF5-C++ Makefile(.in)
|
||||
#
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
@@ -50,43 +94,274 @@ PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
|
||||
$(top_srcdir)/config/commence.am \
|
||||
$(top_srcdir)/config/conclude.am COPYING
|
||||
DIST_COMMON = $(top_srcdir)/config/commence.am \
|
||||
$(top_srcdir)/config/conclude.am $(srcdir)/Makefile.in \
|
||||
$(srcdir)/Makefile.am $(top_srcdir)/bin/mkinstalldirs \
|
||||
$(top_srcdir)/bin/test-driver COPYING
|
||||
TESTS =
|
||||
subdir = c++
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \
|
||||
$(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/src/H5config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_GEN = $(am__v_GEN_$(V))
|
||||
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
AM_V_at = $(am__v_at_$(V))
|
||||
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-dvi-recursive install-exec-recursive \
|
||||
install-html-recursive install-info-recursive \
|
||||
install-pdf-recursive install-ps-recursive install-recursive \
|
||||
installcheck-recursive installdirs-recursive pdf-recursive \
|
||||
ps-recursive uninstall-recursive
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
|
||||
ctags-recursive dvi-recursive html-recursive info-recursive \
|
||||
install-data-recursive install-dvi-recursive \
|
||||
install-exec-recursive install-html-recursive \
|
||||
install-info-recursive install-pdf-recursive \
|
||||
install-ps-recursive install-recursive installcheck-recursive \
|
||||
installdirs-recursive pdf-recursive ps-recursive \
|
||||
tags-recursive uninstall-recursive
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||
distclean-recursive maintainer-clean-recursive
|
||||
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
|
||||
$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
|
||||
distdir
|
||||
am__recursive_targets = \
|
||||
$(RECURSIVE_TARGETS) \
|
||||
$(RECURSIVE_CLEAN_TARGETS) \
|
||||
$(am__extra_recursive_targets)
|
||||
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
|
||||
check recheck distdir
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
# and print each of them once, without duplicates. Input order is
|
||||
# *not* preserved.
|
||||
am__uniquify_input = $(AWK) '\
|
||||
BEGIN { nonempty = 0; } \
|
||||
{ items[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in items) print i; }; } \
|
||||
'
|
||||
# Make sure the list of sources is unique. This is necessary because,
|
||||
# e.g., the same source file might be shared among _SOURCES variables
|
||||
# for different programs/libraries.
|
||||
am__define_uniq_tagged_files = \
|
||||
list='$(am__tagged_files)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
am__tty_colors = \
|
||||
red=; grn=; lgn=; blu=; std=
|
||||
am__tty_colors_dummy = \
|
||||
mgn= red= grn= lgn= blu= brg= std=; \
|
||||
am__color_tests=no
|
||||
am__tty_colors = { \
|
||||
$(am__tty_colors_dummy); \
|
||||
if test "X$(AM_COLOR_TESTS)" = Xno; then \
|
||||
am__color_tests=no; \
|
||||
elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
|
||||
am__color_tests=yes; \
|
||||
elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
|
||||
am__color_tests=yes; \
|
||||
fi; \
|
||||
if test $$am__color_tests = yes; then \
|
||||
red='[0;31m'; \
|
||||
grn='[0;32m'; \
|
||||
lgn='[1;32m'; \
|
||||
blu='[1;34m'; \
|
||||
mgn='[0;35m'; \
|
||||
brg='[1m'; \
|
||||
std='[m'; \
|
||||
fi; \
|
||||
}
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__uninstall_files_from_dir = { \
|
||||
test -z "$$files" \
|
||||
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||
}
|
||||
am__recheck_rx = ^[ ]*:recheck:[ ]*
|
||||
am__global_test_result_rx = ^[ ]*:global-test-result:[ ]*
|
||||
am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]*
|
||||
# A command that, given a newline-separated list of test names on the
|
||||
# standard input, print the name of the tests that are to be re-run
|
||||
# upon "make recheck".
|
||||
am__list_recheck_tests = $(AWK) '{ \
|
||||
recheck = 1; \
|
||||
while ((rc = (getline line < ($$0 ".trs"))) != 0) \
|
||||
{ \
|
||||
if (rc < 0) \
|
||||
{ \
|
||||
if ((getline line2 < ($$0 ".log")) < 0) \
|
||||
recheck = 0; \
|
||||
break; \
|
||||
} \
|
||||
else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
|
||||
{ \
|
||||
recheck = 0; \
|
||||
break; \
|
||||
} \
|
||||
else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
|
||||
{ \
|
||||
break; \
|
||||
} \
|
||||
}; \
|
||||
if (recheck) \
|
||||
print $$0; \
|
||||
close ($$0 ".trs"); \
|
||||
close ($$0 ".log"); \
|
||||
}'
|
||||
# A command that, given a newline-separated list of test names on the
|
||||
# standard input, create the global log from their .trs and .log files.
|
||||
am__create_global_log = $(AWK) ' \
|
||||
function fatal(msg) \
|
||||
{ \
|
||||
print "fatal: making $@: " msg | "cat >&2"; \
|
||||
exit 1; \
|
||||
} \
|
||||
function rst_section(header) \
|
||||
{ \
|
||||
print header; \
|
||||
len = length(header); \
|
||||
for (i = 1; i <= len; i = i + 1) \
|
||||
printf "="; \
|
||||
printf "\n\n"; \
|
||||
} \
|
||||
{ \
|
||||
copy_in_global_log = 1; \
|
||||
global_test_result = "RUN"; \
|
||||
while ((rc = (getline line < ($$0 ".trs"))) != 0) \
|
||||
{ \
|
||||
if (rc < 0) \
|
||||
fatal("failed to read from " $$0 ".trs"); \
|
||||
if (line ~ /$(am__global_test_result_rx)/) \
|
||||
{ \
|
||||
sub("$(am__global_test_result_rx)", "", line); \
|
||||
sub("[ ]*$$", "", line); \
|
||||
global_test_result = line; \
|
||||
} \
|
||||
else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
|
||||
copy_in_global_log = 0; \
|
||||
}; \
|
||||
if (copy_in_global_log) \
|
||||
{ \
|
||||
rst_section(global_test_result ": " $$0); \
|
||||
while ((rc = (getline line < ($$0 ".log"))) != 0) \
|
||||
{ \
|
||||
if (rc < 0) \
|
||||
fatal("failed to read from " $$0 ".log"); \
|
||||
print line; \
|
||||
}; \
|
||||
printf "\n"; \
|
||||
}; \
|
||||
close ($$0 ".trs"); \
|
||||
close ($$0 ".log"); \
|
||||
}'
|
||||
# Restructured Text title.
|
||||
am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
|
||||
# Solaris 10 'make', and several other traditional 'make' implementations,
|
||||
# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
|
||||
# by disabling -e (using the XSI extension "set +e") if it's set.
|
||||
am__sh_e_setup = case $$- in *e*) set +e;; esac
|
||||
# Default flags passed to test drivers.
|
||||
am__common_driver_flags = \
|
||||
--color-tests "$$am__color_tests" \
|
||||
--enable-hard-errors "$$am__enable_hard_errors" \
|
||||
--expect-failure "$$am__expect_failure"
|
||||
# To be inserted before the command running the test. Creates the
|
||||
# directory for the log if needed. Stores in $dir the directory
|
||||
# containing $f, in $tst the test, in $log the log. Executes the
|
||||
# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
|
||||
# passes TESTS_ENVIRONMENT. Set up options for the wrapper that
|
||||
# will run the test scripts (or their associated LOG_COMPILER, if
|
||||
# thy have one).
|
||||
am__check_pre = \
|
||||
$(am__sh_e_setup); \
|
||||
$(am__vpath_adj_setup) $(am__vpath_adj) \
|
||||
$(am__tty_colors); \
|
||||
srcdir=$(srcdir); export srcdir; \
|
||||
case "$@" in \
|
||||
*/*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
|
||||
*) am__odir=.;; \
|
||||
esac; \
|
||||
test "x$$am__odir" = x"." || test -d "$$am__odir" \
|
||||
|| $(MKDIR_P) "$$am__odir" || exit $$?; \
|
||||
if test -f "./$$f"; then dir=./; \
|
||||
elif test -f "$$f"; then dir=; \
|
||||
else dir="$(srcdir)/"; fi; \
|
||||
tst=$$dir$$f; log='$@'; \
|
||||
if test -n '$(DISABLE_HARD_ERRORS)'; then \
|
||||
am__enable_hard_errors=no; \
|
||||
else \
|
||||
am__enable_hard_errors=yes; \
|
||||
fi; \
|
||||
case " $(XFAIL_TESTS) " in \
|
||||
*[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
|
||||
am__expect_failure=yes;; \
|
||||
*) \
|
||||
am__expect_failure=no;; \
|
||||
esac; \
|
||||
$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
|
||||
# A shell command to get the names of the tests scripts with any registered
|
||||
# extension removed (i.e., equivalently, the names of the test logs, with
|
||||
# the '.log' extension removed). The result is saved in the shell variable
|
||||
# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly,
|
||||
# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
|
||||
# since that might cause problem with VPATH rewrites for suffix-less tests.
|
||||
# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
|
||||
am__set_TESTS_bases = \
|
||||
bases='$(TEST_LOGS)'; \
|
||||
bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
|
||||
bases=`echo $$bases`
|
||||
RECHECK_LOGS = $(TEST_LOGS)
|
||||
TEST_SUITE_LOG = test-suite.log
|
||||
am__test_logs1 = $(TESTS:=.log)
|
||||
am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
|
||||
TEST_LOGS = $(am__test_logs2:.sh.log=.log)
|
||||
SH_LOG_DRIVER = $(SHELL) $(top_srcdir)/bin/test-driver
|
||||
SH_LOG_COMPILE = $(SH_LOG_COMPILER) $(AM_SH_LOG_FLAGS) $(SH_LOG_FLAGS)
|
||||
am__set_b = \
|
||||
case '$@' in \
|
||||
*/*) \
|
||||
case '$*' in \
|
||||
*/*) b='$*';; \
|
||||
*) b=`echo '$@' | sed 's/\.log$$//'`; \
|
||||
esac;; \
|
||||
*) \
|
||||
b='$*';; \
|
||||
esac
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
am__relativize = \
|
||||
dir0=`pwd`; \
|
||||
@@ -113,7 +388,7 @@ am__relativize = \
|
||||
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
|
||||
done; \
|
||||
reldir="$$dir2"
|
||||
ACLOCAL = /home1/packages/automake/automake-1.9.6/bin/aclocal-1.9 -I /afs/ncsa/projects/hdf/packages/libtool_1.5.14/Linux_2.4/share/aclocal
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@
|
||||
AMTAR = @AMTAR@
|
||||
|
||||
@@ -131,12 +406,9 @@ AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
|
||||
AM_MAKEFLAGS = @AM_MAKEFLAGS@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
|
||||
# Set the paths for AFS installs of autotools for Linux machines
|
||||
# Ideally, these tools should never be needed during the build.
|
||||
AUTOCONF = /home1/packages/autoconf/autoconf-2.60/bin/autoconf
|
||||
AUTOHEADER = /home1/packages/autoconf/autoconf-2.60/bin/autoheader
|
||||
AUTOMAKE = /home1/packages/automake/automake-1.9.6/bin/automake-1.9
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BYTESEX = @BYTESEX@
|
||||
CC = @CC@
|
||||
@@ -186,7 +458,6 @@ FC_VERSION = @FC_VERSION@
|
||||
FGREP = @FGREP@
|
||||
FILTERS = @FILTERS@
|
||||
FSEARCH_DIRS = @FSEARCH_DIRS@
|
||||
GPFS = @GPFS@
|
||||
GREP = @GREP@
|
||||
H5_CFLAGS = @H5_CFLAGS@
|
||||
H5_CPPFLAGS = @H5_CPPFLAGS@
|
||||
@@ -200,6 +471,7 @@ H5_VERSION = @H5_VERSION@
|
||||
HADDR_T = @HADDR_T@
|
||||
HAVE_DMALLOC = @HAVE_DMALLOC@
|
||||
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
|
||||
HAVE_PTHREAD = @HAVE_PTHREAD@
|
||||
HDF5_HL = @HDF5_HL@
|
||||
HDF5_INTERFACES = @HDF5_INTERFACES@
|
||||
HDF_CXX = @HDF_CXX@
|
||||
@@ -217,7 +489,6 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INSTRUMENT = @INSTRUMENT@
|
||||
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
|
||||
LARGEFILE = @LARGEFILE@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
@@ -233,7 +504,6 @@ MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MPE = @MPE@
|
||||
MPI_GET_SIZE = @MPI_GET_SIZE@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
@@ -251,7 +521,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PARALLEL = @PARALLEL@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PERL = @PERL@
|
||||
PTHREAD = @PTHREAD@
|
||||
RANLIB = @RANLIB@
|
||||
ROOT = @ROOT@
|
||||
RUNPARALLEL = @RUNPARALLEL@
|
||||
@@ -408,6 +677,10 @@ LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
|
||||
PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \
|
||||
$(EXTRA_PROG)
|
||||
|
||||
chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
|
||||
TEST_EXTENSIONS = .sh
|
||||
SH_LOG_COMPILER = $(SHELL)
|
||||
AM_SH_LOG_FLAGS =
|
||||
TEST_PROG_CHKEXE = $(TEST_PROG:=.chkexe_)
|
||||
TEST_PROG_PARA_CHKEXE = $(TEST_PROG_PARA:=.chkexe_)
|
||||
TEST_SCRIPT_CHKSH = $(TEST_SCRIPT:=.chkexe_)
|
||||
@@ -415,6 +688,7 @@ TEST_SCRIPT_PARA_CHKSH = $(TEST_SCRIPT_PARA:=.chkexe_)
|
||||
all: all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .log .sh .sh$(EXEEXT) .trs
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/commence.am $(top_srcdir)/config/conclude.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
@@ -436,6 +710,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
$(top_srcdir)/config/commence.am $(top_srcdir)/config/conclude.am:
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
@@ -453,22 +728,25 @@ clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@fail= failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
# into them and run 'make' without going through this Makefile.
|
||||
# To change the values of 'make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in 'config.status', edit 'config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run 'make');
|
||||
# (2) otherwise, pass the desired values on the 'make' command line.
|
||||
$(am__recursive_targets):
|
||||
@fail=; \
|
||||
if $(am__make_keepgoing); then \
|
||||
failcom='fail=yes'; \
|
||||
else \
|
||||
failcom='exit 1'; \
|
||||
fi; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
@@ -483,57 +761,12 @@ $(RECURSIVE_TARGETS):
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
$(RECURSIVE_CLEAN_TARGETS):
|
||||
@fail= failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
ID: $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||
tags: tags-recursive
|
||||
TAGS: tags
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
@@ -549,12 +782,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
$(am__define_uniq_tagged_files); \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
@@ -566,15 +794,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
ctags: ctags-recursive
|
||||
|
||||
CTAGS: ctags
|
||||
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
@@ -583,10 +807,170 @@ GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
cscopelist: cscopelist-recursive
|
||||
|
||||
cscopelist-am: $(am__tagged_files)
|
||||
list='$(am__tagged_files)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
# Recover from deleted '.trs' file; this should ensure that
|
||||
# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
|
||||
# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells
|
||||
# to avoid problems with "make -n".
|
||||
.log.trs:
|
||||
rm -f $< $@
|
||||
$(MAKE) $(AM_MAKEFLAGS) $<
|
||||
|
||||
# Leading 'am--fnord' is there to ensure the list of targets does not
|
||||
# expand to empty, as could happen e.g. with make check TESTS=''.
|
||||
am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
|
||||
am--force-recheck:
|
||||
@:
|
||||
|
||||
$(TEST_SUITE_LOG): $(TEST_LOGS)
|
||||
@$(am__set_TESTS_bases); \
|
||||
am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
|
||||
redo_bases=`for i in $$bases; do \
|
||||
am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
|
||||
done`; \
|
||||
if test -n "$$redo_bases"; then \
|
||||
redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
|
||||
redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
|
||||
if $(am__make_dryrun); then :; else \
|
||||
rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
|
||||
fi; \
|
||||
fi; \
|
||||
if test -n "$$am__remaking_logs"; then \
|
||||
echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
|
||||
"recursion detected" >&2; \
|
||||
else \
|
||||
am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
|
||||
fi; \
|
||||
if $(am__make_dryrun); then :; else \
|
||||
st=0; \
|
||||
errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
|
||||
for i in $$redo_bases; do \
|
||||
test -f $$i.trs && test -r $$i.trs \
|
||||
|| { echo "$$errmsg $$i.trs" >&2; st=1; }; \
|
||||
test -f $$i.log && test -r $$i.log \
|
||||
|| { echo "$$errmsg $$i.log" >&2; st=1; }; \
|
||||
done; \
|
||||
test $$st -eq 0 || exit 1; \
|
||||
fi
|
||||
@$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
|
||||
ws='[ ]'; \
|
||||
results=`for b in $$bases; do echo $$b.trs; done`; \
|
||||
test -n "$$results" || results=/dev/null; \
|
||||
all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
|
||||
pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
|
||||
fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
|
||||
skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
|
||||
xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
|
||||
xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
|
||||
error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
|
||||
if test `expr $$fail + $$xpass + $$error` -eq 0; then \
|
||||
success=true; \
|
||||
else \
|
||||
success=false; \
|
||||
fi; \
|
||||
br='==================='; br=$$br$$br$$br$$br; \
|
||||
result_count () \
|
||||
{ \
|
||||
if test x"$$1" = x"--maybe-color"; then \
|
||||
maybe_colorize=yes; \
|
||||
elif test x"$$1" = x"--no-color"; then \
|
||||
maybe_colorize=no; \
|
||||
else \
|
||||
echo "$@: invalid 'result_count' usage" >&2; exit 4; \
|
||||
fi; \
|
||||
shift; \
|
||||
desc=$$1 count=$$2; \
|
||||
if test $$maybe_colorize = yes && test $$count -gt 0; then \
|
||||
color_start=$$3 color_end=$$std; \
|
||||
else \
|
||||
color_start= color_end=; \
|
||||
fi; \
|
||||
echo "$${color_start}# $$desc $$count$${color_end}"; \
|
||||
}; \
|
||||
create_testsuite_report () \
|
||||
{ \
|
||||
result_count $$1 "TOTAL:" $$all "$$brg"; \
|
||||
result_count $$1 "PASS: " $$pass "$$grn"; \
|
||||
result_count $$1 "SKIP: " $$skip "$$blu"; \
|
||||
result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
|
||||
result_count $$1 "FAIL: " $$fail "$$red"; \
|
||||
result_count $$1 "XPASS:" $$xpass "$$red"; \
|
||||
result_count $$1 "ERROR:" $$error "$$mgn"; \
|
||||
}; \
|
||||
{ \
|
||||
echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
|
||||
$(am__rst_title); \
|
||||
create_testsuite_report --no-color; \
|
||||
echo; \
|
||||
echo ".. contents:: :depth: 2"; \
|
||||
echo; \
|
||||
for b in $$bases; do echo $$b; done \
|
||||
| $(am__create_global_log); \
|
||||
} >$(TEST_SUITE_LOG).tmp || exit 1; \
|
||||
mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
|
||||
if $$success; then \
|
||||
col="$$grn"; \
|
||||
else \
|
||||
col="$$red"; \
|
||||
test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
|
||||
fi; \
|
||||
echo "$${col}$$br$${std}"; \
|
||||
echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \
|
||||
echo "$${col}$$br$${std}"; \
|
||||
create_testsuite_report --maybe-color; \
|
||||
echo "$$col$$br$$std"; \
|
||||
if $$success; then :; else \
|
||||
echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
|
||||
if test -n "$(PACKAGE_BUGREPORT)"; then \
|
||||
echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
|
||||
fi; \
|
||||
echo "$$col$$br$$std"; \
|
||||
fi; \
|
||||
$$success || exit 1
|
||||
recheck: all
|
||||
@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
|
||||
@set +e; $(am__set_TESTS_bases); \
|
||||
bases=`for i in $$bases; do echo $$i; done \
|
||||
| $(am__list_recheck_tests)` || exit 1; \
|
||||
log_list=`for i in $$bases; do echo $$i.log; done`; \
|
||||
log_list=`echo $$log_list`; \
|
||||
$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
|
||||
am__force_recheck=am--force-recheck \
|
||||
TEST_LOGS="$$log_list"; \
|
||||
exit $$?
|
||||
.sh.log:
|
||||
@p='$<'; \
|
||||
$(am__set_b); \
|
||||
$(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \
|
||||
--log-file $$b.log --trs-file $$b.trs \
|
||||
$(am__common_driver_flags) $(AM_SH_LOG_DRIVER_FLAGS) $(SH_LOG_DRIVER_FLAGS) -- $(SH_LOG_COMPILE) \
|
||||
"$$tst" $(AM_TESTS_FD_REDIRECT)
|
||||
@am__EXEEXT_TRUE@.sh$(EXEEXT).log:
|
||||
@am__EXEEXT_TRUE@ @p='$<'; \
|
||||
@am__EXEEXT_TRUE@ $(am__set_b); \
|
||||
@am__EXEEXT_TRUE@ $(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \
|
||||
@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
|
||||
@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_SH_LOG_DRIVER_FLAGS) $(SH_LOG_DRIVER_FLAGS) -- $(SH_LOG_COMPILE) \
|
||||
@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
@@ -619,13 +1003,10 @@ distdir: $(DISTFILES)
|
||||
done
|
||||
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
$(am__make_dryrun) \
|
||||
|| test -d "$(distdir)/$$subdir" \
|
||||
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
|
||||
$(am__relativize); \
|
||||
new_distdir=$$reldir; \
|
||||
@@ -661,11 +1042,19 @@ install-am: all-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
-test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
|
||||
-test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
|
||||
-test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
|
||||
|
||||
clean-generic:
|
||||
|
||||
@@ -743,23 +1132,21 @@ ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) check-am \
|
||||
ctags-recursive install-am install-strip tags-recursive
|
||||
.MAKE: $(am__recursive_targets) check-am install-am install-strip
|
||||
|
||||
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
|
||||
all all-am all-local check check-TESTS check-am clean \
|
||||
clean-generic clean-libtool ctags ctags-recursive distclean \
|
||||
distclean-generic distclean-libtool distclean-tags distdir dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-html install-html-am \
|
||||
install-info install-info-am install-man install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-strip \
|
||||
installcheck installcheck-am installcheck-local installdirs \
|
||||
installdirs-am maintainer-clean maintainer-clean-generic \
|
||||
mostlyclean mostlyclean-generic mostlyclean-libtool \
|
||||
mostlyclean-local pdf pdf-am ps ps-am tags tags-recursive \
|
||||
uninstall uninstall-am
|
||||
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \
|
||||
check check-TESTS check-am clean clean-generic clean-libtool \
|
||||
cscopelist-am ctags ctags-am distclean distclean-generic \
|
||||
distclean-libtool distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-dvi install-dvi-am install-exec \
|
||||
install-exec-am install-html install-html-am install-info \
|
||||
install-info-am install-man install-pdf install-pdf-am \
|
||||
install-ps install-ps-am install-strip installcheck \
|
||||
installcheck-am installcheck-local installdirs installdirs-am \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \
|
||||
pdf-am ps ps-am recheck tags tags-am uninstall uninstall-am
|
||||
|
||||
|
||||
# List all build rules defined by HDF5 Makefiles as "PHONY" targets here.
|
||||
@@ -793,7 +1180,7 @@ check-clean ::
|
||||
# build files in this directory.
|
||||
build-lib: $(LIB)
|
||||
build-progs: $(LIB) $(PROGS)
|
||||
build-tests: $(LIB) $(PROGS) $(TESTS)
|
||||
build-tests: $(LIB) $(PROGS) $(chk_TESTS)
|
||||
|
||||
# General rule for recursive building targets.
|
||||
# BUILT_SOURCES contain targets that need to be built before anything else
|
||||
@@ -819,7 +1206,7 @@ check-clean ::
|
||||
# Tell Automake to build tests when the user types `make all' (this is
|
||||
# not its default behavior). Also build EXTRA_LIB and EXTRA_PROG since
|
||||
# Automake won't build them automatically, either.
|
||||
all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(TESTS)
|
||||
all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(chk_TESTS)
|
||||
|
||||
# make install-doc doesn't do anything outside of doc directory, but
|
||||
# Makefiles should recognize it.
|
||||
@@ -843,7 +1230,7 @@ check-install: installcheck
|
||||
# Set HDF5_Make_Ignore to a non-blank string to ignore errors inside the loop.
|
||||
# The timestamps give a rough idea how much time the tests use.
|
||||
#
|
||||
# Note that targets in TESTS (defined above) will be built when the user
|
||||
# Note that targets in chk_TESTS (defined above) will be built when the user
|
||||
# types 'make tests' or 'make check', but only programs in TEST_PROG,
|
||||
# TEST_PROG_PARA, or TEST_SCRIPT will actually be executed.
|
||||
check-TESTS: test
|
||||
@@ -853,7 +1240,7 @@ test _test:
|
||||
@$(MAKE) build-check-p
|
||||
|
||||
# Actual execution of check-s.
|
||||
build-check-s: $(LIB) $(PROGS) $(TESTS)
|
||||
build-check-s: $(LIB) $(PROGS) $(chk_TESTS)
|
||||
@if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \
|
||||
echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \
|
||||
fi
|
||||
@@ -943,7 +1330,7 @@ $(TEST_SCRIPT_CHKSH) $(TEST_SCRIPT_PARA_CHKSH) dummysh.chkexe_:
|
||||
fi
|
||||
|
||||
# Actual execution of check-p.
|
||||
build-check-p: $(LIB) $(PROGS) $(TESTS)
|
||||
build-check-p: $(LIB) $(PROGS) $(chk_TESTS)
|
||||
@if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \
|
||||
echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \
|
||||
fi
|
||||
@@ -973,7 +1360,7 @@ build-check-p: $(LIB) $(PROGS) $(TESTS)
|
||||
fi
|
||||
|
||||
# Run test with different Virtual File Driver
|
||||
check-vfd: $(LIB) $(PROGS) $(TESTS)
|
||||
check-vfd: $(LIB) $(PROGS) $(chk_TESTS)
|
||||
@for vfd in $(VFD_LIST) dummy; do \
|
||||
if test $$vfd != dummy; then \
|
||||
echo "============================"; \
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
cmake_minimum_required (VERSION 2.8.6)
|
||||
cmake_minimum_required (VERSION 3.1.0)
|
||||
# --------------------------------------------------------------------
|
||||
# Notes: When creating examples they should be prefixed
|
||||
# with "cpp_ex_". This allows for easier filtering of the examples.
|
||||
@@ -10,7 +10,7 @@ PROJECT (HDF5_CPP_EXAMPLES)
|
||||
# Define examples
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
SET (examples
|
||||
set (examples
|
||||
create
|
||||
readdata
|
||||
writedata
|
||||
@@ -20,35 +20,34 @@ SET (examples
|
||||
h5group
|
||||
)
|
||||
|
||||
FOREACH (example ${examples})
|
||||
ADD_EXECUTABLE (cpp_ex_${example} ${HDF5_CPP_EXAMPLES_SOURCE_DIR}/${example}.cpp)
|
||||
set (tutr_examples
|
||||
h5tutr_cmprss
|
||||
h5tutr_crtdat
|
||||
h5tutr_crtatt
|
||||
h5tutr_crtgrpar
|
||||
h5tutr_crtgrp
|
||||
h5tutr_crtgrpd
|
||||
h5tutr_extend
|
||||
h5tutr_rdwt
|
||||
h5tutr_subset
|
||||
)
|
||||
|
||||
foreach (example ${examples})
|
||||
add_executable (cpp_ex_${example} ${HDF5_CPP_EXAMPLES_SOURCE_DIR}/${example}.cpp)
|
||||
TARGET_NAMING (cpp_ex_${example} ${LIB_TYPE})
|
||||
TARGET_LINK_LIBRARIES (cpp_ex_${example} ${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET})
|
||||
SET_TARGET_PROPERTIES (cpp_ex_${example} PROPERTIES FOLDER examples/cpp)
|
||||
ENDFOREACH (example ${examples})
|
||||
TARGET_C_PROPERTIES (cpp_ex_${example} " " " ")
|
||||
target_link_libraries (cpp_ex_${example} ${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET})
|
||||
set_target_properties (cpp_ex_${example} PROPERTIES FOLDER examples/cpp)
|
||||
endforeach (example ${examples})
|
||||
|
||||
IF (BUILD_TESTING)
|
||||
# Remove any output file left over from previous test run
|
||||
ADD_TEST (
|
||||
NAME cpp_ex-clear-objects
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E remove
|
||||
Group.h5
|
||||
SDS.h5
|
||||
SDScompound.h5
|
||||
SDSextendible.h5
|
||||
Select.h5
|
||||
)
|
||||
IF (NOT "${last_test}" STREQUAL "")
|
||||
SET_TESTS_PROPERTIES (cpp_ex-clear-objects PROPERTIES DEPENDS ${last_test})
|
||||
ENDIF (NOT "${last_test}" STREQUAL "")
|
||||
SET (last_test "cpp_ex-clear-objects")
|
||||
foreach (example ${tutr_examples})
|
||||
add_executable (cpp_ex_${example} ${HDF5_CPP_EXAMPLES_SOURCE_DIR}/${example}.cpp)
|
||||
TARGET_NAMING (cpp_ex_${example} ${LIB_TYPE})
|
||||
TARGET_C_PROPERTIES (cpp_ex_${example} " " " ")
|
||||
target_link_libraries (cpp_ex_${example} ${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET})
|
||||
set_target_properties (cpp_ex_${example} PROPERTIES FOLDER examples/cpp)
|
||||
endforeach (example ${tutr_examples})
|
||||
|
||||
FOREACH (example ${examples})
|
||||
ADD_TEST (NAME cpp_ex_${example} COMMAND $<TARGET_FILE:cpp_ex_${example}>)
|
||||
IF (NOT "${last_test}" STREQUAL "")
|
||||
SET_TESTS_PROPERTIES (cpp_ex_${example} PROPERTIES DEPENDS ${last_test})
|
||||
ENDIF (NOT "${last_test}" STREQUAL "")
|
||||
SET (last_test "cpp_ex_${example}")
|
||||
ENDFOREACH (example ${examples})
|
||||
ENDIF (BUILD_TESTING)
|
||||
if (BUILD_TESTING)
|
||||
include (CMakeTests.cmake)
|
||||
endif (BUILD_TESTING)
|
||||
|
||||
61
c++/examples/CMakeTests.cmake
Normal file
61
c++/examples/CMakeTests.cmake
Normal file
@@ -0,0 +1,61 @@
|
||||
|
||||
##############################################################################
|
||||
##############################################################################
|
||||
### T E S T I N G ###
|
||||
##############################################################################
|
||||
##############################################################################
|
||||
# Remove any output file left over from previous test run
|
||||
add_test (
|
||||
NAME CPP_ex-clear-objects
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E remove
|
||||
Group.h5
|
||||
SDS.h5
|
||||
SDScompound.h5
|
||||
SDSextendible.h5
|
||||
Select.h5
|
||||
)
|
||||
if (NOT "${last_test}" STREQUAL "")
|
||||
set_tests_properties (CPP_ex-clear-objects PROPERTIES DEPENDS ${last_test})
|
||||
endif (NOT "${last_test}" STREQUAL "")
|
||||
set (last_test "CPP_ex-clear-objects")
|
||||
|
||||
foreach (example ${examples})
|
||||
add_test (NAME CPP_ex_${example} COMMAND $<TARGET_FILE:cpp_ex_${example}>)
|
||||
if (NOT "${last_test}" STREQUAL "")
|
||||
set_tests_properties (CPP_ex_${example} PROPERTIES DEPENDS ${last_test})
|
||||
endif (NOT "${last_test}" STREQUAL "")
|
||||
set (last_test "CPP_ex_${example}")
|
||||
endforeach (example ${examples})
|
||||
#the following dependicies are handled by the order of the files
|
||||
# SET_TESTS_PROPERTIES(CPP_ex_readdata PROPERTIES DEPENDS CPP_ex_create)
|
||||
# SET_TESTS_PROPERTIES(CPP_ex_chunks PROPERTIES DEPENDS CPP_ex_extend_ds)
|
||||
|
||||
add_test (
|
||||
NAME CPP_ex_tutr-clear-objects
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E remove
|
||||
h5tutr_cmprss.h5
|
||||
h5tutr_dset.h5
|
||||
h5tutr_extend.h5
|
||||
h5tutr_group.h5
|
||||
h5tutr_groups.h5
|
||||
h5tutr_subset.h5
|
||||
)
|
||||
if (NOT "${last_test}" STREQUAL "")
|
||||
set_tests_properties (CPP_ex_tutr-clear-objects PROPERTIES DEPENDS ${last_test})
|
||||
endif (NOT "${last_test}" STREQUAL "")
|
||||
set (last_test "CPP_ex_tutr-clear-objects")
|
||||
|
||||
foreach (example ${tutr_examples})
|
||||
add_test (NAME CPP_ex_${example} COMMAND $<TARGET_FILE:cpp_ex_${example}>)
|
||||
if (NOT "${last_test}" STREQUAL "")
|
||||
set_tests_properties (CPP_ex_${example} PROPERTIES DEPENDS ${last_test})
|
||||
endif (NOT "${last_test}" STREQUAL "")
|
||||
set (last_test "CPP_ex_${example}")
|
||||
endforeach (example ${tutr_examples})
|
||||
#the following dependicies are handled by the order of the files
|
||||
# SET_TESTS_PROPERTIES(CPP_ex_h5tutr_crtatt PROPERTIES DEPENDS CPP_ex_h5tutr_crtdat)
|
||||
# SET_TESTS_PROPERTIES(CPP_ex_h5tutr_rdwt PROPERTIES DEPENDS CPP_ex_h5tutr_crtdat)
|
||||
# SET_TESTS_PROPERTIES(CPP_ex_h5tutr_crtgrpd PROPERTIES DEPENDS CPP_ex_h5tutr_crtgrpar)
|
||||
|
||||
@@ -21,19 +21,30 @@
|
||||
|
||||
include $(top_srcdir)/config/commence.am
|
||||
|
||||
INSTALL_SCRIPT_FILES = run-c++-ex.sh
|
||||
|
||||
# These are the programs that 'make all' or 'make prog' will build and
|
||||
# which 'make check' will run. List them in the order they should be run.
|
||||
TEST_PROG=create readdata writedata compound extend_ds chunks h5group
|
||||
EXAMPLE_PROG=create readdata writedata compound extend_ds chunks h5group \
|
||||
h5tutr_cmprss h5tutr_crtatt h5tutr_crtdat h5tutr_crtgrpar \
|
||||
h5tutr_crtgrp h5tutr_crtgrpd h5tutr_extend h5tutr_rdwt \
|
||||
h5tutr_subset
|
||||
TEST_SCRIPT=testh5c++.sh
|
||||
TEST_EXAMPLES_SCRIPT=$(INSTALL_SCRIPT_FILES)
|
||||
|
||||
# These are the example files to be installed
|
||||
INSTALL_FILES=create.cpp readdata.cpp writedata.cpp compound.cpp \
|
||||
extend_ds.cpp chunks.cpp h5group.cpp
|
||||
INSTALL_SCRIPT_FILES = run-c++-ex.sh
|
||||
extend_ds.cpp chunks.cpp h5group.cpp \
|
||||
h5tutr_cmprss.cpp h5tutr_crtatt.cpp h5tutr_crtdat.cpp \
|
||||
h5tutr_crtgrpar.cpp h5tutr_crtgrp.cpp h5tutr_crtgrpd.cpp \
|
||||
h5tutr_extend.cpp h5tutr_rdwt.cpp h5tutr_subset.cpp
|
||||
|
||||
# Some of the examples depend on files created by running other examples
|
||||
readdata.chkexe_: create.chkexe_
|
||||
chunks.chkexe_: extend_ds.chkexe_
|
||||
h5tutr_rdwt.chkexe_: h5tutrcrtdat.chkexe
|
||||
h5tutrcrtatt.chkexe_: h5tutrcrtdat.chkexe
|
||||
h5tutr_crtgrpd.chkexe_: h5tutr_crtgrpar.chkexe
|
||||
|
||||
# Tell conclude.am that these are C++ tests.
|
||||
CXX_API=yes
|
||||
@@ -58,5 +69,15 @@ extend_ds: $(srcdir)/extend_ds.cpp
|
||||
chunks: $(srcdir)/chunks.cpp
|
||||
h5group: $(srcdir)/h5group.cpp
|
||||
|
||||
h5tutr_cmprss: $(srcdir)/h5tutr_cmprss.cpp
|
||||
h5tutr_crtatt: $(srcdir)/h5tutr_crtatt.cpp
|
||||
h5tutr_crtdat: $(srcdir)/h5tutr_crtdat.cpp
|
||||
h5tutr_crtgrpar: $(srcdir)/h5tutr_crtgrpar.cpp
|
||||
h5tutr_crtgrp: $(srcdir)/h5tutr_crtgrp.cpp
|
||||
h5tutr_crtgrpd: $(srcdir)/h5tutr_crtgrpd.cpp
|
||||
h5tutr_extend: $(srcdir)/h5tutr_extend.cpp
|
||||
h5tutr_rdwt: $(srcdir)/h5tutr_rdwt.cpp
|
||||
h5tutr_subset: $(srcdir)/h5tutr_subset.cpp
|
||||
|
||||
include $(top_srcdir)/config/examples.am
|
||||
include $(top_srcdir)/config/conclude.am
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.14.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
|
||||
# Inc.
|
||||
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
@@ -36,6 +35,51 @@
|
||||
# built using h5cc (or h5fc, etc.) instead of the standard compilers.
|
||||
# This creates some extra work for us.
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
@@ -54,33 +98,245 @@ PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
|
||||
DIST_COMMON = $(top_srcdir)/config/commence.am \
|
||||
$(top_srcdir)/config/examples.am \
|
||||
$(top_srcdir)/config/conclude.am $(srcdir)/Makefile.in \
|
||||
$(srcdir)/Makefile.am $(top_srcdir)/bin/mkinstalldirs \
|
||||
$(srcdir)/run-c++-ex.sh.in $(srcdir)/testh5c++.sh.in \
|
||||
$(top_srcdir)/config/commence.am \
|
||||
$(top_srcdir)/config/conclude.am \
|
||||
$(top_srcdir)/config/examples.am
|
||||
TESTS =
|
||||
$(top_srcdir)/bin/test-driver
|
||||
TESTS = $(TEST_SCRIPT)
|
||||
subdir = c++/examples
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \
|
||||
$(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/src/H5config.h
|
||||
CONFIG_CLEAN_FILES = run-c++-ex.sh testh5c++.sh
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_GEN = $(am__v_GEN_$(V))
|
||||
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
AM_V_at = $(am__v_at_$(V))
|
||||
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__tty_colors = \
|
||||
red=; grn=; lgn=; blu=; std=
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
am__tty_colors_dummy = \
|
||||
mgn= red= grn= lgn= blu= brg= std=; \
|
||||
am__color_tests=no
|
||||
am__tty_colors = { \
|
||||
$(am__tty_colors_dummy); \
|
||||
if test "X$(AM_COLOR_TESTS)" = Xno; then \
|
||||
am__color_tests=no; \
|
||||
elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
|
||||
am__color_tests=yes; \
|
||||
elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
|
||||
am__color_tests=yes; \
|
||||
fi; \
|
||||
if test $$am__color_tests = yes; then \
|
||||
red='[0;31m'; \
|
||||
grn='[0;32m'; \
|
||||
lgn='[1;32m'; \
|
||||
blu='[1;34m'; \
|
||||
mgn='[0;35m'; \
|
||||
brg='[1m'; \
|
||||
std='[m'; \
|
||||
fi; \
|
||||
}
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__uninstall_files_from_dir = { \
|
||||
test -z "$$files" \
|
||||
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||
}
|
||||
am__recheck_rx = ^[ ]*:recheck:[ ]*
|
||||
am__global_test_result_rx = ^[ ]*:global-test-result:[ ]*
|
||||
am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]*
|
||||
# A command that, given a newline-separated list of test names on the
|
||||
# standard input, print the name of the tests that are to be re-run
|
||||
# upon "make recheck".
|
||||
am__list_recheck_tests = $(AWK) '{ \
|
||||
recheck = 1; \
|
||||
while ((rc = (getline line < ($$0 ".trs"))) != 0) \
|
||||
{ \
|
||||
if (rc < 0) \
|
||||
{ \
|
||||
if ((getline line2 < ($$0 ".log")) < 0) \
|
||||
recheck = 0; \
|
||||
break; \
|
||||
} \
|
||||
else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
|
||||
{ \
|
||||
recheck = 0; \
|
||||
break; \
|
||||
} \
|
||||
else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
|
||||
{ \
|
||||
break; \
|
||||
} \
|
||||
}; \
|
||||
if (recheck) \
|
||||
print $$0; \
|
||||
close ($$0 ".trs"); \
|
||||
close ($$0 ".log"); \
|
||||
}'
|
||||
# A command that, given a newline-separated list of test names on the
|
||||
# standard input, create the global log from their .trs and .log files.
|
||||
am__create_global_log = $(AWK) ' \
|
||||
function fatal(msg) \
|
||||
{ \
|
||||
print "fatal: making $@: " msg | "cat >&2"; \
|
||||
exit 1; \
|
||||
} \
|
||||
function rst_section(header) \
|
||||
{ \
|
||||
print header; \
|
||||
len = length(header); \
|
||||
for (i = 1; i <= len; i = i + 1) \
|
||||
printf "="; \
|
||||
printf "\n\n"; \
|
||||
} \
|
||||
{ \
|
||||
copy_in_global_log = 1; \
|
||||
global_test_result = "RUN"; \
|
||||
while ((rc = (getline line < ($$0 ".trs"))) != 0) \
|
||||
{ \
|
||||
if (rc < 0) \
|
||||
fatal("failed to read from " $$0 ".trs"); \
|
||||
if (line ~ /$(am__global_test_result_rx)/) \
|
||||
{ \
|
||||
sub("$(am__global_test_result_rx)", "", line); \
|
||||
sub("[ ]*$$", "", line); \
|
||||
global_test_result = line; \
|
||||
} \
|
||||
else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
|
||||
copy_in_global_log = 0; \
|
||||
}; \
|
||||
if (copy_in_global_log) \
|
||||
{ \
|
||||
rst_section(global_test_result ": " $$0); \
|
||||
while ((rc = (getline line < ($$0 ".log"))) != 0) \
|
||||
{ \
|
||||
if (rc < 0) \
|
||||
fatal("failed to read from " $$0 ".log"); \
|
||||
print line; \
|
||||
}; \
|
||||
printf "\n"; \
|
||||
}; \
|
||||
close ($$0 ".trs"); \
|
||||
close ($$0 ".log"); \
|
||||
}'
|
||||
# Restructured Text title.
|
||||
am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
|
||||
# Solaris 10 'make', and several other traditional 'make' implementations,
|
||||
# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
|
||||
# by disabling -e (using the XSI extension "set +e") if it's set.
|
||||
am__sh_e_setup = case $$- in *e*) set +e;; esac
|
||||
# Default flags passed to test drivers.
|
||||
am__common_driver_flags = \
|
||||
--color-tests "$$am__color_tests" \
|
||||
--enable-hard-errors "$$am__enable_hard_errors" \
|
||||
--expect-failure "$$am__expect_failure"
|
||||
# To be inserted before the command running the test. Creates the
|
||||
# directory for the log if needed. Stores in $dir the directory
|
||||
# containing $f, in $tst the test, in $log the log. Executes the
|
||||
# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
|
||||
# passes TESTS_ENVIRONMENT. Set up options for the wrapper that
|
||||
# will run the test scripts (or their associated LOG_COMPILER, if
|
||||
# thy have one).
|
||||
am__check_pre = \
|
||||
$(am__sh_e_setup); \
|
||||
$(am__vpath_adj_setup) $(am__vpath_adj) \
|
||||
$(am__tty_colors); \
|
||||
srcdir=$(srcdir); export srcdir; \
|
||||
case "$@" in \
|
||||
*/*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
|
||||
*) am__odir=.;; \
|
||||
esac; \
|
||||
test "x$$am__odir" = x"." || test -d "$$am__odir" \
|
||||
|| $(MKDIR_P) "$$am__odir" || exit $$?; \
|
||||
if test -f "./$$f"; then dir=./; \
|
||||
elif test -f "$$f"; then dir=; \
|
||||
else dir="$(srcdir)/"; fi; \
|
||||
tst=$$dir$$f; log='$@'; \
|
||||
if test -n '$(DISABLE_HARD_ERRORS)'; then \
|
||||
am__enable_hard_errors=no; \
|
||||
else \
|
||||
am__enable_hard_errors=yes; \
|
||||
fi; \
|
||||
case " $(XFAIL_TESTS) " in \
|
||||
*[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
|
||||
am__expect_failure=yes;; \
|
||||
*) \
|
||||
am__expect_failure=no;; \
|
||||
esac; \
|
||||
$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
|
||||
# A shell command to get the names of the tests scripts with any registered
|
||||
# extension removed (i.e., equivalently, the names of the test logs, with
|
||||
# the '.log' extension removed). The result is saved in the shell variable
|
||||
# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly,
|
||||
# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
|
||||
# since that might cause problem with VPATH rewrites for suffix-less tests.
|
||||
# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
|
||||
am__set_TESTS_bases = \
|
||||
bases='$(TEST_LOGS)'; \
|
||||
bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
|
||||
bases=`echo $$bases`
|
||||
RECHECK_LOGS = $(TEST_LOGS)
|
||||
AM_RECURSIVE_TARGETS = check recheck
|
||||
TEST_SUITE_LOG = test-suite.log
|
||||
am__test_logs1 = $(TESTS:=.log)
|
||||
am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
|
||||
TEST_LOGS = $(am__test_logs2:.sh.log=.log)
|
||||
SH_LOG_DRIVER = $(SHELL) $(top_srcdir)/bin/test-driver
|
||||
SH_LOG_COMPILE = $(SH_LOG_COMPILER) $(AM_SH_LOG_FLAGS) $(SH_LOG_FLAGS)
|
||||
am__set_b = \
|
||||
case '$@' in \
|
||||
*/*) \
|
||||
case '$*' in \
|
||||
*/*) b='$*';; \
|
||||
*) b=`echo '$@' | sed 's/\.log$$//'`; \
|
||||
esac;; \
|
||||
*) \
|
||||
b='$*';; \
|
||||
esac
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = /home1/packages/automake/automake-1.9.6/bin/aclocal-1.9 -I /afs/ncsa/projects/hdf/packages/libtool_1.5.14/Linux_2.4/share/aclocal
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@
|
||||
AMTAR = @AMTAR@
|
||||
|
||||
@@ -98,12 +354,9 @@ AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
|
||||
AM_MAKEFLAGS = @AM_MAKEFLAGS@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
|
||||
# Set the paths for AFS installs of autotools for Linux machines
|
||||
# Ideally, these tools should never be needed during the build.
|
||||
AUTOCONF = /home1/packages/autoconf/autoconf-2.60/bin/autoconf
|
||||
AUTOHEADER = /home1/packages/autoconf/autoconf-2.60/bin/autoheader
|
||||
AUTOMAKE = /home1/packages/automake/automake-1.9.6/bin/automake-1.9
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BYTESEX = @BYTESEX@
|
||||
CC = @CC@
|
||||
@@ -153,7 +406,6 @@ FC_VERSION = @FC_VERSION@
|
||||
FGREP = @FGREP@
|
||||
FILTERS = @FILTERS@
|
||||
FSEARCH_DIRS = @FSEARCH_DIRS@
|
||||
GPFS = @GPFS@
|
||||
GREP = @GREP@
|
||||
H5_CFLAGS = @H5_CFLAGS@
|
||||
H5_CPPFLAGS = @H5_CPPFLAGS@
|
||||
@@ -167,6 +419,7 @@ H5_VERSION = @H5_VERSION@
|
||||
HADDR_T = @HADDR_T@
|
||||
HAVE_DMALLOC = @HAVE_DMALLOC@
|
||||
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
|
||||
HAVE_PTHREAD = @HAVE_PTHREAD@
|
||||
HDF5_HL = @HDF5_HL@
|
||||
HDF5_INTERFACES = @HDF5_INTERFACES@
|
||||
HDF_CXX = @HDF_CXX@
|
||||
@@ -184,7 +437,6 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INSTRUMENT = @INSTRUMENT@
|
||||
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
|
||||
LARGEFILE = @LARGEFILE@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
@@ -200,7 +452,6 @@ MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MPE = @MPE@
|
||||
MPI_GET_SIZE = @MPI_GET_SIZE@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
@@ -218,7 +469,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PARALLEL = @PARALLEL@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PERL = @PERL@
|
||||
PTHREAD = @PTHREAD@
|
||||
RANLIB = @RANLIB@
|
||||
ROOT = @ROOT@
|
||||
RUNPARALLEL = @RUNPARALLEL@
|
||||
@@ -361,17 +611,25 @@ TRACE = perl $(top_srcdir)/bin/trace
|
||||
# .chklog files are output from those tests.
|
||||
# *.clog are from the MPE option.
|
||||
CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5
|
||||
INSTALL_SCRIPT_FILES = run-c++-ex.sh
|
||||
|
||||
# These are the programs that 'make all' or 'make prog' will build and
|
||||
# which 'make check' will run. List them in the order they should be run.
|
||||
TEST_PROG = create readdata writedata compound extend_ds chunks h5group
|
||||
EXAMPLE_PROG = create readdata writedata compound extend_ds chunks h5group \
|
||||
h5tutr_cmprss h5tutr_crtatt h5tutr_crtdat h5tutr_crtgrpar \
|
||||
h5tutr_crtgrp h5tutr_crtgrpd h5tutr_extend h5tutr_rdwt \
|
||||
h5tutr_subset
|
||||
|
||||
TEST_SCRIPT = testh5c++.sh
|
||||
TEST_EXAMPLES_SCRIPT = $(INSTALL_SCRIPT_FILES)
|
||||
|
||||
# These are the example files to be installed
|
||||
INSTALL_FILES = create.cpp readdata.cpp writedata.cpp compound.cpp \
|
||||
extend_ds.cpp chunks.cpp h5group.cpp
|
||||
extend_ds.cpp chunks.cpp h5group.cpp \
|
||||
h5tutr_cmprss.cpp h5tutr_crtatt.cpp h5tutr_crtdat.cpp \
|
||||
h5tutr_crtgrpar.cpp h5tutr_crtgrp.cpp h5tutr_crtgrpd.cpp \
|
||||
h5tutr_extend.cpp h5tutr_rdwt.cpp h5tutr_subset.cpp
|
||||
|
||||
INSTALL_SCRIPT_FILES = run-c++-ex.sh
|
||||
|
||||
# Tell conclude.am that these are C++ tests.
|
||||
CXX_API = yes
|
||||
@@ -382,12 +640,11 @@ EXAMPLEDIR = ${DESTDIR}$(exec_prefix)/share/hdf5_examples/c++
|
||||
|
||||
# Assume that all tests in this directory are examples, and tell
|
||||
# conclude.am when to build them.
|
||||
EXAMPLE_PROG = $(TEST_PROG_PARA) $(TEST_PROG)
|
||||
EXTRA_PROG = $(EXAMPLE_PROG)
|
||||
EXTRA_PROG = $(EXAMPLE_PROG) $(EXAMPLE_PROG_PARA)
|
||||
|
||||
# We need to tell automake what to clean
|
||||
MOSTLYCLEANFILES = *.raw *.meta *.o
|
||||
CLEANFILES = $(TEST_PROG) $(TEST_PROG_PARA)
|
||||
CLEANFILES = $(EXAMPLE_PROG) $(EXAMPLE_PROG_PARA)
|
||||
|
||||
# Automake needs to be taught how to build lib, progs, and tests targets.
|
||||
# These will be filled in automatically for the most part (e.g.,
|
||||
@@ -400,6 +657,10 @@ LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
|
||||
PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \
|
||||
$(EXTRA_PROG)
|
||||
|
||||
chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
|
||||
TEST_EXTENSIONS = .sh
|
||||
SH_LOG_COMPILER = $(SHELL)
|
||||
AM_SH_LOG_FLAGS =
|
||||
TEST_PROG_CHKEXE = $(TEST_PROG:=.chkexe_)
|
||||
TEST_PROG_PARA_CHKEXE = $(TEST_PROG_PARA:=.chkexe_)
|
||||
TEST_SCRIPT_CHKSH = $(TEST_SCRIPT:=.chkexe_)
|
||||
@@ -407,6 +668,7 @@ TEST_SCRIPT_PARA_CHKSH = $(TEST_SCRIPT_PARA:=.chkexe_)
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .log .sh .sh$(EXEEXT) .trs
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/commence.am $(top_srcdir)/config/examples.am $(top_srcdir)/config/conclude.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
@@ -428,6 +690,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
$(top_srcdir)/config/commence.am $(top_srcdir)/config/examples.am $(top_srcdir)/config/conclude.am:
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
@@ -447,12 +710,157 @@ mostlyclean-libtool:
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
tags TAGS:
|
||||
|
||||
ctags: CTAGS
|
||||
CTAGS:
|
||||
ctags CTAGS:
|
||||
|
||||
cscope cscopelist:
|
||||
|
||||
|
||||
# Recover from deleted '.trs' file; this should ensure that
|
||||
# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
|
||||
# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells
|
||||
# to avoid problems with "make -n".
|
||||
.log.trs:
|
||||
rm -f $< $@
|
||||
$(MAKE) $(AM_MAKEFLAGS) $<
|
||||
|
||||
# Leading 'am--fnord' is there to ensure the list of targets does not
|
||||
# expand to empty, as could happen e.g. with make check TESTS=''.
|
||||
am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
|
||||
am--force-recheck:
|
||||
@:
|
||||
|
||||
$(TEST_SUITE_LOG): $(TEST_LOGS)
|
||||
@$(am__set_TESTS_bases); \
|
||||
am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
|
||||
redo_bases=`for i in $$bases; do \
|
||||
am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
|
||||
done`; \
|
||||
if test -n "$$redo_bases"; then \
|
||||
redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
|
||||
redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
|
||||
if $(am__make_dryrun); then :; else \
|
||||
rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
|
||||
fi; \
|
||||
fi; \
|
||||
if test -n "$$am__remaking_logs"; then \
|
||||
echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
|
||||
"recursion detected" >&2; \
|
||||
else \
|
||||
am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
|
||||
fi; \
|
||||
if $(am__make_dryrun); then :; else \
|
||||
st=0; \
|
||||
errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
|
||||
for i in $$redo_bases; do \
|
||||
test -f $$i.trs && test -r $$i.trs \
|
||||
|| { echo "$$errmsg $$i.trs" >&2; st=1; }; \
|
||||
test -f $$i.log && test -r $$i.log \
|
||||
|| { echo "$$errmsg $$i.log" >&2; st=1; }; \
|
||||
done; \
|
||||
test $$st -eq 0 || exit 1; \
|
||||
fi
|
||||
@$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
|
||||
ws='[ ]'; \
|
||||
results=`for b in $$bases; do echo $$b.trs; done`; \
|
||||
test -n "$$results" || results=/dev/null; \
|
||||
all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
|
||||
pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
|
||||
fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
|
||||
skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
|
||||
xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
|
||||
xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
|
||||
error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
|
||||
if test `expr $$fail + $$xpass + $$error` -eq 0; then \
|
||||
success=true; \
|
||||
else \
|
||||
success=false; \
|
||||
fi; \
|
||||
br='==================='; br=$$br$$br$$br$$br; \
|
||||
result_count () \
|
||||
{ \
|
||||
if test x"$$1" = x"--maybe-color"; then \
|
||||
maybe_colorize=yes; \
|
||||
elif test x"$$1" = x"--no-color"; then \
|
||||
maybe_colorize=no; \
|
||||
else \
|
||||
echo "$@: invalid 'result_count' usage" >&2; exit 4; \
|
||||
fi; \
|
||||
shift; \
|
||||
desc=$$1 count=$$2; \
|
||||
if test $$maybe_colorize = yes && test $$count -gt 0; then \
|
||||
color_start=$$3 color_end=$$std; \
|
||||
else \
|
||||
color_start= color_end=; \
|
||||
fi; \
|
||||
echo "$${color_start}# $$desc $$count$${color_end}"; \
|
||||
}; \
|
||||
create_testsuite_report () \
|
||||
{ \
|
||||
result_count $$1 "TOTAL:" $$all "$$brg"; \
|
||||
result_count $$1 "PASS: " $$pass "$$grn"; \
|
||||
result_count $$1 "SKIP: " $$skip "$$blu"; \
|
||||
result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
|
||||
result_count $$1 "FAIL: " $$fail "$$red"; \
|
||||
result_count $$1 "XPASS:" $$xpass "$$red"; \
|
||||
result_count $$1 "ERROR:" $$error "$$mgn"; \
|
||||
}; \
|
||||
{ \
|
||||
echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
|
||||
$(am__rst_title); \
|
||||
create_testsuite_report --no-color; \
|
||||
echo; \
|
||||
echo ".. contents:: :depth: 2"; \
|
||||
echo; \
|
||||
for b in $$bases; do echo $$b; done \
|
||||
| $(am__create_global_log); \
|
||||
} >$(TEST_SUITE_LOG).tmp || exit 1; \
|
||||
mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
|
||||
if $$success; then \
|
||||
col="$$grn"; \
|
||||
else \
|
||||
col="$$red"; \
|
||||
test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
|
||||
fi; \
|
||||
echo "$${col}$$br$${std}"; \
|
||||
echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \
|
||||
echo "$${col}$$br$${std}"; \
|
||||
create_testsuite_report --maybe-color; \
|
||||
echo "$$col$$br$$std"; \
|
||||
if $$success; then :; else \
|
||||
echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
|
||||
if test -n "$(PACKAGE_BUGREPORT)"; then \
|
||||
echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
|
||||
fi; \
|
||||
echo "$$col$$br$$std"; \
|
||||
fi; \
|
||||
$$success || exit 1
|
||||
recheck: all
|
||||
@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
|
||||
@set +e; $(am__set_TESTS_bases); \
|
||||
bases=`for i in $$bases; do echo $$i; done \
|
||||
| $(am__list_recheck_tests)` || exit 1; \
|
||||
log_list=`for i in $$bases; do echo $$i.log; done`; \
|
||||
log_list=`echo $$log_list`; \
|
||||
$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
|
||||
am__force_recheck=am--force-recheck \
|
||||
TEST_LOGS="$$log_list"; \
|
||||
exit $$?
|
||||
.sh.log:
|
||||
@p='$<'; \
|
||||
$(am__set_b); \
|
||||
$(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \
|
||||
--log-file $$b.log --trs-file $$b.trs \
|
||||
$(am__common_driver_flags) $(AM_SH_LOG_DRIVER_FLAGS) $(SH_LOG_DRIVER_FLAGS) -- $(SH_LOG_COMPILE) \
|
||||
"$$tst" $(AM_TESTS_FD_REDIRECT)
|
||||
@am__EXEEXT_TRUE@.sh$(EXEEXT).log:
|
||||
@am__EXEEXT_TRUE@ @p='$<'; \
|
||||
@am__EXEEXT_TRUE@ $(am__set_b); \
|
||||
@am__EXEEXT_TRUE@ $(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \
|
||||
@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
|
||||
@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_SH_LOG_DRIVER_FLAGS) $(SH_LOG_DRIVER_FLAGS) -- $(SH_LOG_COMPILE) \
|
||||
@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
@@ -499,12 +907,20 @@ install-am: all-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
|
||||
-test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
|
||||
-test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
|
||||
-test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
@@ -586,17 +1002,18 @@ uninstall-am: uninstall-local
|
||||
.MAKE: check-am install-am install-strip
|
||||
|
||||
.PHONY: all all-am all-local check check-TESTS check-am clean \
|
||||
clean-generic clean-libtool distclean distclean-generic \
|
||||
distclean-libtool distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am \
|
||||
install-data-local install-dvi install-dvi-am install-exec \
|
||||
install-exec-am install-html install-html-am install-info \
|
||||
install-info-am install-man install-pdf install-pdf-am \
|
||||
install-ps install-ps-am install-strip installcheck \
|
||||
installcheck-am installcheck-local installdirs \
|
||||
clean-generic clean-libtool cscopelist-am ctags-am distclean \
|
||||
distclean-generic distclean-libtool distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-data-local install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-html install-html-am \
|
||||
install-info install-info-am install-man install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-strip \
|
||||
installcheck installcheck-am installcheck-local installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \
|
||||
pdf-am ps ps-am uninstall uninstall-am uninstall-local
|
||||
pdf-am ps ps-am recheck tags-am uninstall uninstall-am \
|
||||
uninstall-local
|
||||
|
||||
|
||||
# List all build rules defined by HDF5 Makefiles as "PHONY" targets here.
|
||||
@@ -613,6 +1030,9 @@ help:
|
||||
# Some of the examples depend on files created by running other examples
|
||||
readdata.chkexe_: create.chkexe_
|
||||
chunks.chkexe_: extend_ds.chkexe_
|
||||
h5tutr_rdwt.chkexe_: h5tutrcrtdat.chkexe
|
||||
h5tutrcrtatt.chkexe_: h5tutrcrtdat.chkexe
|
||||
h5tutr_crtgrpd.chkexe_: h5tutr_crtgrpar.chkexe
|
||||
|
||||
# How to build programs using h5c++
|
||||
$(EXTRA_PROG): $(H5CPP)
|
||||
@@ -630,6 +1050,16 @@ extend_ds: $(srcdir)/extend_ds.cpp
|
||||
chunks: $(srcdir)/chunks.cpp
|
||||
h5group: $(srcdir)/h5group.cpp
|
||||
|
||||
h5tutr_cmprss: $(srcdir)/h5tutr_cmprss.cpp
|
||||
h5tutr_crtatt: $(srcdir)/h5tutr_crtatt.cpp
|
||||
h5tutr_crtdat: $(srcdir)/h5tutr_crtdat.cpp
|
||||
h5tutr_crtgrpar: $(srcdir)/h5tutr_crtgrpar.cpp
|
||||
h5tutr_crtgrp: $(srcdir)/h5tutr_crtgrp.cpp
|
||||
h5tutr_crtgrpd: $(srcdir)/h5tutr_crtgrpd.cpp
|
||||
h5tutr_extend: $(srcdir)/h5tutr_extend.cpp
|
||||
h5tutr_rdwt: $(srcdir)/h5tutr_rdwt.cpp
|
||||
h5tutr_subset: $(srcdir)/h5tutr_subset.cpp
|
||||
|
||||
# How to create EXAMPLEDIR if it doesn't already exist
|
||||
$(EXAMPLEDIR):
|
||||
-$(top_srcdir)/bin/mkdirs $@
|
||||
@@ -643,7 +1073,7 @@ install-data-local:
|
||||
uninstall-local:
|
||||
@$(MAKE) $(AM_MAKEFLAGS) uninstall-examples
|
||||
|
||||
install-examples: $(EXAMPLEDIR) $(INSTALL_FILES)
|
||||
install-examples: $(EXAMPLEDIR) $(INSTALL_FILES)
|
||||
@for f in X $(INSTALL_FILES); do \
|
||||
if test $$f != X; then \
|
||||
(set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLEDIR)/. || exit 1); \
|
||||
@@ -655,6 +1085,12 @@ install-examples: $(EXAMPLEDIR) $(INSTALL_FILES)
|
||||
(set -x; $(INSTALL) $$f $(EXAMPLEDIR)/. || exit 1);\
|
||||
fi; \
|
||||
done
|
||||
@for f in X $(INSTALL_TOP_FILES); do \
|
||||
if test $$f != X; then \
|
||||
(set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLETOPDIR)/. || exit 1); \
|
||||
chmod a-x $(EXAMPLETOPDIR)/$$f;\
|
||||
fi; \
|
||||
done
|
||||
@for f in X $(INSTALL_TOP_SCRIPT_FILES); do \
|
||||
if test $$f != X; then \
|
||||
(set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLETOPDIR)/. || exit 1); \
|
||||
@@ -664,30 +1100,40 @@ install-examples: $(EXAMPLEDIR) $(INSTALL_FILES)
|
||||
uninstall-examples:
|
||||
@if test -n "$(INSTALL_FILES)" -a -d $(EXAMPLEDIR); then \
|
||||
set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_FILES); \
|
||||
fi
|
||||
fi
|
||||
@if test -n "$(INSTALL_SCRIPT_FILES)" -a -d $(EXAMPLEDIR); then \
|
||||
set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_SCRIPT_FILES); \
|
||||
fi
|
||||
fi
|
||||
@if test -n "$(INSTALL_TOP_FILES)" -a -d $(EXAMPLETOPDIR); then \
|
||||
set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_FILES); \
|
||||
fi
|
||||
@if test -n "$(INSTALL_TOP_SCRIPT_FILES)" -a -d $(EXAMPLETOPDIR); then \
|
||||
set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_SCRIPT_FILES); \
|
||||
fi
|
||||
fi
|
||||
|
||||
installcheck-local:
|
||||
@if test "$(STATIC_SHARED)" = "static, shared"; then \
|
||||
H5CCFLAGS="-shlib" $(MAKE) $(AM_MAKEFLAGS) check; \
|
||||
$(MAKE) $(AM_MAKEFLAGS) clean; \
|
||||
H5CCFLAGS="" $(MAKE) $(AM_MAKEFLAGS) check; \
|
||||
elif test "$(STATIC_SHARED)" = "shared"; then \
|
||||
elif test "$(STATIC_SHARED)" = "shared"; then \
|
||||
H5CCFLAGS="-shlib" $(MAKE) $(AM_MAKEFLAGS) check; \
|
||||
else \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) check; \
|
||||
fi
|
||||
fi
|
||||
@if test "$(INSTALL_FILES)" -a $(TEST_EXAMPLES_SCRIPT) -a -d $(EXAMPLEDIR); then \
|
||||
echo "============================"; \
|
||||
echo "Testing $(TEST_EXAMPLES_SCRIPT)"; \
|
||||
echo "============================"; \
|
||||
(cd $(EXAMPLEDIR); \
|
||||
/bin/sh ./$(TEST_EXAMPLES_SCRIPT);) \
|
||||
fi
|
||||
|
||||
# lib/progs/tests targets recurse into subdirectories. build-* targets
|
||||
# build files in this directory.
|
||||
build-lib: $(LIB)
|
||||
build-progs: $(LIB) $(PROGS)
|
||||
build-tests: $(LIB) $(PROGS) $(TESTS)
|
||||
build-tests: $(LIB) $(PROGS) $(chk_TESTS)
|
||||
|
||||
# General rule for recursive building targets.
|
||||
# BUILT_SOURCES contain targets that need to be built before anything else
|
||||
@@ -713,7 +1159,7 @@ check-clean ::
|
||||
# Tell Automake to build tests when the user types `make all' (this is
|
||||
# not its default behavior). Also build EXTRA_LIB and EXTRA_PROG since
|
||||
# Automake won't build them automatically, either.
|
||||
all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(TESTS)
|
||||
all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(chk_TESTS)
|
||||
|
||||
# make install-doc doesn't do anything outside of doc directory, but
|
||||
# Makefiles should recognize it.
|
||||
@@ -737,7 +1183,7 @@ check-install: installcheck
|
||||
# Set HDF5_Make_Ignore to a non-blank string to ignore errors inside the loop.
|
||||
# The timestamps give a rough idea how much time the tests use.
|
||||
#
|
||||
# Note that targets in TESTS (defined above) will be built when the user
|
||||
# Note that targets in chk_TESTS (defined above) will be built when the user
|
||||
# types 'make tests' or 'make check', but only programs in TEST_PROG,
|
||||
# TEST_PROG_PARA, or TEST_SCRIPT will actually be executed.
|
||||
check-TESTS: test
|
||||
@@ -747,7 +1193,7 @@ test _test:
|
||||
@$(MAKE) build-check-p
|
||||
|
||||
# Actual execution of check-s.
|
||||
build-check-s: $(LIB) $(PROGS) $(TESTS)
|
||||
build-check-s: $(LIB) $(PROGS) $(chk_TESTS)
|
||||
@if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \
|
||||
echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \
|
||||
fi
|
||||
@@ -837,7 +1283,7 @@ $(TEST_SCRIPT_CHKSH) $(TEST_SCRIPT_PARA_CHKSH) dummysh.chkexe_:
|
||||
fi
|
||||
|
||||
# Actual execution of check-p.
|
||||
build-check-p: $(LIB) $(PROGS) $(TESTS)
|
||||
build-check-p: $(LIB) $(PROGS) $(chk_TESTS)
|
||||
@if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \
|
||||
echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \
|
||||
fi
|
||||
@@ -867,7 +1313,7 @@ build-check-p: $(LIB) $(PROGS) $(TESTS)
|
||||
fi
|
||||
|
||||
# Run test with different Virtual File Driver
|
||||
check-vfd: $(LIB) $(PROGS) $(TESTS)
|
||||
check-vfd: $(LIB) $(PROGS) $(chk_TESTS)
|
||||
@for vfd in $(VFD_LIST) dummy; do \
|
||||
if test $$vfd != dummy; then \
|
||||
echo "============================"; \
|
||||
|
||||
162
c++/examples/h5tutr_cmprss.cpp
Normal file
162
c++/examples/h5tutr_cmprss.cpp
Normal file
@@ -0,0 +1,162 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* 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 files COPYING and Copyright.html. COPYING can be found at the root *
|
||||
* of the source code distribution tree; Copyright.html can be found at the *
|
||||
* root level of an installed copy of the electronic HDF5 document set and *
|
||||
* is linked from the top-level documents page. It can also be found at *
|
||||
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
/*
|
||||
* This example illustrates how to create a compressed dataset.
|
||||
* It is used in the HDF5 Tutorial.
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
#include "H5Cpp.h"
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
using namespace H5;
|
||||
#ifndef H5_NO_STD
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
#endif // H5_NO_STD
|
||||
#endif
|
||||
|
||||
const H5std_string FILE_NAME("h5tutr_cmprss.h5");
|
||||
const H5std_string DATASET_NAME("Compressed_Data");
|
||||
const int DIM0 = 100;
|
||||
const int DIM1 = 20;
|
||||
|
||||
int main (void)
|
||||
{
|
||||
hsize_t dims[2] = { DIM0, DIM1 }; // dataset dimensions
|
||||
hsize_t chunk_dims[2] = { 20, 20 }; // chunk dimensions
|
||||
int i,j, buf[DIM0][DIM1];
|
||||
|
||||
// Try block to detect exceptions raised by any of the calls inside it
|
||||
try
|
||||
{
|
||||
// Turn off the auto-printing when failure occurs so that we can
|
||||
// handle the errors appropriately
|
||||
Exception::dontPrint();
|
||||
|
||||
// Create a new file using the default property lists.
|
||||
H5File file(FILE_NAME, H5F_ACC_TRUNC);
|
||||
|
||||
// Create the data space for the dataset.
|
||||
DataSpace *dataspace = new DataSpace(2, dims);
|
||||
|
||||
// Modify dataset creation property to enable chunking
|
||||
DSetCreatPropList *plist = new DSetCreatPropList;
|
||||
plist->setChunk(2, chunk_dims);
|
||||
|
||||
// Set ZLIB (DEFLATE) Compression using level 6.
|
||||
// To use SZIP compression comment out this line.
|
||||
plist->setDeflate(6);
|
||||
|
||||
// Uncomment these lines to set SZIP Compression
|
||||
// unsigned szip_options_mask = H5_SZIP_NN_OPTION_MASK;
|
||||
// unsigned szip_pixels_per_block = 16;
|
||||
// plist->setSzip(szip_options_mask, szip_pixels_per_block);
|
||||
|
||||
// Create the dataset.
|
||||
DataSet *dataset = new DataSet(file.createDataSet( DATASET_NAME,
|
||||
PredType::STD_I32BE, *dataspace, *plist) );
|
||||
|
||||
for (i = 0; i< DIM0; i++)
|
||||
for (j=0; j<DIM1; j++)
|
||||
buf[i][j] = i+j;
|
||||
|
||||
// Write data to dataset.
|
||||
dataset->write(buf, PredType::NATIVE_INT);
|
||||
|
||||
// Close objects and file. Either approach will close the HDF5 item.
|
||||
delete dataspace;
|
||||
delete dataset;
|
||||
delete plist;
|
||||
file.close();
|
||||
|
||||
// -----------------------------------------------
|
||||
// Re-open the file and dataset, retrieve filter
|
||||
// information for dataset and read the data back.
|
||||
// -----------------------------------------------
|
||||
|
||||
int rbuf[DIM0][DIM1];
|
||||
int numfilt;
|
||||
size_t nelmts={1}, namelen={1};
|
||||
unsigned flags, filter_info, cd_values[1], idx;
|
||||
char name[1];
|
||||
H5Z_filter_t filter_type;
|
||||
|
||||
// Open the file and the dataset in the file.
|
||||
file.openFile(FILE_NAME, H5F_ACC_RDONLY);
|
||||
dataset = new DataSet(file.openDataSet( DATASET_NAME));
|
||||
|
||||
// Get the create property list of the dataset.
|
||||
plist = new DSetCreatPropList(dataset->getCreatePlist ());
|
||||
|
||||
// Get the number of filters associated with the dataset.
|
||||
numfilt = plist->getNfilters();
|
||||
cout << "Number of filters associated with dataset: " << numfilt << endl;
|
||||
|
||||
for (idx=0; idx < numfilt; idx++) {
|
||||
nelmts = 0;
|
||||
|
||||
filter_type = plist->getFilter(idx, flags, nelmts, cd_values, namelen, name , filter_info);
|
||||
|
||||
cout << "Filter Type: ";
|
||||
|
||||
switch (filter_type) {
|
||||
case H5Z_FILTER_DEFLATE:
|
||||
cout << "H5Z_FILTER_DEFLATE" << endl;
|
||||
break;
|
||||
case H5Z_FILTER_SZIP:
|
||||
cout << "H5Z_FILTER_SZIP" << endl;
|
||||
break;
|
||||
default:
|
||||
cout << "Other filter type included." << endl;
|
||||
}
|
||||
}
|
||||
|
||||
// Read data.
|
||||
dataset->read(rbuf, PredType::NATIVE_INT);
|
||||
|
||||
delete plist;
|
||||
delete dataset;
|
||||
file.close(); // can be skipped
|
||||
|
||||
} // end of try block
|
||||
|
||||
// catch failure caused by the H5File operations
|
||||
catch(FileIException error)
|
||||
{
|
||||
error.printError();
|
||||
return -1;
|
||||
}
|
||||
|
||||
// catch failure caused by the DataSet operations
|
||||
catch(DataSetIException error)
|
||||
{
|
||||
error.printError();
|
||||
return -1;
|
||||
}
|
||||
|
||||
// catch failure caused by the DataSpace operations
|
||||
catch(DataSpaceIException error)
|
||||
{
|
||||
error.printError();
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0; // successfully terminated
|
||||
}
|
||||
|
||||
95
c++/examples/h5tutr_crtatt.cpp
Normal file
95
c++/examples/h5tutr_crtatt.cpp
Normal file
@@ -0,0 +1,95 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* 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 files COPYING and Copyright.html. COPYING can be found at the root *
|
||||
* of the source code distribution tree; Copyright.html can be found at the *
|
||||
* root level of an installed copy of the electronic HDF5 document set and *
|
||||
* is linked from the top-level documents page. It can also be found at *
|
||||
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
/*
|
||||
* This example illustrates how to create an attribute attached to a
|
||||
* dataset. It is used in the HDF5 Tutorial.
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
#include "H5Cpp.h"
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
using namespace H5;
|
||||
#endif
|
||||
|
||||
const H5std_string FILE_NAME( "h5tutr_dset.h5" );
|
||||
const H5std_string DATASET_NAME( "dset" );
|
||||
const H5std_string ATTR_NAME( "Units" );
|
||||
|
||||
const int DIM1 = 2;
|
||||
|
||||
int main (void)
|
||||
{
|
||||
int attr_data[2] = { 100, 200};
|
||||
hsize_t dims[1] = { DIM1 };
|
||||
|
||||
|
||||
// Try block to detect exceptions raised by any of the calls inside it
|
||||
try
|
||||
{
|
||||
// Turn off the auto-printing when failure occurs so that we can
|
||||
// handle the errors appropriately
|
||||
Exception::dontPrint();
|
||||
|
||||
// Open an existing file and dataset.
|
||||
H5File file( FILE_NAME, H5F_ACC_RDWR );
|
||||
DataSet dataset = file.openDataSet( DATASET_NAME );
|
||||
|
||||
// Create the data space for the attribute.
|
||||
DataSpace attr_dataspace = DataSpace (1, dims );
|
||||
|
||||
// Create a dataset attribute.
|
||||
Attribute attribute = dataset.createAttribute( ATTR_NAME, PredType::STD_I32BE,
|
||||
attr_dataspace);
|
||||
|
||||
// Write the attribute data.
|
||||
attribute.write( PredType::NATIVE_INT, attr_data);
|
||||
|
||||
} // end of try block
|
||||
|
||||
// catch failure caused by the H5File operations
|
||||
catch( DataSpaceIException error )
|
||||
{
|
||||
error.printError();
|
||||
return -1;
|
||||
}
|
||||
|
||||
// catch failure caused by the H5File operations
|
||||
catch( AttributeIException error )
|
||||
{
|
||||
error.printError();
|
||||
return -1;
|
||||
}
|
||||
|
||||
// catch failure caused by the H5File operations
|
||||
catch( FileIException error )
|
||||
{
|
||||
error.printError();
|
||||
return -1;
|
||||
}
|
||||
|
||||
// catch failure caused by the DataSet operations
|
||||
catch( DataSetIException error )
|
||||
{
|
||||
error.printError();
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0; // successfully terminated
|
||||
}
|
||||
|
||||
82
c++/examples/h5tutr_crtdat.cpp
Normal file
82
c++/examples/h5tutr_crtdat.cpp
Normal file
@@ -0,0 +1,82 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* 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 files COPYING and Copyright.html. COPYING can be found at the root *
|
||||
* of the source code distribution tree; Copyright.html can be found at the *
|
||||
* root level of an installed copy of the electronic HDF5 document set and *
|
||||
* is linked from the top-level documents page. It can also be found at *
|
||||
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
/*
|
||||
* This example illustrates how to create a dataset that is a 4 x 6
|
||||
* array. It is used in the HDF5 Tutorial.
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
#include "H5Cpp.h"
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
using namespace H5;
|
||||
#endif
|
||||
|
||||
const H5std_string FILE_NAME("h5tutr_dset.h5");
|
||||
const H5std_string DATASET_NAME("dset");
|
||||
const int NX = 4; // dataset dimensions
|
||||
const int NY = 6;
|
||||
const int RANK = 2;
|
||||
|
||||
int main (void)
|
||||
{
|
||||
// Try block to detect exceptions raised by any of the calls inside it
|
||||
try
|
||||
{
|
||||
// Turn off the auto-printing when failure occurs so that we can
|
||||
// handle the errors appropriately
|
||||
Exception::dontPrint();
|
||||
|
||||
// Create a new file using the default property lists.
|
||||
H5File file(FILE_NAME, H5F_ACC_TRUNC);
|
||||
|
||||
// Create the data space for the dataset.
|
||||
hsize_t dims[2]; // dataset dimensions
|
||||
dims[0] = NX;
|
||||
dims[1] = NY;
|
||||
DataSpace dataspace(RANK, dims);
|
||||
|
||||
// Create the dataset.
|
||||
DataSet dataset = file.createDataSet(DATASET_NAME, PredType::STD_I32BE, dataspace);
|
||||
|
||||
} // end of try block
|
||||
|
||||
// catch failure caused by the H5File operations
|
||||
catch(FileIException error)
|
||||
{
|
||||
error.printError();
|
||||
return -1;
|
||||
}
|
||||
|
||||
// catch failure caused by the DataSet operations
|
||||
catch(DataSetIException error)
|
||||
{
|
||||
error.printError();
|
||||
return -1;
|
||||
}
|
||||
|
||||
// catch failure caused by the DataSpace operations
|
||||
catch(DataSpaceIException error)
|
||||
{
|
||||
error.printError();
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0; // successfully terminated
|
||||
}
|
||||
|
||||
69
c++/examples/h5tutr_crtgrp.cpp
Normal file
69
c++/examples/h5tutr_crtgrp.cpp
Normal file
@@ -0,0 +1,69 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* 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 files COPYING and Copyright.html. COPYING can be found at the root *
|
||||
* of the source code distribution tree; Copyright.html can be found at the *
|
||||
* root level of an installed copy of the electronic HDF5 document set and *
|
||||
* is linked from the top-level documents page. It can also be found at *
|
||||
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
/*
|
||||
* This example illustrates how to create and close a group.
|
||||
* It is used in the HDF5 Tutorial.
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
#include "H5Cpp.h"
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
using namespace H5;
|
||||
#ifndef H5_NO_STD
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
#endif // H5_NO_STD
|
||||
#endif
|
||||
|
||||
const H5std_string FILE_NAME("h5tutr_group.h5");
|
||||
|
||||
int main(void)
|
||||
{
|
||||
// Try block to detect exceptions raised by any of the calls inside it
|
||||
try
|
||||
{
|
||||
// Turn off the auto-printing when failure occurs so that we can
|
||||
// handle the errors appropriately
|
||||
Exception::dontPrint();
|
||||
|
||||
// Create a new file using default property lists.
|
||||
H5File file(FILE_NAME, H5F_ACC_TRUNC);
|
||||
|
||||
// Create a group named "/MygGroup" in the file
|
||||
Group group(file.createGroup("/MyGroup"));
|
||||
|
||||
// File and group will be closed as their instances go out of scope.
|
||||
|
||||
} // end of try block
|
||||
|
||||
// catch failure caused by the H5File operations
|
||||
catch(FileIException error)
|
||||
{
|
||||
error.printError();
|
||||
return -1;
|
||||
}
|
||||
// catch failure caused by the Group operations
|
||||
catch(GroupIException error)
|
||||
{
|
||||
error.printError();
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
92
c++/examples/h5tutr_crtgrpar.cpp
Normal file
92
c++/examples/h5tutr_crtgrpar.cpp
Normal file
@@ -0,0 +1,92 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* 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 files COPYING and Copyright.html. COPYING can be found at the root *
|
||||
* of the source code distribution tree; Copyright.html can be found at the *
|
||||
* root level of an installed copy of the electronic HDF5 document set and *
|
||||
* is linked from the top-level documents page. It can also be found at *
|
||||
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
/*
|
||||
* This example illustrates the creation of groups using absolute and
|
||||
* relative names. It is used in the HDF5 Tutorial.
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
#include "H5Cpp.h"
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
using namespace H5;
|
||||
#ifndef H5_NO_STD
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
#endif // H5_NO_STD
|
||||
#endif
|
||||
|
||||
const H5std_string FILE_NAME("h5tutr_groups.h5");
|
||||
|
||||
int main(void)
|
||||
{
|
||||
|
||||
// Try block to detect exceptions raised by any of the calls inside it
|
||||
try
|
||||
{
|
||||
|
||||
// Turn off the auto-printing when failure occurs so that we can
|
||||
// handle the errors appropriately.
|
||||
|
||||
Exception::dontPrint();
|
||||
|
||||
// Create a new file using default properties.
|
||||
|
||||
H5File file(FILE_NAME, H5F_ACC_TRUNC);
|
||||
|
||||
// Create group "MyGroup" in the root group using an absolute name.
|
||||
|
||||
Group group1(file.createGroup( "/MyGroup"));
|
||||
|
||||
// Create group "Group_A" in group "MyGroup" using an
|
||||
// absolute name.
|
||||
|
||||
Group group2(file.createGroup("/MyGroup/Group_A"));
|
||||
|
||||
// Create group "Group_B" in group "MyGroup" using a
|
||||
// relative name.
|
||||
|
||||
Group group3(group1.createGroup ("Group_B"));
|
||||
|
||||
// Close the groups and file.
|
||||
|
||||
group1.close();
|
||||
group2.close();
|
||||
group3.close();
|
||||
file.close();
|
||||
|
||||
} // end of try block
|
||||
|
||||
// catch failure caused by the File operations
|
||||
catch(FileIException error)
|
||||
{
|
||||
error.printError();
|
||||
return -1;
|
||||
}
|
||||
|
||||
// catch failure caused by the Group operations
|
||||
catch(GroupIException error)
|
||||
{
|
||||
error.printError();
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
141
c++/examples/h5tutr_crtgrpd.cpp
Normal file
141
c++/examples/h5tutr_crtgrpd.cpp
Normal file
@@ -0,0 +1,141 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* 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 files COPYING and Copyright.html. COPYING can be found at the root *
|
||||
* of the source code distribution tree; Copyright.html can be found at the *
|
||||
* root level of an installed copy of the electronic HDF5 document set and *
|
||||
* is linked from the top-level documents page. It can also be found at *
|
||||
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
/*
|
||||
* This example illustrates how to create a dataset in a group.
|
||||
* It is used in the HDF5 Tutorial.
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
#include "H5Cpp.h"
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
using namespace H5;
|
||||
#ifndef H5_NO_STD
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
#endif // H5_NO_STD
|
||||
#endif
|
||||
|
||||
const H5std_string FILE_NAME("h5tutr_groups.h5");
|
||||
const H5std_string DATASET_NAME1("/MyGroup/dset1");
|
||||
const H5std_string DATASET_NAME2("dset2");
|
||||
const int RANK = 2;
|
||||
const int D1DIM1 = 3;
|
||||
const int D1DIM2 = 3;
|
||||
const int D2DIM1 = 2;
|
||||
const int D2DIM2 = 10;
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int dset1_data[D1DIM1][D1DIM2], dset2_data[D2DIM1][D2DIM2]; // data buffers
|
||||
int i, j;
|
||||
|
||||
// Try block to catch exceptions raised by any of the calls inside it
|
||||
try
|
||||
{
|
||||
// Turn off the auto-printing when failure occurs so that we can
|
||||
// handle the errors appropriately
|
||||
Exception::dontPrint();
|
||||
|
||||
// Initialize the first dataset.
|
||||
for (i = 0; i < D1DIM1; i++)
|
||||
for (j = 0; j < D1DIM2; j++)
|
||||
dset1_data[i][j] = j + 1;
|
||||
|
||||
// Initialize the second dataset.
|
||||
for (i = 0; i < D2DIM1; i++)
|
||||
for (j = 0; j < D2DIM2; j++)
|
||||
dset2_data[i][j] = j + 1;
|
||||
|
||||
// Open an existing file and dataset.
|
||||
H5File file(FILE_NAME, H5F_ACC_RDWR);
|
||||
|
||||
// Create the data space for the first dataset. Note the use of
|
||||
// pointer for the instance 'dataspace'. It can be deleted and
|
||||
// used again later for another data space. An HDF5 identifier is
|
||||
// closed by the destructor or the method 'close()'.
|
||||
hsize_t dims[RANK]; // dataset dimensions
|
||||
dims[0] = D1DIM1;
|
||||
dims[1] = D1DIM2;
|
||||
DataSpace *dataspace = new DataSpace (RANK, dims);
|
||||
|
||||
// Create the dataset in group "MyGroup". Same note as for the
|
||||
// dataspace above.
|
||||
DataSet *dataset = new DataSet (file.createDataSet(DATASET_NAME1,
|
||||
PredType::STD_I32BE, *dataspace));
|
||||
|
||||
// Write the data to the dataset using default memory space, file
|
||||
// space, and transfer properties.
|
||||
dataset->write(dset1_data, PredType::NATIVE_INT);
|
||||
|
||||
// Close the current dataset and data space.
|
||||
delete dataset;
|
||||
delete dataspace;
|
||||
|
||||
// Create the data space for the second dataset.
|
||||
dims[0] = D2DIM1;
|
||||
dims[1] = D2DIM2;
|
||||
dataspace = new DataSpace (RANK, dims);
|
||||
|
||||
// Create group "Group_A" in group "MyGroup".
|
||||
Group group(file.openGroup("/MyGroup/Group_A"));
|
||||
|
||||
// Create the second dataset in group "Group_A".
|
||||
dataset = new DataSet (group.createDataSet(DATASET_NAME2,
|
||||
PredType::STD_I32BE, *dataspace));
|
||||
|
||||
// Write the data to the dataset using default memory space, file
|
||||
// space, and transfer properties.
|
||||
dataset->write(dset2_data, PredType::NATIVE_INT);
|
||||
|
||||
// Close all objects.
|
||||
delete dataspace;
|
||||
delete dataset;
|
||||
group.close();
|
||||
|
||||
} // end of try block
|
||||
|
||||
// catch failure caused by the H5File operations
|
||||
catch(FileIException error)
|
||||
{
|
||||
error.printError();
|
||||
return -1;
|
||||
}
|
||||
// catch failure caused by the DataSet operations
|
||||
catch(DataSetIException error)
|
||||
{
|
||||
error.printError();
|
||||
return -1;
|
||||
}
|
||||
|
||||
// catch failure caused by the DataSpace operations
|
||||
catch(DataSpaceIException error)
|
||||
{
|
||||
error.printError();
|
||||
return -1;
|
||||
}
|
||||
|
||||
// catch failure caused by the Group operations
|
||||
catch(GroupIException error)
|
||||
{
|
||||
error.printError();
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
177
c++/examples/h5tutr_extend.cpp
Normal file
177
c++/examples/h5tutr_extend.cpp
Normal file
@@ -0,0 +1,177 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* 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 files COPYING and Copyright.html. COPYING can be found at the root *
|
||||
* of the source code distribution tree; Copyright.html can be found at the *
|
||||
* root level of an installed copy of the electronic HDF5 document set and *
|
||||
* is linked from the top-level documents page. It can also be found at *
|
||||
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
/*
|
||||
* This example illustrates how to create a dataset that is a 4 x 6
|
||||
* array. It is used in the HDF5 Tutorial.
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
#include "H5Cpp.h"
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
using namespace H5;
|
||||
#ifndef H5_NO_STD
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
#endif // H5_NO_STD
|
||||
#endif
|
||||
|
||||
const H5std_string FILE_NAME("h5tutr_extend.h5");
|
||||
const H5std_string DATASETNAME("ExtendibleArray");
|
||||
|
||||
int main (void)
|
||||
{
|
||||
hsize_t dims[2] = {3,3}; // dataset dimensions at creation
|
||||
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
|
||||
hsize_t chunk_dims[2] ={2, 5};
|
||||
int data[3][3] = { {1, 1, 1}, // data to write
|
||||
{1, 1, 1},
|
||||
{1, 1, 1} };
|
||||
|
||||
// Variables used in extending and writing to the extended portion of dataset
|
||||
|
||||
hsize_t size[2];
|
||||
hsize_t offset[2];
|
||||
hsize_t dimsext[2] = {7, 3}; // extend dimensions
|
||||
int dataext[7][3] = { {2, 3, 4},
|
||||
{2, 3, 4},
|
||||
{2, 3, 4},
|
||||
{2, 3, 4},
|
||||
{2, 3, 4},
|
||||
{2, 3, 4},
|
||||
{2, 3, 4} };
|
||||
|
||||
// Try block to detect exceptions raised by any of the calls inside it
|
||||
try
|
||||
{
|
||||
// Turn off the auto-printing when failure occurs so that we can
|
||||
// handle the errors appropriately
|
||||
Exception::dontPrint();
|
||||
|
||||
// Create a new file using the default property lists.
|
||||
H5File file(FILE_NAME, H5F_ACC_TRUNC);
|
||||
|
||||
// Create the data space for the dataset. Note the use of pointer
|
||||
// for the instance 'dataspace'. It can be deleted and used again
|
||||
// later for another dataspace. An HDF5 identifier can be closed
|
||||
// by the destructor or the method 'close()'.
|
||||
DataSpace *dataspace = new DataSpace (2, dims, maxdims);
|
||||
|
||||
// Modify dataset creation property to enable chunking
|
||||
DSetCreatPropList prop;
|
||||
prop.setChunk(2, chunk_dims);
|
||||
|
||||
// Create the chunked dataset. Note the use of pointer.
|
||||
DataSet *dataset = new DataSet(file.createDataSet( DATASETNAME,
|
||||
PredType::STD_I32BE, *dataspace, prop) );
|
||||
|
||||
// Write data to dataset.
|
||||
dataset->write(data, PredType::NATIVE_INT);
|
||||
|
||||
// Extend the dataset. Dataset becomes 10 x 3.
|
||||
size[0] = dims[0] + dimsext[0];
|
||||
size[1] = dims[1];
|
||||
dataset->extend(size);
|
||||
|
||||
// Select a hyperslab in extended portion of the dataset.
|
||||
DataSpace *filespace = new DataSpace(dataset->getSpace ());
|
||||
offset[0] = 3;
|
||||
offset[1] = 0;
|
||||
filespace->selectHyperslab(H5S_SELECT_SET, dimsext, offset);
|
||||
|
||||
// Define memory space.
|
||||
DataSpace *memspace = new DataSpace(2, dimsext, NULL);
|
||||
|
||||
// Write data to the extended portion of the dataset.
|
||||
dataset->write(dataext, PredType::NATIVE_INT, *memspace, *filespace);
|
||||
|
||||
// Close all objects and file.
|
||||
prop.close();
|
||||
delete filespace;
|
||||
delete memspace;
|
||||
delete dataspace;
|
||||
delete dataset;
|
||||
file.close();
|
||||
|
||||
// ---------------------------------------
|
||||
// Re-open the file and read the data back
|
||||
// ---------------------------------------
|
||||
|
||||
int rdata[10][3];
|
||||
int i,j, rank, rank_chunk;
|
||||
hsize_t chunk_dimsr[2], dimsr[2];
|
||||
|
||||
// Open the file and dataset.
|
||||
file.openFile(FILE_NAME, H5F_ACC_RDONLY);
|
||||
dataset = new DataSet(file.openDataSet( DATASETNAME));
|
||||
|
||||
// Get the dataset's dataspace and creation property list.
|
||||
filespace = new DataSpace(dataset->getSpace());
|
||||
prop = dataset->getCreatePlist();
|
||||
|
||||
// Get information to obtain memory dataspace.
|
||||
rank = filespace->getSimpleExtentNdims();
|
||||
herr_t status_n = filespace->getSimpleExtentDims(dimsr);
|
||||
|
||||
if (H5D_CHUNKED == prop.getLayout())
|
||||
rank_chunk = prop.getChunk(rank, chunk_dimsr);
|
||||
cout << "rank chunk = " << rank_chunk << endl;;
|
||||
|
||||
memspace = new DataSpace(rank, dimsr, NULL);
|
||||
dataset->read(rdata, PredType::NATIVE_INT, *memspace, *filespace);
|
||||
|
||||
cout << endl;
|
||||
for (j = 0; j < dimsr[0]; j++) {
|
||||
for (i = 0; i < dimsr[1]; i++)
|
||||
cout << " " << rdata[j][i];
|
||||
cout << endl;
|
||||
}
|
||||
|
||||
// Close all objects and file.
|
||||
prop.close();
|
||||
delete filespace;
|
||||
delete memspace;
|
||||
delete dataset;
|
||||
file.close();
|
||||
|
||||
} // end of try block
|
||||
|
||||
// catch failure caused by the H5File operations
|
||||
catch(FileIException error)
|
||||
{
|
||||
error.printError();
|
||||
return -1;
|
||||
}
|
||||
|
||||
// catch failure caused by the DataSet operations
|
||||
catch(DataSetIException error)
|
||||
{
|
||||
error.printError();
|
||||
return -1;
|
||||
}
|
||||
|
||||
// catch failure caused by the DataSpace operations
|
||||
catch(DataSpaceIException error)
|
||||
{
|
||||
error.printError();
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0; // successfully terminated
|
||||
}
|
||||
|
||||
79
c++/examples/h5tutr_rdwt.cpp
Normal file
79
c++/examples/h5tutr_rdwt.cpp
Normal file
@@ -0,0 +1,79 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* 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 files COPYING and Copyright.html. COPYING can be found at the root *
|
||||
* of the source code distribution tree; Copyright.html can be found at the *
|
||||
* root level of an installed copy of the electronic HDF5 document set and *
|
||||
* is linked from the top-level documents page. It can also be found at *
|
||||
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
/*
|
||||
* This example illustrates how to write to and read from an existing
|
||||
* dataset. It is used in the HDF5 Tutorial.
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
#include "H5Cpp.h"
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
using namespace H5;
|
||||
#endif
|
||||
|
||||
const H5std_string FILE_NAME("h5tutr_dset.h5");
|
||||
const H5std_string DATASET_NAME("dset");
|
||||
const int DIM0 = 4; // dataset dimensions
|
||||
const int DIM1 = 6;
|
||||
|
||||
int main (void)
|
||||
{
|
||||
|
||||
// Data initialization.
|
||||
|
||||
int i, j;
|
||||
int data[DIM0][DIM1]; // buffer for data to write
|
||||
|
||||
for (j = 0; j < DIM0; j++)
|
||||
for (i = 0; i < DIM1; i++)
|
||||
data[j][i] = i * 6 + j + 1;
|
||||
|
||||
// Try block to detect exceptions raised by any of the calls inside it
|
||||
try
|
||||
{
|
||||
// Turn off the auto-printing when failure occurs so that we can
|
||||
// handle the errors appropriately
|
||||
Exception::dontPrint();
|
||||
|
||||
// Open an existing file and dataset.
|
||||
H5File file(FILE_NAME, H5F_ACC_RDWR);
|
||||
DataSet dataset = file.openDataSet(DATASET_NAME);
|
||||
|
||||
// Write the data to the dataset using default memory space, file
|
||||
// space, and transfer properties.
|
||||
dataset.write(data, PredType::NATIVE_INT);
|
||||
|
||||
} // end of try block
|
||||
|
||||
// catch failure caused by the H5File operations
|
||||
catch(FileIException error)
|
||||
{
|
||||
error.printError();
|
||||
return -1;
|
||||
}
|
||||
|
||||
// catch failure caused by the DataSet operations
|
||||
catch(DataSetIException error)
|
||||
{
|
||||
error.printError();
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0; // successfully terminated
|
||||
}
|
||||
183
c++/examples/h5tutr_subset.cpp
Normal file
183
c++/examples/h5tutr_subset.cpp
Normal file
@@ -0,0 +1,183 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* 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 files COPYING and Copyright.html. COPYING can be found at the root *
|
||||
* of the source code distribution tree; Copyright.html can be found at the *
|
||||
* root level of an installed copy of the electronic HDF5 document set and *
|
||||
* is linked from the top-level documents page. It can also be found at *
|
||||
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
/*
|
||||
* This example illustrates how to read/write a subset of data (a slab)
|
||||
* from/to a dataset in an HDF5 file. It is used in the HDF5 Tutorial.
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
#include "H5Cpp.h"
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
using namespace H5;
|
||||
#ifndef H5_NO_STD
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
#endif // H5_NO_STD
|
||||
#endif
|
||||
|
||||
const H5std_string FILE_NAME("h5tutr_subset.h5");
|
||||
const H5std_string DATASET_NAME("IntArray");
|
||||
|
||||
const int RANK = 2;
|
||||
const int DIM0_SUB = 3; // subset dimensions
|
||||
const int DIM1_SUB = 4;
|
||||
const int DIM0 = 8; // size of dataset
|
||||
const int DIM1 = 10;
|
||||
|
||||
int main (void)
|
||||
{
|
||||
int i,j;
|
||||
int data[DIM0][DIM1], sdata[DIM0_SUB][DIM1_SUB], rdata[DIM0][DIM1];
|
||||
|
||||
// Try block to detect exceptions raised by any of the calls inside it
|
||||
try
|
||||
{
|
||||
// Turn off the auto-printing when failure occurs so that we can
|
||||
// handle the errors appropriately
|
||||
Exception::dontPrint();
|
||||
|
||||
// ---------------------------------------------------
|
||||
// Create a new file using the default property lists.
|
||||
// Then create a dataset and write data to it.
|
||||
// Close the file and dataset.
|
||||
// ---------------------------------------------------
|
||||
|
||||
H5File file(FILE_NAME, H5F_ACC_TRUNC);
|
||||
|
||||
hsize_t dims[2];
|
||||
dims[0] = DIM0;
|
||||
dims[1] = DIM1;
|
||||
DataSpace dataspace = DataSpace (RANK, dims);
|
||||
|
||||
DataSet dataset(file.createDataSet( DATASET_NAME,
|
||||
PredType::STD_I32BE, dataspace) );
|
||||
|
||||
|
||||
for (j = 0; j < DIM0; j++) {
|
||||
for (i = 0; i < DIM1; i++)
|
||||
if (i< (DIM1/2))
|
||||
data[j][i] = 1;
|
||||
else
|
||||
data[j][i] = 2;
|
||||
}
|
||||
|
||||
dataset.write(data, PredType::NATIVE_INT);
|
||||
|
||||
cout << endl << "Data Written to File:" << endl;
|
||||
for (j = 0; j < DIM0; j++) {
|
||||
for (i = 0; i < DIM1; i++)
|
||||
cout << " " << data[j][i];
|
||||
cout << endl;
|
||||
}
|
||||
|
||||
dataspace.close();
|
||||
dataset.close();
|
||||
file.close();
|
||||
|
||||
// ---------------------------------------------------
|
||||
// Reopen the file and dataset and write a subset of
|
||||
// values to the dataset.
|
||||
// ---------------------------------------------------
|
||||
|
||||
hsize_t offset[2], count[2], stride[2], block[2];
|
||||
hsize_t dimsm[2];
|
||||
|
||||
file.openFile(FILE_NAME, H5F_ACC_RDWR);
|
||||
dataset = file.openDataSet(DATASET_NAME);
|
||||
|
||||
// Specify size and shape of subset to write.
|
||||
|
||||
offset[0] = 1;
|
||||
offset[1] = 2;
|
||||
|
||||
count[0] = DIM0_SUB;
|
||||
count[1] = DIM1_SUB;
|
||||
|
||||
stride[0] = 1;
|
||||
stride[1] = 1;
|
||||
|
||||
block[0] = 1;
|
||||
block[1] = 1;
|
||||
|
||||
// Define Memory Dataspace. Get file dataspace and select
|
||||
// a subset from the file dataspace.
|
||||
|
||||
dimsm[0] = DIM0_SUB;
|
||||
dimsm[1] = DIM1_SUB;
|
||||
|
||||
DataSpace memspace(RANK, dimsm, NULL);
|
||||
|
||||
dataspace = dataset.getSpace();
|
||||
dataspace.selectHyperslab(H5S_SELECT_SET, count, offset, stride, block);
|
||||
|
||||
// Write a subset of data to the dataset, then read the
|
||||
// entire dataset back from the file.
|
||||
|
||||
cout << endl << "Write subset to file specifying: " << endl;
|
||||
cout << " offset=1x2 stride=1x1 count=3x4 block=1x1" << endl;
|
||||
for (j = 0; j < DIM0_SUB; j++) {
|
||||
for (i = 0; i < DIM1_SUB; i++)
|
||||
sdata[j][i] = 5;
|
||||
}
|
||||
|
||||
dataset.write(sdata, PredType::NATIVE_INT, memspace, dataspace);
|
||||
dataset.read(rdata, PredType::NATIVE_INT);
|
||||
|
||||
|
||||
cout << endl << "Data in File after Subset is Written:" << endl;
|
||||
for (i = 0; i < DIM0; i++) {
|
||||
for (j = 0; j < DIM1; j++)
|
||||
cout << " " << rdata[i][j];
|
||||
cout << endl;
|
||||
}
|
||||
cout << endl;
|
||||
|
||||
// It is not necessary to close these objects because close() will
|
||||
// be called when the object instances are going out of scope.
|
||||
dataspace.close();
|
||||
memspace.close();
|
||||
dataset.close();
|
||||
file.close();
|
||||
|
||||
} // end of try block
|
||||
|
||||
// catch failure caused by the H5File operations
|
||||
catch(FileIException error)
|
||||
{
|
||||
error.printError();
|
||||
return -1;
|
||||
}
|
||||
|
||||
// catch failure caused by the DataSet operations
|
||||
catch(DataSetIException error)
|
||||
{
|
||||
error.printError();
|
||||
return -1;
|
||||
}
|
||||
|
||||
// catch failure caused by the DataSpace operations
|
||||
catch(DataSpaceIException error)
|
||||
{
|
||||
error.printError();
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0; // successfully terminated
|
||||
}
|
||||
|
||||
31
c++/examples/run-c++-ex.sh.in
Executable file → Normal file
31
c++/examples/run-c++-ex.sh.in
Executable file → Normal file
@@ -64,6 +64,10 @@ RunTest()
|
||||
# Run tests
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
echo "*************************************************"
|
||||
echo "** Run C++ API Examples **"
|
||||
echo "** **"
|
||||
echo "*************************************************"
|
||||
if (RunTest create &&\
|
||||
rm create &&\
|
||||
RunTest readdata &&\
|
||||
@@ -82,6 +86,33 @@ then
|
||||
else
|
||||
EXIT_VALUE=${EXIT_FAILURE}
|
||||
fi
|
||||
echo
|
||||
echo "***************************************************"
|
||||
echo "** Run Tutorial Examples **"
|
||||
echo "** **"
|
||||
echo "***************************************************"
|
||||
if (RunTest h5tutr_crtdat &&\
|
||||
rm h5tutr_crtdat &&\
|
||||
RunTest h5tutr_rdwt &&\
|
||||
rm h5tutr_rdwt &&\
|
||||
RunTest h5tutr_crtatt &&\
|
||||
rm h5tutr_crtatt &&\
|
||||
RunTest h5tutr_crtgrp &&\
|
||||
rm h5tutr_crtgrp &&\
|
||||
RunTest h5tutr_crtgrpar &&\
|
||||
rm h5tutr_crtgrpar &&\
|
||||
RunTest h5tutr_crtgrpd &&\
|
||||
rm h5tutr_crtgrpd &&\
|
||||
RunTest h5tutr_extend &&\
|
||||
rm h5tutr_extend &&\
|
||||
RunTest h5tutr_subset &&\
|
||||
rm h5tutr_subset &&\
|
||||
RunTest h5tutr_cmprss &&\
|
||||
rm h5tutr_cmprss ); then
|
||||
EXIT_VALUE=${EXIT_SUCCESS}
|
||||
else
|
||||
EXIT_VALUE=${EXIT_FAILURE}
|
||||
fi
|
||||
fi
|
||||
|
||||
# Cleanup
|
||||
|
||||
7
c++/examples/testh5c++.sh.in
Executable file → Normal file
7
c++/examples/testh5c++.sh.in
Executable file → Normal file
@@ -19,6 +19,8 @@
|
||||
# Modification:
|
||||
#
|
||||
|
||||
srcdir=@srcdir@
|
||||
|
||||
# Initializations
|
||||
TESTNAME=h5c++
|
||||
EXIT_SUCCESS=0
|
||||
@@ -41,11 +43,6 @@ verbose=yes
|
||||
myos=`uname -s`
|
||||
myhostnama=`uname -n`
|
||||
|
||||
# The build (current) directory might be different than the source directory.
|
||||
if test -z "$srcdir"; then
|
||||
srcdir=.
|
||||
fi
|
||||
|
||||
# Generate some source files and library for tests.
|
||||
suffix=cpp # source file suffix
|
||||
hdf5main=${H5TOOL}_hdf5main.$suffix
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
cmake_minimum_required (VERSION 2.8.6)
|
||||
cmake_minimum_required (VERSION 3.1.0)
|
||||
PROJECT (HDF5_CPP_SRC)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Shared/Static Libs
|
||||
#-----------------------------------------------------------------------------
|
||||
IF (BUILD_SHARED_LIBS)
|
||||
SET (CPP_BUILT_AS_DYNAMIC_LIB 1)
|
||||
ENDIF (BUILD_SHARED_LIBS)
|
||||
if (BUILD_SHARED_LIBS)
|
||||
set (CPP_BUILT_AS_DYNAMIC_LIB 1)
|
||||
endif (BUILD_SHARED_LIBS)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Generate configure file
|
||||
#-----------------------------------------------------------------------------
|
||||
CONFIGURE_FILE (${HDF5_RESOURCES_DIR}/H5cxx_config.h.in
|
||||
configure_file (${HDF_RESOURCES_DIR}/H5cxx_config.h.in
|
||||
${HDF5_BINARY_DIR}/H5cxx_pubconf.h
|
||||
)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Define cpp Library
|
||||
#-----------------------------------------------------------------------------
|
||||
SET (CPP_SRCS
|
||||
set (CPP_SRCS
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5AbstractDs.cpp
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5ArrayType.cpp
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5AtomType.cpp
|
||||
@@ -40,6 +40,7 @@ SET (CPP_SRCS
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5IdComponent.cpp
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5IntType.cpp
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5Library.cpp
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5Location.cpp
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5Object.cpp
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5PredType.cpp
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5PropList.cpp
|
||||
@@ -47,7 +48,7 @@ SET (CPP_SRCS
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5VarLenType.cpp
|
||||
)
|
||||
|
||||
SET (CPP_HDRS
|
||||
set (CPP_HDRS
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5AbstractDs.h
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5Alltypes.h
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5ArrayType.h
|
||||
@@ -74,6 +75,7 @@ SET (CPP_HDRS
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5Include.h
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5IntType.h
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5Library.h
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5Location.h
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5Object.h
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5PredType.h
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5PropList.h
|
||||
@@ -81,20 +83,24 @@ SET (CPP_HDRS
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5VarLenType.h
|
||||
)
|
||||
|
||||
ADD_LIBRARY (${HDF5_CPP_LIB_TARGET} ${LIB_TYPE} ${CPP_SRCS} ${CPP_HDRS})
|
||||
TARGET_LINK_LIBRARIES (${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET})
|
||||
SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_CPP_LIB_TARGET}")
|
||||
add_library (${HDF5_CPP_LIB_TARGET} ${LIB_TYPE} ${CPP_SRCS} ${CPP_HDRS})
|
||||
TARGET_C_PROPERTIES (${HDF5_CPP_LIB_TARGET} " " " ")
|
||||
target_link_libraries (${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET})
|
||||
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_CPP_LIB_TARGET}")
|
||||
H5_SET_LIB_OPTIONS (${HDF5_CPP_LIB_TARGET} ${HDF5_CPP_LIB_NAME} ${LIB_TYPE})
|
||||
SET_TARGET_PROPERTIES (${HDF5_CPP_LIB_TARGET} PROPERTIES FOLDER libraries/cpp)
|
||||
set_target_properties (${HDF5_CPP_LIB_TARGET} PROPERTIES
|
||||
FOLDER libraries/cpp
|
||||
INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
|
||||
)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Add file(s) to CMake Install
|
||||
#-----------------------------------------------------------------------------
|
||||
INSTALL (
|
||||
install (
|
||||
FILES
|
||||
${CPP_HDRS}
|
||||
DESTINATION
|
||||
${HDF5_INSTALL_INCLUDE_DIR}/cpp
|
||||
${HDF5_INSTALL_INCLUDE_DIR}
|
||||
COMPONENT
|
||||
cppheaders
|
||||
)
|
||||
@@ -102,8 +108,12 @@ INSTALL (
|
||||
#-----------------------------------------------------------------------------
|
||||
# Add Target(s) to CMake Install for import into other projects
|
||||
#-----------------------------------------------------------------------------
|
||||
IF (HDF5_EXPORTED_TARGETS)
|
||||
INSTALL (
|
||||
if (HDF5_EXPORTED_TARGETS)
|
||||
if (BUILD_SHARED_LIBS)
|
||||
INSTALL_TARGET_PDB (${HDF5_CPP_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} cpplibraries)
|
||||
endif (BUILD_SHARED_LIBS)
|
||||
|
||||
install (
|
||||
TARGETS
|
||||
${HDF5_CPP_LIB_TARGET}
|
||||
EXPORT
|
||||
@@ -112,4 +122,4 @@ IF (HDF5_EXPORTED_TARGETS)
|
||||
ARCHIVE DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT cpplibraries
|
||||
RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT cpplibraries
|
||||
)
|
||||
ENDIF (HDF5_EXPORTED_TARGETS)
|
||||
endif (HDF5_EXPORTED_TARGETS)
|
||||
|
||||
@@ -25,11 +25,6 @@
|
||||
#include "H5CommonFG.h"
|
||||
#include "H5Alltypes.h"
|
||||
|
||||
#include <iostream> // remove when done
|
||||
|
||||
using std::cerr;
|
||||
using std::endl;
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
#endif
|
||||
|
||||
@@ -14,13 +14,8 @@
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
// Class AbstractDs is an abstract base class, from which Attribute and
|
||||
// DataSet inherit. It provides the services that are common to both
|
||||
// Attribute and DataSet. It also inherits from H5Object and passes down
|
||||
// the services that H5Object provides.
|
||||
|
||||
#ifndef _AbstractDs_H
|
||||
#define _AbstractDs_H
|
||||
#ifndef __AbstractDs_H
|
||||
#define __AbstractDs_H
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
@@ -33,6 +28,14 @@ class FloatType;
|
||||
class IntType;
|
||||
class StrType;
|
||||
class VarLenType;
|
||||
|
||||
/*! \class AbstractDs
|
||||
\brief AbstractDs is an abstract base class, inherited by Attribute
|
||||
and DataSet.
|
||||
|
||||
It provides a collection of services that are common to both Attribute
|
||||
and DataSet. AbstractDs inherits from H5Object.
|
||||
*/
|
||||
class H5_DLLCPP AbstractDs {
|
||||
public:
|
||||
// Gets a copy the datatype of that this abstract dataset uses.
|
||||
@@ -51,21 +54,20 @@ class H5_DLLCPP AbstractDs {
|
||||
StrType getStrType() const;
|
||||
VarLenType getVarLenType() const;
|
||||
|
||||
// Gets the size in memory of this abstract dataset.
|
||||
///\brief Gets the size in memory of this abstract dataset.
|
||||
virtual size_t getInMemDataSize() const = 0;
|
||||
|
||||
// Gets the dataspace of this abstract dataset - pure virtual.
|
||||
///\brief Gets the dataspace of this abstract dataset - pure virtual.
|
||||
virtual DataSpace getSpace() const = 0;
|
||||
|
||||
// Gets the class of the datatype that is used by this abstract
|
||||
// dataset.
|
||||
H5T_class_t getTypeClass() const;
|
||||
|
||||
// Returns the amount of storage size required for this abstract
|
||||
// dataset - pure virtual.
|
||||
///\brief Returns the amount of storage size required - pure virtual.
|
||||
virtual hsize_t getStorageSize() const = 0;
|
||||
|
||||
// Returns this class name
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass() const = 0;
|
||||
|
||||
// Copy constructor
|
||||
@@ -88,4 +90,4 @@ class H5_DLLCPP AbstractDs {
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
}
|
||||
#endif
|
||||
#endif // _AbstractDs_H
|
||||
#endif // __AbstractDs_H
|
||||
|
||||
@@ -54,15 +54,16 @@ ArrayType::ArrayType( const hid_t existing_id ) : DataType( existing_id )
|
||||
rank = H5Tget_array_ndims(existing_id);
|
||||
if (rank < 0)
|
||||
{
|
||||
throw DataTypeIException("ArrayType overloaded constructor", "H5Tget_array_ndims failed");
|
||||
throw DataTypeIException("ArrayType constructor (existing id)", "H5Tget_array_ndims failed");
|
||||
}
|
||||
|
||||
// Get the dimensions of the existing array and store it in this array
|
||||
dimensions = new hsize_t[rank];
|
||||
//hsize_t rdims2[H5S_MAX_RANK];
|
||||
int ret_value = H5Tget_array_dims2(id, dimensions);
|
||||
if (ret_value < 0)
|
||||
throw DataTypeIException("ArrayType::getArrayDims", "H5Tget_array_dims2 failed");
|
||||
// Allocate space for the dimensions
|
||||
dimensions = new hsize_t[rank];
|
||||
|
||||
// Get the dimensions of the existing array and store it in this array
|
||||
int ret_value = H5Tget_array_dims2(id, dimensions);
|
||||
if (ret_value < 0)
|
||||
throw DataTypeIException("ArrayType constructor (existing id)", "H5Tget_array_dims2 failed");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -72,10 +73,13 @@ ArrayType::ArrayType( const hid_t existing_id ) : DataType( existing_id )
|
||||
//--------------------------------------------------------------------------
|
||||
ArrayType::ArrayType( const ArrayType& original ) : DataType( original )
|
||||
{
|
||||
rank = original.rank;
|
||||
dimensions = new hsize_t[rank];
|
||||
for (int i = 0; i < rank; i++)
|
||||
dimensions[i] = original.dimensions[i];
|
||||
// Copy the rank of the original array
|
||||
rank = original.rank;
|
||||
|
||||
// Allocate space then copy the dimensions from the original array
|
||||
dimensions = new hsize_t[rank];
|
||||
for (int i = 0; i < rank; i++)
|
||||
dimensions[i] = original.dimensions[i];
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -90,14 +94,19 @@ ArrayType::ArrayType( const ArrayType& original ) : DataType( original )
|
||||
//--------------------------------------------------------------------------
|
||||
ArrayType::ArrayType(const DataType& base_type, int ndims, const hsize_t* dims) : DataType()
|
||||
{
|
||||
hid_t new_type_id = H5Tarray_create2(base_type.getId(), ndims, dims);
|
||||
if (new_type_id < 0)
|
||||
throw DataTypeIException("ArrayType constructor", "H5Tarray_create2 failed");
|
||||
id = new_type_id;
|
||||
rank = ndims;
|
||||
dimensions = new hsize_t[rank];
|
||||
for (int i = 0; i < rank; i++)
|
||||
dimensions[i] = dims[i];
|
||||
// Call C API to create an array data type
|
||||
hid_t new_type_id = H5Tarray_create2(base_type.getId(), ndims, dims);
|
||||
if (new_type_id < 0)
|
||||
throw DataTypeIException("ArrayType constructor", "H5Tarray_create2 failed");
|
||||
|
||||
// Set the id and rank for this object
|
||||
id = new_type_id;
|
||||
rank = ndims;
|
||||
|
||||
// Allocate space then set the dimensions as provided by caller
|
||||
dimensions = new hsize_t[rank];
|
||||
for (int i = 0; i < rank; i++)
|
||||
dimensions[i] = dims[i];
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -132,19 +141,19 @@ int ArrayType::getArrayNDims()
|
||||
//--------------------------------------------------------------------------
|
||||
int ArrayType::getArrayDims(hsize_t* dims)
|
||||
{
|
||||
// if the array's dimensions have not been stored, retrieve them via C API
|
||||
// If the array's dimensions have not been stored, retrieve them via C API
|
||||
if (dimensions == NULL)
|
||||
{
|
||||
int ndims = H5Tget_array_dims2(id, dims);
|
||||
if (ndims < 0)
|
||||
throw DataTypeIException("ArrayType::getArrayDims", "H5Tget_array_dims2 failed");
|
||||
// store the array's info in memory
|
||||
// Store the array's info in memory
|
||||
rank = ndims;
|
||||
dimensions = new hsize_t[rank];
|
||||
for (int i = 0; i < rank; i++)
|
||||
dimensions[i] = dims[i];
|
||||
}
|
||||
// otherwise, simply copy what's in 'dimensions' to 'dims'
|
||||
// Otherwise, simply copy what's in 'dimensions' to 'dims'
|
||||
for (int i = 0; i < rank; i++)
|
||||
dims[i] = dimensions[i];
|
||||
return(rank);
|
||||
|
||||
@@ -14,16 +14,17 @@
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
// Class ArrayType inherits from DataType and provides wrappers for the
|
||||
// HDF5 C's Array Datatypes.
|
||||
|
||||
#ifndef _H5ArrayType_H
|
||||
#define _H5ArrayType_H
|
||||
#ifndef __H5ArrayType_H
|
||||
#define __H5ArrayType_H
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
#endif
|
||||
|
||||
/*! \class ArrayType
|
||||
\brief Class ArrayType inherits from DataType and provides wrappers for
|
||||
the HDF5's Array Datatypes.
|
||||
*/
|
||||
class H5_DLLCPP ArrayType : public DataType {
|
||||
public:
|
||||
// Constructor that creates a new array data type based on the
|
||||
@@ -36,7 +37,7 @@ class H5_DLLCPP ArrayType : public DataType {
|
||||
// Returns the sizes of dimensions of this array datatype.
|
||||
int getArrayDims(hsize_t* dims);
|
||||
|
||||
// Returns this class name
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass () const { return("ArrayType"); }
|
||||
|
||||
// Copy constructor: makes copy of the original object.
|
||||
@@ -59,4 +60,4 @@ class H5_DLLCPP ArrayType : public DataType {
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif // __H5ArrayType_H
|
||||
|
||||
@@ -45,7 +45,6 @@ AtomType::AtomType() : DataType() {}
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
AtomType::AtomType( const hid_t existing_id ) : DataType( existing_id ) {}
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: AtomType copy constructor
|
||||
@@ -53,6 +52,7 @@ AtomType::AtomType( const hid_t existing_id ) : DataType( existing_id ) {}
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
AtomType::AtomType( const AtomType& original ) : DataType( original ) {}
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: AtomType::setSize
|
||||
@@ -98,7 +98,7 @@ H5T_order_t AtomType::getOrder() const
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: AtomType::getOrder
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It takes a reference to a \c std::string for the buffer that
|
||||
/// It takes a reference to a \c H5std_string for the buffer that
|
||||
/// provide the text description of the returned byte order.
|
||||
/// The text description can be either of the following:
|
||||
/// "Little endian byte ordering (0)";
|
||||
@@ -178,7 +178,7 @@ size_t AtomType::getPrecision() const
|
||||
///\exception H5::DataTypeIException
|
||||
///\par Description
|
||||
/// For information, please see C layer Reference Manuat at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5T.html#Datatype-SetPrecision
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5T.html#Datatype-SetPrecision
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void AtomType::setPrecision( size_t precision ) const
|
||||
@@ -198,7 +198,7 @@ void AtomType::setPrecision( size_t precision ) const
|
||||
///\exception H5::DataTypeIException
|
||||
///\par Description
|
||||
/// For information, please see C layer Reference Manuat at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5T.html#Datatype-GetOffset
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5T.html#Datatype-GetOffset
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
// Modification
|
||||
// 12/05/00: due to C API change
|
||||
@@ -225,7 +225,7 @@ int AtomType::getOffset() const
|
||||
///\exception H5::DataTypeIException
|
||||
///\par Description
|
||||
/// For information, please see C layer Reference Manuat at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5T.html#Datatype-SetOffset
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5T.html#Datatype-SetOffset
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void AtomType::setOffset( size_t offset ) const
|
||||
@@ -285,12 +285,14 @@ void AtomType::setPad( H5T_pad_t lsb, H5T_pad_t msb ) const
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: AtomType destructor
|
||||
///\brief Noop destructor.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
AtomType::~AtomType() {}
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
} // end namespace
|
||||
|
||||
@@ -14,18 +14,20 @@
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
// Class AtomType is a base class, from which IntType, FloatType, StrType,
|
||||
// and PredType inherit. It provides the services that are common to these
|
||||
// subclasses. It also inherits from DataType and passes down the
|
||||
// services that are common to all the datatypes.
|
||||
|
||||
#ifndef _H5AtomType_H
|
||||
#define _H5AtomType_H
|
||||
#ifndef __H5AtomType_H
|
||||
#define __H5AtomType_H
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
#endif
|
||||
|
||||
/*! \class AtomType
|
||||
\brief AtomType is a base class, inherited by IntType, FloatType,
|
||||
StrType, and PredType.
|
||||
|
||||
AtomType provides operations on HDF5 atomic datatypes. It also inherits
|
||||
from DataType.
|
||||
*/
|
||||
class H5_DLLCPP AtomType : public DataType {
|
||||
public:
|
||||
// Returns the byte order of an atomic datatype.
|
||||
@@ -57,14 +59,16 @@ class H5_DLLCPP AtomType : public DataType {
|
||||
// Sets the total size for an atomic datatype.
|
||||
void setSize( size_t size ) const;
|
||||
|
||||
// Returns this class name
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass () const { return("AtomType"); }
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
// Copy constructor - makes copy of the original object
|
||||
AtomType( const AtomType& original );
|
||||
|
||||
// Noop destructor
|
||||
virtual ~AtomType();
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
protected:
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
@@ -78,4 +82,4 @@ class H5_DLLCPP AtomType : public DataType {
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif // __H5AtomType_H
|
||||
|
||||
@@ -44,12 +44,13 @@ namespace H5 {
|
||||
#endif // H5_NO_STD
|
||||
#endif
|
||||
|
||||
class H5_DLLCPP H5Object; // forward declaration for UserData4Aiterate
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Attribute default constructor
|
||||
///\brief Default constructor: Creates a stub attribute
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
Attribute::Attribute() : AbstractDs(), IdComponent(), id(0) {}
|
||||
Attribute::Attribute() : AbstractDs(), IdComponent(), id(H5I_INVALID_HID) {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Attribute copy constructor
|
||||
@@ -161,13 +162,13 @@ void Attribute::read( const DataType& mem_type, void *buf ) const
|
||||
// Mar 2008
|
||||
// Corrected a misunderstanding that H5Aread would allocate
|
||||
// space for the buffer. Obtained the attribute size and
|
||||
// allocated memory properly. - BMR
|
||||
// allocated memory properly. -BMR
|
||||
// Apr 2009
|
||||
// Used getInMemDataSize to get attribute data size. - BMR
|
||||
// Used getInMemDataSize to get attribute data size. -BMR
|
||||
// Jul 2009
|
||||
// Divided into specific private functions for fixed- and
|
||||
// variable-len string data: p_read_fixed_len and
|
||||
// p_read_variable_len. This should improve readability.
|
||||
// p_read_variable_len. This should improve readability. -BMR
|
||||
//--------------------------------------------------------------------------
|
||||
void Attribute::read(const DataType& mem_type, H5std_string& strg) const
|
||||
{
|
||||
@@ -198,7 +199,7 @@ void Attribute::read(const DataType& mem_type, H5std_string& strg) const
|
||||
//--------------------------------------------------------------------------
|
||||
size_t Attribute::getInMemDataSize() const
|
||||
{
|
||||
char *func = "Attribute::getInMemDataSize";
|
||||
const char *func = "Attribute::getInMemDataSize";
|
||||
|
||||
// Get the data type of this attribute
|
||||
hid_t mem_type_id = H5Aget_type(id);
|
||||
@@ -207,7 +208,8 @@ size_t Attribute::getInMemDataSize() const
|
||||
throw AttributeIException(func, "H5Aget_type failed");
|
||||
}
|
||||
|
||||
// Get the data type's size
|
||||
// Get the data type's size by first getting its native type then getting
|
||||
// the native type's size.
|
||||
hid_t native_type = H5Tget_native_type(mem_type_id, H5T_DIR_DEFAULT);
|
||||
if (native_type < 0)
|
||||
{
|
||||
@@ -219,7 +221,18 @@ size_t Attribute::getInMemDataSize() const
|
||||
throw AttributeIException(func, "H5Tget_size failed");
|
||||
}
|
||||
|
||||
// Get number of elements of the attribute
|
||||
// Close the native type and the datatype of this attribute.
|
||||
if (H5Tclose(native_type) < 0)
|
||||
{
|
||||
throw DataSetIException(func, "H5Tclose(native_type) failed");
|
||||
}
|
||||
if (H5Tclose(mem_type_id) < 0)
|
||||
{
|
||||
throw DataSetIException(func, "H5Tclose(mem_type_id) failed");
|
||||
}
|
||||
|
||||
// Get number of elements of the attribute by first getting its dataspace
|
||||
// then getting the number of elements in the dataspace
|
||||
hid_t space_id = H5Aget_space(id);
|
||||
if (space_id < 0)
|
||||
{
|
||||
@@ -231,6 +244,12 @@ size_t Attribute::getInMemDataSize() const
|
||||
throw AttributeIException(func, "H5Sget_simple_extent_npoints failed");
|
||||
}
|
||||
|
||||
// Close the dataspace
|
||||
if (H5Sclose(space_id) < 0)
|
||||
{
|
||||
throw DataSetIException(func, "H5Sclose failed");
|
||||
}
|
||||
|
||||
// Calculate and return the size of the data
|
||||
size_t data_size = type_size * num_elements;
|
||||
return(data_size);
|
||||
@@ -280,75 +299,169 @@ H5std_string Attribute::getFileName() const
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Attribute::getName
|
||||
///\brief Gets the name of this attribute, returning its length.
|
||||
///\param buf_size - IN: Desired length of the name
|
||||
///\param attr_name - OUT: Buffer for the name string
|
||||
///\return Length of the attribute name
|
||||
///\param attr_name - OUT: Buffer for the name string as char*
|
||||
///\param buf_size - IN: Length of the buffer, default to 0
|
||||
///\return Actual length of the attribute name
|
||||
///\exception H5::AttributeIException
|
||||
// Programmer Binh-Minh Ribler - Nov, 2001
|
||||
///\par Description
|
||||
/// This function retrieves \a buf_size chars of the attribute's
|
||||
/// name including null termination. Thus, if the actual length
|
||||
/// of the name is more than buf_size-1, the retrieved name will
|
||||
/// be truncated to accommodate the null terminator.
|
||||
/// To get length of the attribute's name for buffer allocation,
|
||||
/// an application can call this function passing in NULL for the
|
||||
/// first argument and ignore the second argument.
|
||||
// Programmer Binh-Minh Ribler - Mar, 2014
|
||||
//--------------------------------------------------------------------------
|
||||
ssize_t Attribute::getName( size_t buf_size, H5std_string& attr_name ) const
|
||||
ssize_t Attribute::getName(char* attr_name, size_t buf_size) const
|
||||
{
|
||||
char* name_C = new char[buf_size+1]; // temporary C-string for C API
|
||||
// H5Aget_name will get buf_size-1 chars of the name to null terminate it
|
||||
ssize_t name_size = H5Aget_name(id, buf_size, attr_name);
|
||||
|
||||
// Calls C routine H5Aget_name to get the name of the attribute
|
||||
ssize_t name_size = H5Aget_name( id, buf_size, name_C );
|
||||
// If H5Aget_name returns a negative value, raise an exception
|
||||
if (name_size < 0)
|
||||
{
|
||||
throw AttributeIException("Attribute::getName", "H5Aget_name failed");
|
||||
}
|
||||
else if (name_size == 0)
|
||||
{
|
||||
throw AttributeIException("Attribute::getName", "Attribute must have a name, name length is 0");
|
||||
}
|
||||
// Return length of the name
|
||||
return(name_size);
|
||||
}
|
||||
|
||||
// If H5Aget_name returns a negative value, raise an exception,
|
||||
if( name_size < 0 )
|
||||
{
|
||||
throw AttributeIException("Attribute::getName", "H5Aget_name failed");
|
||||
}
|
||||
// otherwise, convert the C attribute name and return
|
||||
attr_name = name_C;
|
||||
delete []name_C;
|
||||
return( name_size );
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Attribute::getName
|
||||
///\brief Returns the name of this attribute as an \a H5std_string.
|
||||
///\return Name of the attribute
|
||||
///\exception H5::AttributeIException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
// Modification
|
||||
// Mar 2014 - BMR
|
||||
// Revised to use the modified getName() above
|
||||
//--------------------------------------------------------------------------
|
||||
H5std_string Attribute::getName() const
|
||||
{
|
||||
H5std_string attr_name(""); // attribute name to return
|
||||
|
||||
// Preliminary call to get the size of the attribute name
|
||||
ssize_t name_size = H5Aget_name(id, (size_t)0, NULL);
|
||||
|
||||
// If H5Aget_name failed, throw exception
|
||||
if (name_size < 0)
|
||||
{
|
||||
throw AttributeIException("Attribute::getName", "H5Aget_name failed");
|
||||
}
|
||||
else if (name_size == 0)
|
||||
{
|
||||
throw AttributeIException("Attribute::getName", "Attribute must have a name, name length is 0");
|
||||
}
|
||||
// Attribute's name exists, retrieve it
|
||||
else if (name_size > 0)
|
||||
{
|
||||
char* name_C = new char[name_size+1]; // temporary C-string
|
||||
HDmemset(name_C, 0, name_size+1); // clear buffer
|
||||
|
||||
// Use overloaded function
|
||||
name_size = getName(name_C, name_size+1);
|
||||
|
||||
// Convert the C attribute name to return
|
||||
attr_name = name_C;
|
||||
|
||||
// Clean up resource
|
||||
delete []name_C;
|
||||
|
||||
}
|
||||
// Return attribute's name
|
||||
return(attr_name);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Attribute::getName
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it returns the
|
||||
/// attribute's name, not the length.
|
||||
///\return Name of the attribute
|
||||
///\param buf_size - IN: Desired length of the name
|
||||
/// It differs from the above function in that it takes an integer
|
||||
/// specifying a desired length to be retrieved of the name.
|
||||
///\return Name (or part of name) of the attribute
|
||||
///\param len - IN: Desired length of the name
|
||||
///\exception H5::AttributeIException
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
// Modification
|
||||
// Mar 2014 - BMR
|
||||
// Revised to use the new getName() below
|
||||
//--------------------------------------------------------------------------
|
||||
H5std_string Attribute::getName( size_t buf_size ) const
|
||||
H5std_string Attribute::getName(size_t len) const
|
||||
{
|
||||
H5std_string attr_name;
|
||||
ssize_t name_size = getName( buf_size, attr_name );
|
||||
return( attr_name );
|
||||
ssize_t name_size = getName(attr_name, len);
|
||||
return(attr_name);
|
||||
// let caller catch exception if any
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Attribute::getName
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above functions in that it doesn't take
|
||||
/// any arguments and returns the attribute's name.
|
||||
///\return Name of the attribute
|
||||
///\brief Gets the name of this attribute, returning its length.
|
||||
///\param attr_name - OUT: Buffer for the name string as \a H5std_string
|
||||
///\param len - IN: Desired length of the name, default to 0
|
||||
///\return Actual length of the attribute name
|
||||
///\exception H5::AttributeIException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
///\par Description
|
||||
/// This function retrieves the attribute's name as a string. The
|
||||
/// buf_size can specify a specific length or default to 0, in
|
||||
/// which case the entire name will be retrieved.
|
||||
// Programmer Binh-Minh Ribler - Nov, 2001
|
||||
// Modification
|
||||
// Mar 2014 - BMR
|
||||
// Added to replace getName(size_t, H5std_string&) so that it'll
|
||||
// allow the argument "len" to be skipped.
|
||||
//--------------------------------------------------------------------------
|
||||
H5std_string Attribute::getName() const
|
||||
ssize_t Attribute::getName(H5std_string& attr_name, size_t len) const
|
||||
{
|
||||
// Try with 256 characters for the name first, if the name's length
|
||||
// returned is more than that then, read the name again with the
|
||||
// appropriate space allocation
|
||||
char* name_C = new char[256]; // temporary C-string for C API
|
||||
ssize_t name_size = H5Aget_name(id, 255, name_C);
|
||||
ssize_t name_size = 0;
|
||||
|
||||
H5std_string attr_name;
|
||||
if (name_size >= 256)
|
||||
name_size = getName(name_size, attr_name);
|
||||
// If no length is provided, get the entire attribute name
|
||||
if (len == 0)
|
||||
{
|
||||
attr_name = getName();
|
||||
name_size = attr_name.length();
|
||||
}
|
||||
// If length is provided, get that number of characters in name
|
||||
else
|
||||
{
|
||||
char* name_C = new char[len+1]; // temporary C-string
|
||||
HDmemset(name_C, 0, len+1); // clear buffer
|
||||
|
||||
// otherwise, convert the C attribute name and return
|
||||
else
|
||||
attr_name = name_C;
|
||||
// Use overloaded function
|
||||
name_size = getName(name_C, len+1);
|
||||
|
||||
delete []name_C;
|
||||
return( attr_name );
|
||||
// Convert the C attribute name to return
|
||||
attr_name = name_C;
|
||||
|
||||
// Clean up resource
|
||||
delete []name_C;
|
||||
}
|
||||
// Otherwise, keep attr_name intact
|
||||
|
||||
// Return name size
|
||||
return(name_size);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Attribute::getName
|
||||
///\brief This function is replaced by the previous function, which
|
||||
/// provides more convenient prototype. It will be removed
|
||||
/// in future release.
|
||||
///\param len - IN: Desired length of the name
|
||||
///\param attr_name - OUT: Buffer for the name string
|
||||
///\return Actual length of the attribute name
|
||||
///\exception H5::AttributeIException
|
||||
// Programmer Binh-Minh Ribler - Nov, 2001
|
||||
// Modification
|
||||
// Modified to call its replacement. -BMR, 2014/04/16
|
||||
//--------------------------------------------------------------------------
|
||||
ssize_t Attribute::getName( size_t len, H5std_string& attr_name ) const
|
||||
{
|
||||
return (getName(attr_name, len));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -366,9 +479,35 @@ hsize_t Attribute::getStorageSize() const
|
||||
return (storage_size);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Attribute::flush
|
||||
///\brief Flushes all buffers associated with a file specified by
|
||||
/// this attribute, to disk.
|
||||
///\param scope - IN: Specifies the scope of the flushing action,
|
||||
/// which can be either of these values:
|
||||
/// \li \c H5F_SCOPE_GLOBAL - Flushes the entire virtual file
|
||||
/// \li \c H5F_SCOPE_LOCAL - Flushes only the specified file
|
||||
///\exception H5::AttributeIException
|
||||
///\par Description
|
||||
/// This attribute is used to identify the file to be flushed.
|
||||
// Programmer Binh-Minh Ribler - 2012
|
||||
// Modification
|
||||
// Sep 2012 - BMR
|
||||
// Duplicated from H5Location
|
||||
//--------------------------------------------------------------------------
|
||||
void Attribute::flush(H5F_scope_t scope) const
|
||||
{
|
||||
herr_t ret_value = H5Fflush(getId(), scope);
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw AttributeIException("Attribute::flush", "H5Fflush failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Attribute::getId
|
||||
// Purpose: Get the id of this attribute
|
||||
///\brief Get the id of this attribute
|
||||
///\return Attribute identifier
|
||||
// Description:
|
||||
// Class hierarchy is revised to address bugzilla 1068. Class
|
||||
// AbstractDS and Attribute are moved out of H5Object. In
|
||||
@@ -447,11 +586,10 @@ void Attribute::p_read_fixed_len(const DataType& mem_type, H5std_string& strg) c
|
||||
// Modification
|
||||
// Jul 2009
|
||||
// Separated the variable length case from the original
|
||||
// Attribute::read
|
||||
// Attribute::read. -BMR
|
||||
//--------------------------------------------------------------------------
|
||||
void Attribute::p_read_variable_len(const DataType& mem_type, H5std_string& strg) const
|
||||
{
|
||||
|
||||
// Prepare and call C API to read attribute.
|
||||
char *strg_C;
|
||||
|
||||
@@ -468,6 +606,7 @@ void Attribute::p_read_variable_len(const DataType& mem_type, H5std_string& strg
|
||||
HDfree(strg_C);
|
||||
}
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Attribute::p_setId
|
||||
///\brief Sets the identifier of this object to a new value.
|
||||
@@ -492,6 +631,7 @@ void Attribute::p_setId(const hid_t new_id)
|
||||
// reset object's id to the given id
|
||||
id = new_id;
|
||||
}
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Attribute::close
|
||||
@@ -510,7 +650,7 @@ void Attribute::close()
|
||||
throw AttributeIException("Attribute::close", "H5Aclose failed");
|
||||
}
|
||||
// reset the id
|
||||
id = 0;
|
||||
id = H5I_INVALID_HID;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,13 +14,21 @@
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#ifndef _H5Attribute_H
|
||||
#define _H5Attribute_H
|
||||
#ifndef __H5Attribute_H
|
||||
#define __H5Attribute_H
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
#endif
|
||||
|
||||
/*! \class Attribute
|
||||
\brief Class Attribute operates on HDF5 attributes.
|
||||
|
||||
An attribute has many characteristics similar to a dataset, thus both
|
||||
Attribute and DataSet are derivatives of AbstractDs. Attribute also
|
||||
inherits from IdComponent because an attribute is an HDF5 component that
|
||||
is identified by an identifier.
|
||||
*/
|
||||
class H5_DLLCPP Attribute : public AbstractDs, public IdComponent {
|
||||
public:
|
||||
// Closes this attribute.
|
||||
@@ -30,9 +38,13 @@ class H5_DLLCPP Attribute : public AbstractDs, public IdComponent {
|
||||
H5std_string getFileName() const;
|
||||
|
||||
// Gets the name of this attribute.
|
||||
ssize_t getName(char* attr_name, size_t buf_size = 0) const;
|
||||
H5std_string getName(size_t len) const;
|
||||
H5std_string getName() const;
|
||||
ssize_t getName(H5std_string& attr_name, size_t len = 0) const;
|
||||
// The overloaded function below is replaced by the one above and it
|
||||
// is kept for backward compatibility purpose.
|
||||
ssize_t getName( size_t buf_size, H5std_string& attr_name ) const;
|
||||
H5std_string getName( size_t buf_size ) const; // returns name, not its length
|
||||
H5std_string getName() const; // returns name, no argument
|
||||
|
||||
// Gets a copy of the dataspace for this attribute.
|
||||
virtual DataSpace getSpace() const;
|
||||
@@ -51,7 +63,11 @@ class H5_DLLCPP Attribute : public AbstractDs, public IdComponent {
|
||||
void write(const DataType& mem_type, const void *buf ) const;
|
||||
void write(const DataType& mem_type, const H5std_string& strg ) const;
|
||||
|
||||
// Returns this class name
|
||||
// Flushes all buffers associated with the file specified by this
|
||||
// attribute to disk.
|
||||
void flush( H5F_scope_t scope ) const;
|
||||
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass () const { return("Attribute"); }
|
||||
|
||||
// Creates a copy of an existing attribute using the attribute id
|
||||
@@ -70,8 +86,10 @@ class H5_DLLCPP Attribute : public AbstractDs, public IdComponent {
|
||||
virtual ~Attribute();
|
||||
|
||||
protected:
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
// Sets the attribute id.
|
||||
virtual void p_setId(const hid_t new_id);
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
private:
|
||||
hid_t id; // HDF5 attribute id
|
||||
@@ -95,4 +113,4 @@ class H5_DLLCPP Attribute : public AbstractDs, public IdComponent {
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif // __H5Attribute_H
|
||||
|
||||
@@ -14,14 +14,15 @@
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#ifndef _H5Classes_H
|
||||
#define _H5Classes_H
|
||||
#ifndef __H5Classes_H
|
||||
#define __H5Classes_H
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
#endif
|
||||
class Exception;
|
||||
class IdComponent;
|
||||
class H5Location;
|
||||
class H5Object;
|
||||
class PropList;
|
||||
class FileCreatPropList;
|
||||
@@ -48,4 +49,4 @@ namespace H5 {
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif // __H5Classes_H
|
||||
|
||||
@@ -31,7 +31,10 @@
|
||||
#include "H5DataSet.h"
|
||||
#include "H5File.h"
|
||||
#include "H5Alltypes.h"
|
||||
#include "H5private.h" // for HDstrcpy
|
||||
#include "H5private.h" // for HDstrcpy
|
||||
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
// There are a few comments that are common to most of the functions
|
||||
// defined in this file so they are listed here.
|
||||
@@ -68,25 +71,29 @@ namespace H5 {
|
||||
//--------------------------------------------------------------------------
|
||||
Group CommonFG::createGroup( const char* name, size_t size_hint ) const
|
||||
{
|
||||
// Create group creation property list for size_hint
|
||||
hid_t gcpl_id = H5Pcreate(H5P_GROUP_CREATE);
|
||||
|
||||
// If the creation of the property list failed, throw an exception
|
||||
if( gcpl_id < 0 )
|
||||
throwException("createGroup", "H5Pcreate failed");
|
||||
// Group creation property list for size_hint
|
||||
hid_t gcpl_id = 0;
|
||||
|
||||
// Set the local heap size hint
|
||||
if( H5Pset_local_heap_size_hint(gcpl_id, size_hint) < 0) {
|
||||
H5Pclose(gcpl_id);
|
||||
throwException("createGroup", "H5Pset_local_heap_size failed");
|
||||
}
|
||||
if(!(size_hint == (size_t)-1 || size_hint == 0)) {
|
||||
|
||||
// If the creation of the property list failed, throw an exception
|
||||
if((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0)
|
||||
throwException("createGroup", "H5Pcreate failed");
|
||||
|
||||
if( H5Pset_local_heap_size_hint(gcpl_id, size_hint) < 0) {
|
||||
H5Pclose(gcpl_id);
|
||||
throwException("createGroup", "H5Pset_local_heap_size failed");
|
||||
}
|
||||
}
|
||||
|
||||
// Call C routine H5Gcreate2 to create the named group, giving the
|
||||
// location id which can be a file id or a group id
|
||||
hid_t group_id = H5Gcreate2( getLocId(), name, H5P_DEFAULT, gcpl_id, H5P_DEFAULT );
|
||||
|
||||
// Close the group creation property list
|
||||
H5Pclose(gcpl_id);
|
||||
// Close the group creation property list, if necessary
|
||||
if(gcpl_id > 0)
|
||||
H5Pclose(gcpl_id);
|
||||
|
||||
// If the creation of the group failed, throw an exception
|
||||
if( group_id < 0 )
|
||||
@@ -101,7 +108,7 @@ Group CommonFG::createGroup( const char* name, size_t size_hint ) const
|
||||
// Function: CommonFG::createGroup
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a name.
|
||||
/// \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
Group CommonFG::createGroup( const H5std_string& name, size_t size_hint ) const
|
||||
@@ -126,9 +133,7 @@ Group CommonFG::openGroup( const char* name ) const
|
||||
|
||||
// If the opening of the group failed, throw an exception
|
||||
if( group_id < 0 )
|
||||
{
|
||||
throwException("openGroup", "H5Gopen2 failed");
|
||||
}
|
||||
|
||||
// No failure, create and return the Group object
|
||||
Group group( group_id );
|
||||
@@ -139,7 +144,7 @@ Group CommonFG::openGroup( const char* name ) const
|
||||
// Function: CommonFG::openGroup
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a name.
|
||||
/// \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
Group CommonFG::openGroup( const H5std_string& name ) const
|
||||
@@ -170,9 +175,7 @@ DataSet CommonFG::createDataSet( const char* name, const DataType& data_type, co
|
||||
|
||||
// If the creation of the dataset failed, throw an exception
|
||||
if( dataset_id < 0 )
|
||||
{
|
||||
throwException("createDataSet", "H5Dcreate2 failed");
|
||||
}
|
||||
|
||||
// No failure, create and return the DataSet object
|
||||
DataSet dataset( dataset_id );
|
||||
@@ -183,7 +186,7 @@ DataSet CommonFG::createDataSet( const char* name, const DataType& data_type, co
|
||||
// Function: CommonFG::createDataSet
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a name.
|
||||
/// \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
DataSet CommonFG::createDataSet( const H5std_string& name, const DataType& data_type, const DataSpace& data_space, const DSetCreatPropList& create_plist ) const
|
||||
@@ -218,7 +221,7 @@ DataSet CommonFG::openDataSet( const char* name ) const
|
||||
// Function: CommonFG::openDataSet
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a name.
|
||||
/// \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
DataSet CommonFG::openDataSet( const H5std_string& name ) const
|
||||
@@ -266,16 +269,15 @@ void CommonFG::link( H5L_type_t link_type, const char* curr_name, const char* ne
|
||||
break;
|
||||
} /* end switch */
|
||||
|
||||
if( ret_value < 0 ) {
|
||||
if( ret_value < 0 )
|
||||
throwException("link", "creating link failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: CommonFG::link
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a curr_name and \a new_name.
|
||||
/// \c H5std_string for \a curr_name and \a new_name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void CommonFG::link( H5L_type_t link_type, const H5std_string& curr_name, const H5std_string& new_name ) const
|
||||
@@ -296,16 +298,14 @@ void CommonFG::unlink( const char* name ) const
|
||||
{
|
||||
herr_t ret_value = H5Ldelete( getLocId(), name, H5P_DEFAULT );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throwException("unlink", "H5Ldelete failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: CommonFG::unlink
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a name.
|
||||
/// \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void CommonFG::unlink( const H5std_string& name ) const
|
||||
@@ -322,8 +322,8 @@ void CommonFG::unlink( const H5std_string& name ) const
|
||||
///\note
|
||||
/// Exercise care in moving groups as it is possible to render
|
||||
/// data in a file inaccessible with Group::move. Please refer
|
||||
/// to the Group Interface in the HDF5 User's Guide at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/Groups.html
|
||||
/// to the Group Interface in the HDF5 User's Guide for details at:
|
||||
/// http://www.hdfgroup.org/HDF5/doc/UG/UG_frame09Groups.html
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
// Modification
|
||||
// 2007: QAK modified to use H5L APIs - BMR
|
||||
@@ -332,16 +332,14 @@ void CommonFG::move( const char* src, const char* dst ) const
|
||||
{
|
||||
herr_t ret_value = H5Lmove( getLocId(), src, H5L_SAME_LOC, dst, H5P_DEFAULT, H5P_DEFAULT );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throwException("move", "H5Lmove failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: CommonFG::move
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a src and \a dst.
|
||||
/// \c H5std_string for \a src and \a dst.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void CommonFG::move( const H5std_string& src, const H5std_string& dst ) const
|
||||
@@ -360,23 +358,21 @@ void CommonFG::move( const H5std_string& src, const H5std_string& dst ) const
|
||||
///\par Description
|
||||
/// For more information, please refer to the C layer Reference
|
||||
/// Manual at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5G.html#Group-GetObjinfo
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5G.html#Group-GetObjinfo
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void CommonFG::getObjinfo( const char* name, hbool_t follow_link, H5G_stat_t& statbuf ) const
|
||||
{
|
||||
herr_t ret_value = H5Gget_objinfo( getLocId(), name, follow_link, &statbuf );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throwException("getObjinfo", "H5Gget_objinfo failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: CommonFG::getObjinfo
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a name.
|
||||
/// \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void CommonFG::getObjinfo( const H5std_string& name, hbool_t follow_link, H5G_stat_t& statbuf ) const
|
||||
@@ -396,16 +392,14 @@ void CommonFG::getObjinfo( const char* name, H5G_stat_t& statbuf ) const
|
||||
{
|
||||
herr_t ret_value = H5Gget_objinfo( getLocId(), name, 0, &statbuf );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throwException("getObjinfo", "H5Gget_objinfo failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: CommonFG::getObjinfo
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a name.
|
||||
/// \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - Nov, 2005
|
||||
//--------------------------------------------------------------------------
|
||||
void CommonFG::getObjinfo( const H5std_string& name, H5G_stat_t& statbuf ) const
|
||||
@@ -436,9 +430,8 @@ H5std_string CommonFG::getLinkval( const char* name, size_t size ) const
|
||||
{
|
||||
ret_value = H5Lget_info(getLocId(), name, &linkinfo, H5P_DEFAULT);
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throwException("getLinkval", "H5Lget_info to find buffer size failed");
|
||||
}
|
||||
|
||||
val_size = linkinfo.u.val_size;
|
||||
}
|
||||
|
||||
@@ -446,12 +439,15 @@ H5std_string CommonFG::getLinkval( const char* name, size_t size ) const
|
||||
if (val_size > 0)
|
||||
{
|
||||
value_C = new char[val_size+1]; // temporary C-string for C API
|
||||
HDmemset(value_C, 0, val_size+1); // clear buffer
|
||||
|
||||
ret_value = H5Lget_val(getLocId(), name, value_C, val_size, H5P_DEFAULT);
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
delete []value_C;
|
||||
throwException("getLinkval", "H5Lget_val failed");
|
||||
}
|
||||
|
||||
value = H5std_string(value_C);
|
||||
delete []value_C;
|
||||
}
|
||||
@@ -462,7 +458,7 @@ H5std_string CommonFG::getLinkval( const char* name, size_t size ) const
|
||||
// Function: CommonFG::getLinkval
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a name.
|
||||
/// \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
H5std_string CommonFG::getLinkval( const H5std_string& name, size_t size ) const
|
||||
@@ -470,140 +466,6 @@ H5std_string CommonFG::getLinkval( const H5std_string& name, size_t size ) const
|
||||
return( getLinkval( name.c_str(), size ));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: CommonFG::setComment
|
||||
///\brief Sets or resets the comment for an object specified by its name.
|
||||
///\param name - IN: Name of the object
|
||||
///\param comment - IN: New comment
|
||||
///\exception H5::FileIException or H5::GroupIException
|
||||
///\par Description
|
||||
/// If \a comment is an empty string or a null pointer, the comment
|
||||
/// message is removed from the object.
|
||||
/// Comments should be relatively short, null-terminated, ASCII
|
||||
/// strings. They can be attached to any object that has an
|
||||
/// object header, e.g., data sets, groups, named data types,
|
||||
/// and data spaces, but not symbolic links.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
// Modification
|
||||
// 2007: QAK modified to use H5O APIs; however the first parameter is
|
||||
// no longer just file or group, this function should be moved
|
||||
// to another class to accommodate attribute, dataset, and named
|
||||
// datatype. - BMR
|
||||
//--------------------------------------------------------------------------
|
||||
void CommonFG::setComment( const char* name, const char* comment ) const
|
||||
{
|
||||
herr_t ret_value = H5Oset_comment_by_name( getLocId(), name, comment, H5P_DEFAULT );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throwException("setComment", "H5Oset_comment_by_name failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: CommonFG::setComment
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a name and \a comment.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void CommonFG::setComment( const H5std_string& name, const H5std_string& comment ) const
|
||||
{
|
||||
setComment( name.c_str(), comment.c_str() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: CommonFG::removeComment
|
||||
///\brief Removes the comment from an object specified by its name.
|
||||
///\param name - IN: Name of the object
|
||||
///\exception H5::FileIException or H5::GroupIException
|
||||
// Programmer Binh-Minh Ribler - May 2005
|
||||
// 2007: QAK modified to use H5O APIs; however the first parameter is
|
||||
// no longer just file or group, this function should be moved
|
||||
// to another class to accommodate attribute, dataset, and named
|
||||
// datatype. - BMR
|
||||
//--------------------------------------------------------------------------
|
||||
void CommonFG::removeComment(const char* name) const
|
||||
{
|
||||
herr_t ret_value = H5Oset_comment_by_name(getLocId(), name, NULL, H5P_DEFAULT);
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throwException("removeComment", "H5Oset_comment_by_name failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: CommonFG::removeComment
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a name.
|
||||
// Programmer Binh-Minh Ribler - May 2005
|
||||
//--------------------------------------------------------------------------
|
||||
void CommonFG::removeComment(const H5std_string& name) const
|
||||
{
|
||||
removeComment (name.c_str());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: CommonFG::getComment
|
||||
///\brief Retrieves comment for the specified object and its comment's
|
||||
/// length.
|
||||
///\param name - IN: Name of the object
|
||||
///\param bufsize - IN: Length of the comment to retrieve
|
||||
///\return Comment string
|
||||
///\exception H5::FileIException or H5::GroupIException
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
// 2007: QAK modified to use H5O APIs; however the first parameter is
|
||||
// no longer just file or group, this function should be moved
|
||||
// to another class to accommodate attribute, dataset, and named
|
||||
// datatype. - BMR
|
||||
//--------------------------------------------------------------------------
|
||||
H5std_string CommonFG::getComment( const char* name, size_t bufsize ) const
|
||||
{
|
||||
// bufsize is default to 256
|
||||
// temporary variable
|
||||
hid_t loc_id = getLocId(); // temporary variable
|
||||
|
||||
// temporary C-string for the object's comment; bufsize already including
|
||||
// null character
|
||||
char* comment_C = new char[bufsize];
|
||||
ssize_t ret_value = H5Oget_comment_by_name(loc_id, name, comment_C, bufsize, H5P_DEFAULT);
|
||||
|
||||
// if the actual length of the comment is longer than bufsize and bufsize
|
||||
// was the default value, i.e., not given by the user, then call
|
||||
// H5Oget_comment_by_name again with the correct value.
|
||||
// If the call to H5Oget_comment_by_name returned an error, skip this block
|
||||
// and throw an exception below.
|
||||
if (ret_value >= 0 && (size_t)ret_value > bufsize && bufsize == 256)
|
||||
{
|
||||
size_t new_size = ret_value;
|
||||
delete []comment_C;
|
||||
comment_C = new char[new_size]; // new_size including null terminator
|
||||
ret_value = H5Oget_comment_by_name(loc_id, name, comment_C, new_size, H5P_DEFAULT);
|
||||
}
|
||||
|
||||
// if H5Oget_comment_by_name returns SUCCEED, return the string comment,
|
||||
// otherwise, throw an exception
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throwException("getComment", "H5Oget_comment_by_name failed");
|
||||
}
|
||||
H5std_string comment = H5std_string(comment_C);
|
||||
delete []comment_C;
|
||||
return (comment);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: CommonFG::getComment
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
H5std_string CommonFG::getComment( const H5std_string& name, size_t bufsize ) const
|
||||
{
|
||||
return( getComment( name.c_str(), bufsize ));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: CommonFG::mount
|
||||
///\brief Mounts the file \a child onto this group.
|
||||
@@ -611,9 +473,9 @@ H5std_string CommonFG::getComment( const H5std_string& name, size_t bufsize ) co
|
||||
///\param child - IN: File to mount
|
||||
///\param plist - IN: Property list to use
|
||||
///\exception H5::FileIException or H5::GroupIException
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
// Programmer Binh-Minh Ribler - 2014 (original 2000)
|
||||
//--------------------------------------------------------------------------
|
||||
void CommonFG::mount( const char* name, H5File& child, PropList& plist ) const
|
||||
void CommonFG::mount(const char* name, const H5File& child, const PropList& plist ) const
|
||||
{
|
||||
// Obtain identifiers for C API
|
||||
hid_t plist_id = plist.getId();
|
||||
@@ -624,21 +486,46 @@ void CommonFG::mount( const char* name, H5File& child, PropList& plist ) const
|
||||
|
||||
// Raise exception if H5Fmount returns negative value
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throwException("mount", "H5Fmount failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: CommonFG::mount
|
||||
///\brief This is an overloaded member function, kept for backward
|
||||
/// compatibility. It differs from the above function in that it
|
||||
/// misses const's. This wrapper will be removed in future release.
|
||||
///\param name - IN: Name of the group
|
||||
///\param child - IN: File to mount
|
||||
///\param plist - IN: Property list to use
|
||||
///\exception H5::FileIException or H5::GroupIException
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void CommonFG::mount(const char* name, H5File& child, PropList& plist) const
|
||||
{
|
||||
mount(name, (const H5File)child, (const PropList)plist);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: CommonFG::mount
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a name.
|
||||
/// It takes an \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void CommonFG::mount( const H5std_string& name, H5File& child, PropList& plist ) const
|
||||
void CommonFG::mount(const H5std_string& name, const H5File& child, const PropList& plist) const
|
||||
{
|
||||
mount( name.c_str(), child, plist );
|
||||
mount(name.c_str(), child, plist);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: CommonFG::mount
|
||||
///\brief This is an overloaded member function, kept for backward
|
||||
/// compatibility. It differs from the above function in that it
|
||||
/// misses const's. This wrapper will be removed in future release.
|
||||
// Programmer Binh-Minh Ribler - 2014
|
||||
//--------------------------------------------------------------------------
|
||||
void CommonFG::mount(const H5std_string& name, H5File& child, PropList& plist) const
|
||||
{
|
||||
mount(name.c_str(), (const H5File)child, (const PropList)plist);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -655,16 +542,14 @@ void CommonFG::unmount( const char* name ) const
|
||||
|
||||
// Raise exception if H5Funmount returns negative value
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throwException("unmount", "H5Funmount failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: CommonFG::unmount
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a name.
|
||||
/// \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void CommonFG::unmount( const H5std_string& name ) const
|
||||
@@ -699,7 +584,7 @@ DataType CommonFG::openDataType( const char* name ) const
|
||||
// Function: CommonFG::openDataType
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a name.
|
||||
/// \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
DataType CommonFG::openDataType( const H5std_string& name ) const
|
||||
@@ -734,7 +619,7 @@ ArrayType CommonFG::openArrayType( const char* name ) const
|
||||
// Function: CommonFG::openArrayType
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a name.
|
||||
/// \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - Jul, 2005
|
||||
//--------------------------------------------------------------------------
|
||||
ArrayType CommonFG::openArrayType( const H5std_string& name ) const
|
||||
@@ -769,7 +654,7 @@ CompType CommonFG::openCompType( const char* name ) const
|
||||
// Function: CommonFG::openCompType
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a name.
|
||||
/// \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
CompType CommonFG::openCompType( const H5std_string& name ) const
|
||||
@@ -804,7 +689,7 @@ EnumType CommonFG::openEnumType( const char* name ) const
|
||||
// Function: CommonFG::openEnumType
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a name.
|
||||
/// \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
EnumType CommonFG::openEnumType( const H5std_string& name ) const
|
||||
@@ -839,7 +724,7 @@ IntType CommonFG::openIntType( const char* name ) const
|
||||
// Function: CommonFG::openIntType
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a name.
|
||||
/// \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
IntType CommonFG::openIntType( const H5std_string& name ) const
|
||||
@@ -874,7 +759,7 @@ FloatType CommonFG::openFloatType( const char* name ) const
|
||||
// Function: CommonFG::openFloatType
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a name.
|
||||
/// \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
FloatType CommonFG::openFloatType( const H5std_string& name ) const
|
||||
@@ -909,7 +794,7 @@ StrType CommonFG::openStrType( const char* name ) const
|
||||
// Function: CommonFG::openStrType
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a name.
|
||||
/// \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
StrType CommonFG::openStrType( const H5std_string& name ) const
|
||||
@@ -944,7 +829,7 @@ VarLenType CommonFG::openVarLenType( const char* name ) const
|
||||
// Function: CommonFG::openVarLenType
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a name.
|
||||
/// \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - Jul, 2005
|
||||
//--------------------------------------------------------------------------
|
||||
VarLenType CommonFG::openVarLenType( const H5std_string& name ) const
|
||||
@@ -980,7 +865,7 @@ int CommonFG::iterateElems( const char* name, int *idx, H5G_iterate_t op , void*
|
||||
// Function: CommonFG::iterateElems
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a name.
|
||||
/// \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
int CommonFG::iterateElems( const H5std_string& name, int *idx, H5G_iterate_t op , void* op_data )
|
||||
@@ -1002,9 +887,7 @@ hsize_t CommonFG::getNumObjs() const
|
||||
|
||||
herr_t ret_value = H5Gget_info(getLocId(), &ginfo);
|
||||
if(ret_value < 0)
|
||||
{
|
||||
throwException("getNumObjs", "H5Gget_info failed");
|
||||
}
|
||||
return (ginfo.nlinks);
|
||||
}
|
||||
|
||||
@@ -1028,14 +911,20 @@ H5std_string CommonFG::getObjnameByIdx(hsize_t idx) const
|
||||
// call H5Lget_name_by_idx with name as NULL to get its length
|
||||
ssize_t name_len = H5Lget_name_by_idx(getLocId(), ".", H5_INDEX_NAME, H5_ITER_INC, idx, NULL, 0, H5P_DEFAULT);
|
||||
if(name_len < 0)
|
||||
{
|
||||
throwException("getObjnameByIdx", "H5Lget_name_by_idx failed");
|
||||
}
|
||||
|
||||
// now, allocate C buffer to get the name
|
||||
char* name_C = new char[name_len+1];
|
||||
HDmemset(name_C, 0, name_len+1); // clear buffer
|
||||
|
||||
name_len = H5Lget_name_by_idx(getLocId(), ".", H5_INDEX_NAME, H5_ITER_INC, idx, name_C, name_len+1, H5P_DEFAULT);
|
||||
|
||||
if (name_len < 0)
|
||||
{
|
||||
delete []name_C;
|
||||
throwException("getObjnameByIdx", "H5Lget_name_by_idx failed");
|
||||
}
|
||||
|
||||
// clean up and return the string
|
||||
H5std_string name = H5std_string(name_C);
|
||||
delete []name_C;
|
||||
@@ -1063,9 +952,8 @@ ssize_t CommonFG::getObjnameByIdx(hsize_t idx, char* name, size_t size) const
|
||||
{
|
||||
ssize_t name_len = H5Lget_name_by_idx(getLocId(), ".", H5_INDEX_NAME, H5_ITER_INC, idx, name, size, H5P_DEFAULT);
|
||||
if(name_len < 0)
|
||||
{
|
||||
throwException("getObjnameByIdx", "H5Lget_name_by_idx failed");
|
||||
}
|
||||
|
||||
return (name_len);
|
||||
}
|
||||
|
||||
@@ -1073,23 +961,147 @@ ssize_t CommonFG::getObjnameByIdx(hsize_t idx, char* name, size_t size) const
|
||||
// Function: CommonFG::getObjnameByIdx
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a name.
|
||||
/// \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - January, 2003
|
||||
//--------------------------------------------------------------------------
|
||||
ssize_t CommonFG::getObjnameByIdx(hsize_t idx, H5std_string& name, size_t size) const
|
||||
{
|
||||
char* name_C = new char[size];
|
||||
ssize_t name_len = getObjnameByIdx(idx, name_C, size);
|
||||
char* name_C = new char[size+1]; // temporary C-string for object name
|
||||
HDmemset(name_C, 0, size+1); // clear buffer
|
||||
|
||||
// call overloaded function to get the name
|
||||
ssize_t name_len = getObjnameByIdx(idx, name_C, size+1);
|
||||
if(name_len < 0)
|
||||
{
|
||||
delete []name_C;
|
||||
throwException("getObjnameByIdx", "H5Lget_name_by_idx failed");
|
||||
}
|
||||
|
||||
// clean up and return the string
|
||||
name = H5std_string(name_C);
|
||||
delete []name_C;
|
||||
return (name_len);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: CommonFG::childObjType
|
||||
///\brief Returns the type of an object in this file/group, given the
|
||||
/// object's name.
|
||||
///\param objname - IN: Name of the object
|
||||
///\return Object type, which can have the following values for group,
|
||||
/// dataset, and named datatype
|
||||
/// \li \c H5O_TYPE_GROUP
|
||||
/// \li \c H5O_TYPE_DATASET
|
||||
/// \li \c H5O_TYPE_NAMED_DATATYPE
|
||||
/// Refer to the C API documentation for more details:
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5O.html#Object-GetInfo
|
||||
///\exception H5::FileIException or H5::GroupIException
|
||||
/// Exception will be thrown when:
|
||||
/// - an error returned by the C API
|
||||
/// - object type is not one of the valid values above
|
||||
// Programmer Binh-Minh Ribler - April, 2014
|
||||
//--------------------------------------------------------------------------
|
||||
H5O_type_t CommonFG::childObjType(const char* objname) const
|
||||
{
|
||||
H5O_info_t objinfo;
|
||||
H5O_type_t objtype = H5O_TYPE_UNKNOWN;
|
||||
|
||||
// Use C API to get information of the object
|
||||
herr_t ret_value = H5Oget_info_by_name(getLocId(), objname, &objinfo, H5P_DEFAULT);
|
||||
|
||||
// Throw exception if C API returns failure
|
||||
if (ret_value < 0)
|
||||
throwException("childObjType", "H5Oget_info_by_name failed");
|
||||
// Return a valid type or throw an exception for unknown type
|
||||
else
|
||||
switch (objinfo.type)
|
||||
{
|
||||
case H5O_TYPE_GROUP:
|
||||
case H5O_TYPE_DATASET:
|
||||
case H5O_TYPE_NAMED_DATATYPE:
|
||||
objtype = objinfo.type;
|
||||
break;
|
||||
default:
|
||||
throwException("childObjType", "Unknown type of object");
|
||||
}
|
||||
return(objtype);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: CommonFG::childObjType
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It takes an \a H5std_string for the object's name.
|
||||
///\brief Returns the type of an object in this group, given the
|
||||
/// object's name.
|
||||
///\param objname - IN: Name of the object (H5std_string&)
|
||||
///\exception H5::FileIException or H5::GroupIException
|
||||
// Programmer Binh-Minh Ribler - April, 2014
|
||||
//--------------------------------------------------------------------------
|
||||
H5O_type_t CommonFG::childObjType(const H5std_string& objname) const
|
||||
{
|
||||
// Use overloaded function
|
||||
H5O_type_t objtype = childObjType(objname.c_str());
|
||||
return(objtype);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: CommonFG::childObjType
|
||||
///\brief Returns the type of an object in this file/group, given the
|
||||
/// object's index and its type and order.
|
||||
///\param index - IN: Position of the object
|
||||
///\param index_type - IN: Type of the index, default to H5_INDEX_NAME
|
||||
///\param order - IN: Traversing order, default to H5_ITER_INC
|
||||
///\param objname - IN: Name of the object, default to "."
|
||||
///\return Object type, which can have the following values for group,
|
||||
/// dataset, and named datatype
|
||||
/// \li \c H5O_TYPE_GROUP
|
||||
/// \li \c H5O_TYPE_DATASET
|
||||
/// \li \c H5O_TYPE_NAMED_DATATYPE
|
||||
/// Refer to the C API documentation for more details:
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5O.html#Object-GetInfo
|
||||
///\exception H5::FileIException or H5::GroupIException
|
||||
/// Exception will be thrown when:
|
||||
/// - an error returned by the C API
|
||||
/// - object type is not one of the valid values above
|
||||
// Developer's Notes:
|
||||
// - this overload uses H5Oget_info_by_idx instead of H5Oget_info_by_name
|
||||
// like the previous childObjType()
|
||||
// - index is the required argument so, first
|
||||
// - objname is last because it's more likely the location is already
|
||||
// fully specified
|
||||
// - Leave property list out for now because C API is not using it, it
|
||||
// can be added later when needed.
|
||||
// Programmer Binh-Minh Ribler - April, 2014
|
||||
//--------------------------------------------------------------------------
|
||||
H5O_type_t CommonFG::childObjType(hsize_t index, H5_index_t index_type, H5_iter_order_t order, const char* objname) const
|
||||
{
|
||||
herr_t ret_value;
|
||||
H5O_info_t objinfo;
|
||||
H5O_type_t objtype = H5O_TYPE_UNKNOWN;
|
||||
|
||||
// Use C API to get information of the object
|
||||
ret_value = H5Oget_info_by_idx(getLocId(), objname, index_type, order, index, &objinfo, H5P_DEFAULT);
|
||||
|
||||
// Throw exception if C API returns failure
|
||||
if (ret_value < 0)
|
||||
throwException("childObjType", "H5Oget_info_by_idx failed");
|
||||
// Return a valid type or throw an exception for unknown type
|
||||
else
|
||||
switch (objinfo.type)
|
||||
{
|
||||
case H5O_TYPE_GROUP:
|
||||
case H5O_TYPE_DATASET:
|
||||
case H5O_TYPE_NAMED_DATATYPE:
|
||||
objtype = objinfo.type;
|
||||
break;
|
||||
default:
|
||||
throwException("childObjType", "Unknown type of object");
|
||||
}
|
||||
return(objtype);
|
||||
}
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: CommonFG::getObjTypeByIdx
|
||||
///\brief Returns the type of an object in this group, given the
|
||||
@@ -1103,9 +1115,8 @@ H5G_obj_t CommonFG::getObjTypeByIdx(hsize_t idx) const
|
||||
{
|
||||
H5G_obj_t obj_type = H5Gget_objtype_by_idx(getLocId(), idx);
|
||||
if (obj_type == H5G_UNKNOWN)
|
||||
{
|
||||
throwException("getObjTypeByIdx", "H5Gget_objtype_by_idx failed");
|
||||
}
|
||||
|
||||
return (obj_type);
|
||||
}
|
||||
|
||||
@@ -1115,7 +1126,7 @@ H5G_obj_t CommonFG::getObjTypeByIdx(hsize_t idx) const
|
||||
/// It differs from the above function because it also provides
|
||||
/// the returned object type in text (char*)
|
||||
///\param idx - IN: Transient index of the object
|
||||
///\param type_name - IN: Object type in text
|
||||
///\param type_name - OUT: Object type in text
|
||||
///\return Object type
|
||||
///\exception H5::FileIException or H5::GroupIException
|
||||
// Programmer Binh-Minh Ribler - May, 2010
|
||||
@@ -1131,9 +1142,7 @@ H5G_obj_t CommonFG::getObjTypeByIdx(hsize_t idx, char* type_name) const
|
||||
case H5G_TYPE: HDstrcpy(type_name, "datatype"); break;
|
||||
case H5G_UNKNOWN:
|
||||
default:
|
||||
{
|
||||
throwException("getObjTypeByIdx", "H5Gget_objtype_by_idx failed");
|
||||
}
|
||||
}
|
||||
return (obj_type);
|
||||
}
|
||||
@@ -1143,7 +1152,7 @@ H5G_obj_t CommonFG::getObjTypeByIdx(hsize_t idx, char* type_name) const
|
||||
/// It differs from the above function because it also provides
|
||||
/// the returned object type in text (H5std_string&)
|
||||
///\param idx - IN: Transient index of the object
|
||||
///\param type_name - IN: Object type in text
|
||||
///\param type_name - OUT: Object type in text
|
||||
///\return Object type
|
||||
///\exception H5::FileIException or H5::GroupIException
|
||||
// Programmer Binh-Minh Ribler - January, 2003
|
||||
@@ -1159,14 +1168,14 @@ H5G_obj_t CommonFG::getObjTypeByIdx(hsize_t idx, H5std_string& type_name) const
|
||||
case H5G_TYPE: type_name = H5std_string("datatype"); break;
|
||||
case H5G_UNKNOWN:
|
||||
default:
|
||||
{
|
||||
throwException("getObjTypeByIdx", "H5Gget_objtype_by_idx failed");
|
||||
}
|
||||
}
|
||||
return (obj_type);
|
||||
}
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: CommonFG default constructor
|
||||
///\brief Default constructor.
|
||||
@@ -1180,6 +1189,7 @@ CommonFG::CommonFG() {}
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
CommonFG::~CommonFG() {}
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
}
|
||||
|
||||
@@ -14,12 +14,8 @@
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
// CommonFG is a protocol class. Its existence is simply to provide the
|
||||
// common services that are provided by H5File and Group. The file or
|
||||
// group in the context of this class is referred to as 'location'.
|
||||
|
||||
#ifndef _CommonFG_H
|
||||
#define _CommonFG_H
|
||||
#ifndef __CommonFG_H
|
||||
#define __CommonFG_H
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
@@ -29,6 +25,12 @@ class Group;
|
||||
class H5File;
|
||||
class ArrayType;
|
||||
class VarLenType;
|
||||
|
||||
/*! \class CommonFG
|
||||
\brief \a CommonFG is an abstract base class of H5File and H5Group.
|
||||
|
||||
It provides common operations of H5File and H5Group.
|
||||
*/
|
||||
class H5_DLLCPP CommonFG {
|
||||
public:
|
||||
// Creates a new group at this location which can be a file
|
||||
@@ -49,18 +51,6 @@ class H5_DLLCPP CommonFG {
|
||||
DataSet openDataSet(const char* name) const;
|
||||
DataSet openDataSet(const H5std_string& name) const;
|
||||
|
||||
// Retrieves comment for the HDF5 object specified by its name.
|
||||
H5std_string getComment(const char* name, size_t bufsize=256) const;
|
||||
H5std_string getComment(const H5std_string& name, size_t bufsize=256) const;
|
||||
|
||||
// Removes the comment for the HDF5 object specified by its name.
|
||||
void removeComment(const char* name) const;
|
||||
void removeComment(const H5std_string& name) const;
|
||||
|
||||
// Sets the comment for an HDF5 object specified by its name.
|
||||
void setComment(const char* name, const char* comment) const;
|
||||
void setComment(const H5std_string& name, const H5std_string& comment) const;
|
||||
|
||||
// Returns the value of a symbolic link.
|
||||
H5std_string getLinkval(const char* link_name, size_t size=0) const;
|
||||
H5std_string getLinkval(const H5std_string& link_name, size_t size=0) const;
|
||||
@@ -74,6 +64,12 @@ class H5_DLLCPP CommonFG {
|
||||
ssize_t getObjnameByIdx(hsize_t idx, char* name, size_t size) const;
|
||||
ssize_t getObjnameByIdx(hsize_t idx, H5std_string& name, size_t size) const;
|
||||
|
||||
// Retrieves the type of an object in this file or group, given the
|
||||
// object's name
|
||||
H5O_type_t childObjType(const H5std_string& objname) const;
|
||||
H5O_type_t childObjType(const char* objname) const;
|
||||
H5O_type_t childObjType(hsize_t index, H5_index_t index_type=H5_INDEX_NAME, H5_iter_order_t order=H5_ITER_INC, const char* objname=".") const;
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
// Returns the type of an object in this group, given the
|
||||
// object's index.
|
||||
@@ -104,8 +100,10 @@ class H5_DLLCPP CommonFG {
|
||||
void unlink(const H5std_string& name) const;
|
||||
|
||||
// Mounts the file 'child' onto this location.
|
||||
void mount(const char* name, H5File& child, PropList& plist) const;
|
||||
void mount(const H5std_string& name, H5File& child, PropList& plist) const;
|
||||
void mount(const char* name, const H5File& child, const PropList& plist) const;
|
||||
void mount(const char* name, H5File& child, PropList& plist) const; // backward compatibility
|
||||
void mount(const H5std_string& name, const H5File& child, const PropList& plist) const;
|
||||
void mount(const H5std_string& name, H5File& child, PropList& plist) const; // backward compatibility
|
||||
|
||||
// Unmounts the file named 'name' from this parent location.
|
||||
void unmount(const char* name) const;
|
||||
@@ -152,7 +150,6 @@ class H5_DLLCPP CommonFG {
|
||||
/// object id, i.e. file or group id.
|
||||
virtual hid_t getLocId() const = 0;
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
/// For subclasses, H5File and Group, to throw appropriate exception.
|
||||
virtual void throwException(const H5std_string& func_name, const H5std_string& msg) const = 0;
|
||||
@@ -162,11 +159,12 @@ class H5_DLLCPP CommonFG {
|
||||
|
||||
// Noop destructor.
|
||||
virtual ~CommonFG();
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
}; // end of CommonFG declaration
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif // __CommonFG_H
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ H5std_string CompType::getMemberName( unsigned member_num ) const
|
||||
"H5Tget_member_name returns NULL for member name");
|
||||
}
|
||||
H5std_string member_name = H5std_string(member_name_C); // convert C string to string
|
||||
HDfree(member_name_C); // free the C string
|
||||
H5free_memory(member_name_C); // free the C string
|
||||
return( member_name ); // return the member name string
|
||||
}
|
||||
|
||||
@@ -450,6 +450,25 @@ void CompType::pack() const
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: CompType::setSize
|
||||
///\brief Sets the total size for this compound datatype.
|
||||
///\param size - IN: Size to set
|
||||
///\exception H5::DataTypeIException
|
||||
// Note
|
||||
// H5Tset_size works on atom datatypes and compound datatypes only
|
||||
// Programmer Binh-Minh Ribler - 2014
|
||||
//--------------------------------------------------------------------------
|
||||
void CompType::setSize(size_t size) const
|
||||
{
|
||||
// Call C routine H5Tset_size to set the total size
|
||||
herr_t ret_value = H5Tset_size(id, size);
|
||||
if (ret_value < 0)
|
||||
{
|
||||
throw DataTypeIException("CompType::setSize", "H5Tset_size failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: CompType destructor
|
||||
///\brief Properly terminates access to this compound datatype.
|
||||
|
||||
@@ -14,24 +14,34 @@
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
// Class CompType inherits from DataType and provides accesses to a compound
|
||||
// datatype.
|
||||
|
||||
#ifndef _H5CompType_H
|
||||
#define _H5CompType_H
|
||||
#ifndef __H5CompType_H
|
||||
#define __H5CompType_H
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
#endif
|
||||
|
||||
/*! \class CompType
|
||||
\brief CompType is a derivative of a DataType and operates on HDF5
|
||||
compound datatypes.
|
||||
*/
|
||||
class H5_DLLCPP CompType : public DataType {
|
||||
public:
|
||||
// Default constructor
|
||||
CompType();
|
||||
|
||||
// Creates a compound datatype using an existing id
|
||||
CompType( const hid_t existing_id );
|
||||
|
||||
// Creates a new compound datatype, given the type's size
|
||||
CompType( size_t size ); // H5Tcreate
|
||||
|
||||
// Gets the compound datatype of the specified dataset
|
||||
CompType( const DataSet& dataset ); // H5Dget_type
|
||||
|
||||
// Copy constructor - makes a copy of original object
|
||||
CompType( const CompType& original );
|
||||
|
||||
// Returns the type class of the specified member of this compound
|
||||
// datatype. It provides to the user a way of knowing what type
|
||||
// to create another datatype of the same class
|
||||
@@ -88,18 +98,12 @@ class H5_DLLCPP CompType : public DataType {
|
||||
// Recursively removes padding from within this compound datatype.
|
||||
void pack() const;
|
||||
|
||||
// Returns this class name
|
||||
// Sets the total size for this compound datatype.
|
||||
void setSize(size_t size) const;
|
||||
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass () const { return("CompType"); }
|
||||
|
||||
// Default constructor
|
||||
CompType();
|
||||
|
||||
// Creates a compound datatype using an existing id
|
||||
CompType( const hid_t existing_id );
|
||||
|
||||
// Copy constructor - makes a copy of original object
|
||||
CompType( const CompType& original );
|
||||
|
||||
// Noop destructor.
|
||||
virtual ~CompType();
|
||||
|
||||
@@ -111,4 +115,4 @@ class H5_DLLCPP CompType : public DataType {
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif // __H5CompType_H
|
||||
|
||||
@@ -14,14 +14,15 @@
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#ifndef _H5CPP_H
|
||||
#define _H5CPP_H
|
||||
#ifndef __H5Cpp_H
|
||||
#define __H5Cpp_H
|
||||
|
||||
#include "H5Include.h"
|
||||
#include "H5Exception.h"
|
||||
#include "H5IdComponent.h"
|
||||
#include "H5DataSpace.h"
|
||||
#include "H5PropList.h"
|
||||
#include "H5Location.h"
|
||||
#include "H5Object.h"
|
||||
#include "H5AbstractDs.h"
|
||||
#include "H5Attribute.h"
|
||||
@@ -55,4 +56,4 @@
|
||||
#define HOFFSET(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif // __H5Cpp_H
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#ifndef _H5CPPDOC_H
|
||||
#define _H5CPPDOC_H
|
||||
#ifndef __H5CppDoc_H
|
||||
#define __H5CppDoc_H
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// The following section will be used to generate the 'Mainpage'
|
||||
@@ -23,39 +23,48 @@
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
/*! \mainpage notitle
|
||||
*
|
||||
* <br />
|
||||
* \section intro_sec Introduction
|
||||
*
|
||||
* The C++ API provides C++ wrappers for the HDF5 C library.
|
||||
* It is assumed that the user has knowledge of the HDF5 file format
|
||||
* and its components. If you are not familiar with HDF5 file format,
|
||||
* and would like to find out more, please refer to the HDF5 documentation
|
||||
* at http://hdf.ncsa.uiuc.edu/HDF5/doc/H5.intro.html
|
||||
* The C++ API provides C++ wrappers for the HDF5 C Library.
|
||||
*
|
||||
* It is assumed that the user has knowledge of the
|
||||
* <a href="http://www.hdfgroup.org/HDF5/doc/H5.format.html">
|
||||
* HDF5 file format</a> and its components.
|
||||
* For more information on the HDF5 C Library, see the
|
||||
* <a href="http://www.hdfgroup.org/HDF5/doc/index.html">
|
||||
* HDF5 Software Documentation</a> page.
|
||||
*
|
||||
* Because the HDF5 library maps very well to
|
||||
* Because the HDF5 C Library maps very well to
|
||||
* the object oriented design approach, classes in the C++ API can
|
||||
* closely represent the interfaces of the HDF5 APIs, as followed:
|
||||
* closely represent the interfaces of the C APIs as follows:
|
||||
*
|
||||
* \verbatim
|
||||
HDF5 C APIs C++ Classes
|
||||
----------- -----------
|
||||
Attribute Interface (H5A) Attribute
|
||||
Datasets Interface (H5D) DataSet
|
||||
Error Interface (H5E) Exception
|
||||
File Interface (H5F) H5File
|
||||
Group Interface (H5G) Group
|
||||
Identifier Interface (H5I) IdComponent
|
||||
Property List Interface (H5P) PropList and subclasses
|
||||
Dataspace Interface (H5S) DataSpace
|
||||
Datatype Interface (H5T) DataType and subclasses
|
||||
HDF5 C APIs C++ Classes
|
||||
----------- -----------
|
||||
Attribute Interface (H5A) Attribute
|
||||
Datasets Interface (H5D) DataSet
|
||||
Error Interface (H5E) Exception
|
||||
File Interface (H5F) H5File
|
||||
Group Interface (H5G) Group
|
||||
Identifier Interface (H5I) IdComponent
|
||||
Property List Interface (H5P) PropList and subclasses
|
||||
Dataspace Interface (H5S) DataSpace
|
||||
Datatype Interface (H5T) DataType and subclasses
|
||||
\endverbatim
|
||||
* <br />
|
||||
* \section install_sec Installation
|
||||
*
|
||||
* Please refer to the file release_docs/INSTALL_Windows.txt
|
||||
* under the top directory for information about installing, building,
|
||||
* The HDF5 C++ API is included with the HDF5 source code and can
|
||||
* be obtained from
|
||||
* <a href="http://www.hdfgroup.org/HDF5/release/obtainsrc.html">
|
||||
* http://www.hdfgroup.org/HDF5/release/obtainsrc.html</a>.
|
||||
*
|
||||
* Please refer to the release_docs/INSTALL file under the top directory
|
||||
* of the HDF5 source code for information about installing, building,
|
||||
* and testing the C++ API.
|
||||
*
|
||||
*
|
||||
* <br />
|
||||
*/
|
||||
|
||||
/// This example shows how to create datasets.
|
||||
@@ -88,4 +97,4 @@
|
||||
/// This example shows how to work with groups.
|
||||
///\example h5group.cpp
|
||||
|
||||
#endif
|
||||
#endif // __H5CppDoc_H
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace H5 {
|
||||
///\brief Default constructor: creates a stub DataSet.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
DataSet::DataSet() : AbstractDs(), H5Object(), id(0) {}
|
||||
DataSet::DataSet() : AbstractDs(), H5Object(), id(H5I_INVALID_HID) {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet overloaded constructor
|
||||
@@ -79,75 +79,44 @@ DataSet::DataSet(const DataSet& original) : AbstractDs(original), H5Object(origi
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet overload constructor - dereference
|
||||
///\brief Given a reference, ref, to an hdf5 dataset, creates a
|
||||
///\brief Given a reference, ref, to an hdf5 location, creates a
|
||||
/// DataSet object
|
||||
///\param obj - IN: Dataset reference object is in or location of
|
||||
///\param loc - IN: Dataset reference object is in or location of
|
||||
/// object that the dataset is located within.
|
||||
///\param ref - IN: Reference pointer
|
||||
///\param ref_type - IN: Reference type - default to H5R_OBJECT
|
||||
///\param plist - IN: Property list - default to PropList::DEFAULT
|
||||
///\exception H5::DataSetIException
|
||||
///\par Description
|
||||
/// \c obj can be DataSet, Group, H5File, or named DataType, that
|
||||
/// \c loc can be DataSet, Group, H5File, or named DataType, that
|
||||
/// is a datatype that has been named by DataType::commit.
|
||||
// Programmer Binh-Minh Ribler - Oct, 2006
|
||||
// Modification
|
||||
// Jul, 2008
|
||||
// Added for application convenience.
|
||||
//--------------------------------------------------------------------------
|
||||
DataSet::DataSet(H5Object& obj, const void* ref, H5R_type_t ref_type) : AbstractDs(), H5Object()
|
||||
DataSet::DataSet(const H5Location& loc, const void* ref, H5R_type_t ref_type, const PropList& plist) : AbstractDs(), H5Object(), id(H5I_INVALID_HID)
|
||||
{
|
||||
try {
|
||||
id = p_dereference(obj.getId(), ref, ref_type);
|
||||
} catch (ReferenceException deref_error) {
|
||||
throw ReferenceException("DataSet constructor - located by object",
|
||||
deref_error.getDetailMsg());
|
||||
}
|
||||
id = H5Location::p_dereference(loc.getId(), ref, ref_type, plist, "constructor - by dereferenced");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet overload constructor - dereference
|
||||
///\brief Given a reference, ref, to an hdf5 dataset, creates a
|
||||
/// DataSet object
|
||||
///\param h5file - IN: Location referenced object is in
|
||||
///\param ref - IN: Reference pointer
|
||||
///\param ref_type - IN: Reference type - default to H5R_OBJECT
|
||||
///\exception H5::DataSetIException
|
||||
// Programmer Binh-Minh Ribler - Oct, 2006
|
||||
// Modification
|
||||
// Jul, 2008
|
||||
// Added for application convenience.
|
||||
//--------------------------------------------------------------------------
|
||||
DataSet::DataSet(H5File& h5file, const void* ref, H5R_type_t ref_type) : AbstractDs(), H5Object()
|
||||
{
|
||||
try {
|
||||
id = p_dereference(h5file.getId(), ref, ref_type);
|
||||
} catch (ReferenceException deref_error) {
|
||||
throw ReferenceException("DataSet constructor - located by HDF5 file",
|
||||
deref_error.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet overload constructor - dereference
|
||||
///\brief Given a reference, ref, to an hdf5 dataset, creates a
|
||||
///\brief Given a reference, ref, to an hdf5 attribute, creates a
|
||||
/// DataSet object
|
||||
///\param attr - IN: Specifying location where the referenced object is in
|
||||
///\param ref - IN: Reference pointer
|
||||
///\param ref_type - IN: Reference type - default to H5R_OBJECT
|
||||
///\param plist - IN: Property list - default to PropList::DEFAULT
|
||||
///\exception H5::ReferenceException
|
||||
// Programmer Binh-Minh Ribler - Oct, 2006
|
||||
// Modification
|
||||
// Jul, 2008
|
||||
// Added for application convenience.
|
||||
//--------------------------------------------------------------------------
|
||||
DataSet::DataSet(Attribute& attr, const void* ref, H5R_type_t ref_type) : AbstractDs(), H5Object()
|
||||
DataSet::DataSet(const Attribute& attr, const void* ref, H5R_type_t ref_type, const PropList& plist) : AbstractDs(), H5Object(), id(H5I_INVALID_HID)
|
||||
{
|
||||
try {
|
||||
id = p_dereference(attr.getId(), ref, ref_type);
|
||||
} catch (ReferenceException deref_error) {
|
||||
throw ReferenceException("DataSet constructor - located by attribute",
|
||||
deref_error.getDetailMsg());
|
||||
}
|
||||
id = H5Location::p_dereference(attr.getId(), ref, ref_type, plist, "constructor - by dereference");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -238,7 +207,8 @@ size_t DataSet::getInMemDataSize() const
|
||||
throw DataSetIException(func, "H5Dget_type failed");
|
||||
}
|
||||
|
||||
// Get the data type's size
|
||||
// Get the data type's size by first getting its native type then getting
|
||||
// the native type's size.
|
||||
hid_t native_type = H5Tget_native_type(mem_type_id, H5T_DIR_DEFAULT);
|
||||
if (native_type < 0)
|
||||
{
|
||||
@@ -250,8 +220,19 @@ size_t DataSet::getInMemDataSize() const
|
||||
throw DataSetIException(func, "H5Tget_size failed");
|
||||
}
|
||||
|
||||
// Get number of elements of the dataset
|
||||
hid_t space_id = H5Dget_space(id); // first get its data space
|
||||
// Close the native type and the datatype of this dataset.
|
||||
if (H5Tclose(native_type) < 0)
|
||||
{
|
||||
throw DataSetIException(func, "H5Tclose(native_type) failed");
|
||||
}
|
||||
if (H5Tclose(mem_type_id) < 0)
|
||||
{
|
||||
throw DataSetIException(func, "H5Tclose(mem_type_id) failed");
|
||||
}
|
||||
|
||||
// Get number of elements of the dataset by first getting its dataspace,
|
||||
// then getting the number of elements in the dataspace
|
||||
hid_t space_id = H5Dget_space(id);
|
||||
if (space_id < 0)
|
||||
{
|
||||
throw DataSetIException(func, "H5Dget_space failed");
|
||||
@@ -262,6 +243,12 @@ size_t DataSet::getInMemDataSize() const
|
||||
throw DataSetIException(func, "H5Sget_simple_extent_npoints failed");
|
||||
}
|
||||
|
||||
// Close the dataspace
|
||||
if (H5Sclose(space_id) < 0)
|
||||
{
|
||||
throw DataSetIException(func, "H5Sclose failed");
|
||||
}
|
||||
|
||||
// Calculate and return the size of the data
|
||||
size_t data_size = type_size * num_elements;
|
||||
return(data_size);
|
||||
@@ -309,7 +296,7 @@ void DataSet::getSpaceStatus(H5D_space_status_t& status) const
|
||||
///\exception H5::DataSetIException
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
hsize_t DataSet::getVlenBufSize( DataType& type, DataSpace& space ) const
|
||||
hsize_t DataSet::getVlenBufSize(const DataType& type, const DataSpace& space ) const
|
||||
{
|
||||
// Obtain identifiers for C API
|
||||
hid_t type_id = type.getId();
|
||||
@@ -325,6 +312,20 @@ hsize_t DataSet::getVlenBufSize( DataType& type, DataSpace& space ) const
|
||||
return( size );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet::getVlenBufSize
|
||||
///\brief This is an overloaded member function, kept for backward
|
||||
/// compatibility. It differs from the above function in that it
|
||||
/// misses const's. This wrapper will be removed in future release.
|
||||
///\return Amount of storage
|
||||
///\exception H5::DataSetIException
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
hsize_t DataSet::getVlenBufSize( DataType& type, DataSpace& space ) const
|
||||
{
|
||||
return(getVlenBufSize((const DataType)type, (const DataSpace)space));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet::vlenReclaim
|
||||
///\brief Reclaims VL datatype memory buffers.
|
||||
@@ -411,8 +412,8 @@ void DataSet::read( void* buf, const DataType& mem_type, const DataSpace& mem_sp
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet::read
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It takes a reference to a \c std::string for the buffer.
|
||||
///\param buf - IN: Buffer for read data
|
||||
/// It takes a reference to a \c H5std_string for the buffer.
|
||||
///\param strg - IN: Buffer for read data string
|
||||
///\param mem_type - IN: Memory datatype
|
||||
///\param mem_space - IN: Memory dataspace
|
||||
///\param file_space - IN: Dataset's dataspace in the file
|
||||
@@ -487,7 +488,7 @@ void DataSet::write( const void* buf, const DataType& mem_type, const DataSpace&
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet::write
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It takes a reference to a \c std::string for the buffer.
|
||||
/// It takes a reference to a \c H5std_string for the buffer.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
// Modification
|
||||
// Jul 2009
|
||||
@@ -571,7 +572,7 @@ int DataSet::iterateElems( void* buf, const DataType& type, const DataSpace& spa
|
||||
/// For more information, please see the Description section in
|
||||
/// C layer Reference Manual at:
|
||||
///\par
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5D.html#Dataset-Extend
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5D.html#Dataset-Extend
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void DataSet::extend( const hsize_t* size ) const
|
||||
@@ -590,9 +591,11 @@ void DataSet::extend( const hsize_t* size ) const
|
||||
///\param buf_type - IN: Datatype of the elements in buffer
|
||||
///\param space - IN: Dataspace describing memory buffer & containing selection to use
|
||||
///\exception H5::DataSetIException
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
// Programmer Binh-Minh Ribler - 2014
|
||||
// Modification
|
||||
// Used the non-const version.
|
||||
//--------------------------------------------------------------------------
|
||||
void DataSet::fillMemBuf(const void *fill, DataType& fill_type, void *buf, DataType& buf_type, DataSpace& space)
|
||||
void DataSet::fillMemBuf(const void *fill, const DataType& fill_type, void *buf, const DataType& buf_type, const DataSpace& space) const
|
||||
{
|
||||
hid_t fill_type_id = fill_type.getId();
|
||||
hid_t buf_type_id = buf_type.getId();
|
||||
@@ -606,16 +609,32 @@ void DataSet::fillMemBuf(const void *fill, DataType& fill_type, void *buf, DataT
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet::fillMemBuf
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it only takes the
|
||||
/// the last three arguments.
|
||||
///\brief This is an overloaded member function, kept for backward
|
||||
/// compatibility. It differs from the above function in that it
|
||||
/// misses const's. This wrapper will be removed in future release.
|
||||
///\param fill - IN: Pointer to fill value to use - default NULL
|
||||
///\param fill_type - IN: Datatype of the fill value
|
||||
///\param buf - IN/OUT: Memory buffer to fill selection within
|
||||
///\param buf_type - IN: Datatype of the elements in buffer
|
||||
///\param space - IN: Dataspace describing memory buffer & containing selection to use
|
||||
///\exception H5::DataSetIException
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void DataSet::fillMemBuf(void *buf, DataType& buf_type, DataSpace& space)
|
||||
void DataSet::fillMemBuf(const void *fill, DataType& fill_type, void *buf, DataType& buf_type, DataSpace& space)
|
||||
{
|
||||
fillMemBuf(fill, (const DataType)fill_type, buf, (const DataType)buf_type, (const DataSpace)space);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet::fillMemBuf
|
||||
///\brief Fills a selection in memory with 0.
|
||||
///\param buf - IN/OUT: Memory buffer to fill selection within
|
||||
///\param buf_type - IN: Datatype of the elements in buffer
|
||||
///\param space - IN: Dataspace describing memory buffer & containing selection to use
|
||||
///\exception H5::DataSetIException
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void DataSet::fillMemBuf(void *buf, const DataType& buf_type, const DataSpace& space) const
|
||||
{
|
||||
hid_t buf_type_id = buf_type.getId();
|
||||
hid_t space_id = space.getId();
|
||||
@@ -626,57 +645,26 @@ void DataSet::fillMemBuf(void *buf, DataType& buf_type, DataSpace& space)
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet::getObjType
|
||||
///\brief Retrieves the type of object that an object reference points to.
|
||||
///\param ref_type - IN: Type of reference to query, valid values are:
|
||||
/// \li \c H5R_OBJECT \tReference is an object reference.
|
||||
/// \li \c H5R_DATASET_REGION \tReference is a dataset region reference.
|
||||
///\param ref - IN: Reference to query
|
||||
///\return An object type, which can be one of the following:
|
||||
/// \li \c H5G_LINK (0) \tObject is a symbolic link.
|
||||
/// \li \c H5G_GROUP (1) \tObject is a group.
|
||||
/// \li \c H5G_DATASET (2) \tObject is a dataset.
|
||||
/// \li \c H5G_TYPE Object (3) \tis a named datatype
|
||||
///\exception H5::DataSetIException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
// Function: DataSet::fillMemBuf
|
||||
///\brief This is an overloaded member function, kept for backward
|
||||
/// compatibility. It differs from the above function in that it
|
||||
/// misses const's. This wrapper will be removed in future release.
|
||||
///\param buf - IN/OUT: Memory buffer to fill selection within
|
||||
///\param buf_type - IN: Datatype of the elements in buffer
|
||||
///\param space - IN: Dataspace describing memory buffer & containing selection to use
|
||||
///\exception H5::DataSetIException
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
H5G_obj_t DataSet::getObjType(void *ref, H5R_type_t ref_type) const
|
||||
void DataSet::fillMemBuf(void *buf, DataType& buf_type, DataSpace& space)
|
||||
{
|
||||
try {
|
||||
return(p_get_obj_type(ref, ref_type));
|
||||
}
|
||||
catch (IdComponentException E) {
|
||||
throw DataSetIException("DataSet::getObjType", E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet::getRegion
|
||||
///\brief Retrieves a dataspace with the region pointed to selected.
|
||||
///\param ref_type - IN: Type of reference to get region of - default
|
||||
/// to H5R_DATASET_REGION
|
||||
///\param ref - IN: Reference to get region of
|
||||
///\return DataSpace instance
|
||||
///\exception H5::DataSetIException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
DataSpace DataSet::getRegion(void *ref, H5R_type_t ref_type) const
|
||||
{
|
||||
try {
|
||||
DataSpace dataspace(p_get_region(ref, ref_type));
|
||||
return(dataspace);
|
||||
}
|
||||
catch (IdComponentException E) {
|
||||
throw DataSetIException("DataSet::getRegion", E.getDetailMsg());
|
||||
}
|
||||
fillMemBuf(buf, (const DataType)buf_type, (const DataSpace)space);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet::getId
|
||||
// Purpose: Get the id of this attribute
|
||||
///\brief Get the id of this dataset.
|
||||
///\return DataSet identifier
|
||||
// Description:
|
||||
// Class hierarchy is revised to address bugzilla 1068. Class
|
||||
// AbstractDs and Attribute are moved out of H5Object. In
|
||||
@@ -691,7 +679,7 @@ hid_t DataSet::getId() const
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet::p_read_fixed_len (private)
|
||||
// brief Reads a fixed length \a H5std_string from an dataset.
|
||||
// brief Reads a fixed length \a H5std_string from a dataset.
|
||||
// param mem_type - IN: DataSet datatype (in memory)
|
||||
// param strg - IN: Buffer for read string
|
||||
// exception H5::DataSetIException
|
||||
@@ -705,14 +693,14 @@ void DataSet::p_read_fixed_len(const hid_t mem_type_id, const hid_t mem_space_id
|
||||
// Only allocate for fixed-len string.
|
||||
|
||||
// Get the size of the dataset's data
|
||||
size_t attr_size = getInMemDataSize();
|
||||
size_t data_size = getInMemDataSize();
|
||||
|
||||
// If there is data, allocate buffer and read it.
|
||||
if (attr_size > 0)
|
||||
if (data_size > 0)
|
||||
{
|
||||
char *strg_C = NULL;
|
||||
char *strg_C = new char [data_size+1];
|
||||
HDmemset(strg_C, 0, data_size+1); // clear buffer
|
||||
|
||||
strg_C = new char [(size_t)attr_size+1];
|
||||
herr_t ret_value = H5Dread(id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, strg_C);
|
||||
|
||||
if( ret_value < 0 )
|
||||
@@ -756,9 +744,10 @@ void DataSet::p_read_variable_len(const hid_t mem_type_id, const hid_t mem_space
|
||||
HDfree(strg_C);
|
||||
}
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet::p_setId (private)
|
||||
///\brief Sets the identifier of this object to a new value.
|
||||
// Function: DataSet::p_setId (protected)
|
||||
///\brief Sets the identifier of this dataset to a new value.
|
||||
///
|
||||
///\exception H5::IdComponentException when the attempt to close the HDF5
|
||||
/// object fails
|
||||
@@ -779,10 +768,8 @@ void DataSet::p_setId(const hid_t new_id)
|
||||
}
|
||||
// reset object's id to the given id
|
||||
id = new_id;
|
||||
|
||||
// increment the reference counter of the new id
|
||||
//incRefCount();
|
||||
}
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet::close
|
||||
@@ -801,7 +788,7 @@ void DataSet::close()
|
||||
throw DataSetIException("DataSet::close", "H5Dclose failed");
|
||||
}
|
||||
// reset the id
|
||||
id = 0;
|
||||
id = H5I_INVALID_HID;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,15 +14,20 @@
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
// Class DataSet inherits from AbstractDs and provides accesses to a dataset.
|
||||
|
||||
#ifndef _H5DataSet_H
|
||||
#define _H5DataSet_H
|
||||
#ifndef __H5DataSet_H
|
||||
#define __H5DataSet_H
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
#endif
|
||||
|
||||
/*! \class DataSet
|
||||
\brief Class DataSet operates on HDF5 datasets.
|
||||
|
||||
An datasets has many characteristics similar to an attribute, thus both
|
||||
Attribute and DataSet are derivatives of AbstractDs. DataSet also
|
||||
inherits from H5Object because a dataset is an HDF5 object.
|
||||
*/
|
||||
class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
|
||||
public:
|
||||
// Close this dataset.
|
||||
@@ -32,9 +37,12 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
|
||||
void extend( const hsize_t* size ) const;
|
||||
|
||||
// Fills a selection in memory with a value
|
||||
void fillMemBuf(const void *fill, DataType& fill_type, void *buf, DataType& buf_type, DataSpace& space);
|
||||
void fillMemBuf(const void *fill, const DataType& fill_type, void *buf, const DataType& buf_type, const DataSpace& space) const;
|
||||
void fillMemBuf(const void *fill, DataType& fill_type, void *buf, DataType& buf_type, DataSpace& space); // kept for backward compatibility
|
||||
|
||||
// Fills a selection in memory with zero
|
||||
void fillMemBuf(void *buf, DataType& buf_type, DataSpace& space);
|
||||
void fillMemBuf(void *buf, const DataType& buf_type, const DataSpace& space) const;
|
||||
void fillMemBuf(void *buf, DataType& buf_type, DataSpace& space); // kept for backward compatibility
|
||||
|
||||
// Gets the creation property list of this dataset.
|
||||
DSetCreatPropList getCreatePlist() const;
|
||||
@@ -55,7 +63,8 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
|
||||
virtual size_t getInMemDataSize() const;
|
||||
|
||||
// Returns the number of bytes required to store VL data.
|
||||
hsize_t getVlenBufSize( DataType& type, DataSpace& space ) const;
|
||||
hsize_t getVlenBufSize(const DataType& type, const DataSpace& space ) const;
|
||||
hsize_t getVlenBufSize(DataType& type, DataSpace& space) const; // kept for backward compatibility
|
||||
|
||||
// Reclaims VL datatype memory buffers.
|
||||
static void vlenReclaim(const DataType& type, const DataSpace& space, const DSetMemXferPropList& xfer_plist, void* buf );
|
||||
@@ -76,21 +85,12 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
|
||||
// Iterates the selected elements in the specified dataspace - not implemented in C++ style yet
|
||||
int iterateElems( void* buf, const DataType& type, const DataSpace& space, H5D_operator_t op, void* op_data = NULL );
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
// Retrieves the type of object that an object reference points to.
|
||||
H5G_obj_t getObjType(void *ref, H5R_type_t ref_type = H5R_OBJECT) const;
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
// Retrieves a dataspace with the region pointed to selected.
|
||||
DataSpace getRegion(void *ref, H5R_type_t ref_type = H5R_DATASET_REGION) const;
|
||||
|
||||
// Returns this class name
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass () const { return("DataSet"); }
|
||||
|
||||
// Creates a dataset by way of dereference.
|
||||
DataSet(H5Object& obj, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
|
||||
DataSet(H5File& h5file, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
|
||||
DataSet(Attribute& attr, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
|
||||
DataSet(const H5Location& loc, const void* ref, H5R_type_t ref_type = H5R_OBJECT, const PropList& plist = PropList::DEFAULT);
|
||||
DataSet(const Attribute& attr, const void* ref, H5R_type_t ref_type = H5R_OBJECT, const PropList& plist = PropList::DEFAULT);
|
||||
|
||||
// Default constructor.
|
||||
DataSet();
|
||||
@@ -107,6 +107,12 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
|
||||
// Destructor: properly terminates access to this dataset.
|
||||
virtual ~DataSet();
|
||||
|
||||
protected:
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
// Sets the dataset id.
|
||||
virtual void p_setId(const hid_t new_id);
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
private:
|
||||
hid_t id; // HDF5 dataset id
|
||||
|
||||
@@ -119,12 +125,8 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
|
||||
// Reads variable or fixed len strings from this dataset.
|
||||
void p_read_fixed_len(const hid_t mem_type_id, const hid_t mem_space_id, const hid_t file_space_id, const hid_t xfer_plist_id, H5std_string& strg) const;
|
||||
void p_read_variable_len(const hid_t mem_type_id, const hid_t mem_space_id, const hid_t file_space_id, const hid_t xfer_plist_id, H5std_string& strg) const;
|
||||
|
||||
protected:
|
||||
// Sets the dataset id.
|
||||
virtual void p_setId(const hid_t new_id);
|
||||
};
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif // __H5DataSet_H
|
||||
|
||||
@@ -279,7 +279,7 @@ H5S_class_t DataSpace::getSimpleExtentType () const
|
||||
///\exception H5::DataSpaceIException
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void DataSpace::extentCopy ( DataSpace& dest_space ) const
|
||||
void DataSpace::extentCopy (const DataSpace& dest_space) const
|
||||
{
|
||||
hid_t dest_space_id = dest_space.getId();
|
||||
herr_t ret_value = H5Sextent_copy( dest_space_id, id );
|
||||
@@ -289,6 +289,20 @@ void DataSpace::extentCopy ( DataSpace& dest_space ) const
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSpace::extentCopy
|
||||
///\brief This is an overloaded member function, kept for backward
|
||||
/// compatibility. It differs from the above function in that it
|
||||
/// misses const. This wrapper will be removed in future release.
|
||||
///\param dest_space - IN: Dataspace to copy from
|
||||
///\exception H5::DataSpaceIException
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void DataSpace::extentCopy( DataSpace& dest_space ) const
|
||||
{
|
||||
extentCopy((const DataSpace)dest_space);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSpace::setExtentSimple
|
||||
///\brief Sets or resets the size of an existing dataspace.
|
||||
@@ -408,7 +422,7 @@ hssize_t DataSpace::getSelectElemNpoints () const
|
||||
///\par Description
|
||||
/// For more information, please refer to the C layer Reference
|
||||
/// Manual at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5S.html#Dataspace-SelectElemPointList
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-SelectElemPointList
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void DataSpace::getSelectElemPointlist ( hsize_t startpoint, hsize_t numpoints, hsize_t *buf ) const
|
||||
@@ -432,7 +446,7 @@ void DataSpace::getSelectElemPointlist ( hsize_t startpoint, hsize_t numpoints,
|
||||
///\par Description
|
||||
/// For more information, please refer to the C layer Reference
|
||||
/// Manual at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5S.html#Dataspace-SelectBounds
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-SelectBounds
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void DataSpace::getSelectBounds ( hsize_t* start, hsize_t* end ) const
|
||||
@@ -446,7 +460,7 @@ void DataSpace::getSelectBounds ( hsize_t* start, hsize_t* end ) const
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSpace::H5Sselect_elements
|
||||
// Function: DataSpace::selectElements
|
||||
///\brief Selects array elements to be included in the selection for
|
||||
/// this dataspace.
|
||||
///\param op - IN: Operator specifying how the new selection is to be
|
||||
@@ -458,7 +472,7 @@ void DataSpace::getSelectBounds ( hsize_t* start, hsize_t* end ) const
|
||||
///\par Description
|
||||
/// For more information, please refer to the C layer Reference
|
||||
/// Manual at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5S.html#Dataspace-SelectElements
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-SelectElements
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void DataSpace::selectElements ( H5S_seloper_t op, const size_t num_elements, const hsize_t *coord) const
|
||||
@@ -540,7 +554,7 @@ bool DataSpace::selectValid () const
|
||||
///\par Description
|
||||
/// For more information, please refer to the C layer Reference
|
||||
/// Manual at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5S.html#Dataspace-SelectHyperslab
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-SelectHyperslab
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void DataSpace::selectHyperslab( H5S_seloper_t op, const hsize_t *count, const hsize_t *start, const hsize_t *stride, const hsize_t *block ) const
|
||||
@@ -556,7 +570,8 @@ void DataSpace::selectHyperslab( H5S_seloper_t op, const hsize_t *count, const h
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSpace::getId
|
||||
// Purpose: Get the id of this attribute
|
||||
///\brief Get the id of this dataspace
|
||||
///\return Dataspace identifier
|
||||
// Modification:
|
||||
// May 2008 - BMR
|
||||
// Class hierarchy is revised to address bugzilla 1068. Class
|
||||
@@ -570,6 +585,7 @@ hid_t DataSpace::getId() const
|
||||
return(id);
|
||||
}
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSpace::p_setId
|
||||
///\brief Sets the identifier of this object to a new value.
|
||||
@@ -594,6 +610,7 @@ void DataSpace::p_setId(const hid_t new_id)
|
||||
// reset object's id to the given id
|
||||
id = new_id;
|
||||
}
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSpace::close
|
||||
@@ -613,7 +630,7 @@ void DataSpace::close()
|
||||
throw DataSpaceIException("DataSpace::close", "H5Sclose failed");
|
||||
}
|
||||
// reset the id
|
||||
id = 0;
|
||||
id = H5I_INVALID_HID;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,13 +14,14 @@
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#ifndef _H5DataSpace_H
|
||||
#define _H5DataSpace_H
|
||||
#ifndef __H5DataSpace_H
|
||||
#define __H5DataSpace_H
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
#endif
|
||||
|
||||
//! Class DataSpace operates on HDF5 dataspaces.
|
||||
class H5_DLLCPP DataSpace : public IdComponent {
|
||||
public:
|
||||
// Default DataSpace objects
|
||||
@@ -32,6 +33,12 @@ class H5_DLLCPP DataSpace : public IdComponent {
|
||||
// Creates a simple dataspace
|
||||
DataSpace(int rank, const hsize_t * dims, const hsize_t * maxdims = NULL);
|
||||
|
||||
// Creates a DataSpace object using an existing dataspace id.
|
||||
DataSpace(const hid_t space_id);
|
||||
|
||||
// Copy constructor: makes a copy of the original DataSpace object.
|
||||
DataSpace(const DataSpace& original);
|
||||
|
||||
// Assignment operator
|
||||
DataSpace& operator=( const DataSpace& rhs );
|
||||
|
||||
@@ -42,7 +49,9 @@ class H5_DLLCPP DataSpace : public IdComponent {
|
||||
void copy(const DataSpace& like_space);
|
||||
|
||||
// Copies the extent of this dataspace.
|
||||
void extentCopy( DataSpace& dest_space ) const;
|
||||
void extentCopy(const DataSpace& dest_space) const;
|
||||
// Kept for backward compatibility only.
|
||||
void extentCopy(DataSpace& dest_space) const;
|
||||
|
||||
// Gets the bounding box containing the current selection.
|
||||
void getSelectBounds( hsize_t* start, hsize_t* end ) const;
|
||||
@@ -103,29 +112,25 @@ class H5_DLLCPP DataSpace : public IdComponent {
|
||||
// Sets or resets the size of this dataspace.
|
||||
void setExtentSimple( int rank, const hsize_t *current_size, const hsize_t *maximum_size = NULL ) const;
|
||||
|
||||
// Returns this class name
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass () const { return("DataSpace"); }
|
||||
|
||||
// Creates a DataSpace object using an existing dataspace id.
|
||||
DataSpace(const hid_t space_id);
|
||||
|
||||
// Copy constructor: makes a copy of the original DataSpace object.
|
||||
DataSpace(const DataSpace& original);
|
||||
|
||||
// Gets the dataspace id.
|
||||
virtual hid_t getId() const;
|
||||
|
||||
// Destructor: properly terminates access to this dataspace.
|
||||
virtual ~DataSpace();
|
||||
|
||||
private:
|
||||
hid_t id; // HDF5 dataspace id
|
||||
|
||||
protected:
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
// Sets the dataspace id.
|
||||
virtual void p_setId(const hid_t new_id);
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
private:
|
||||
hid_t id; // HDF5 dataspace id
|
||||
};
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif // __H5DataSpace_H
|
||||
|
||||
@@ -48,20 +48,25 @@ namespace H5 {
|
||||
#endif // H5_NO_STD
|
||||
#endif
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataType default constructor
|
||||
///\brief Default constructor: Creates a stub datatype
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
DataType::DataType() : H5Object(), id(H5I_INVALID_HID) {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataType overloaded constructor
|
||||
///\brief Creates a datatype using an existing datatype's id
|
||||
///\param existing_id - IN: Id of the existing datatype
|
||||
///\param predefined - IN: Indicates whether or not this datatype is
|
||||
/// a predefined datatype; default to \c false
|
||||
// Description
|
||||
// Constructor creates a copy of an existing DataType using
|
||||
// its id. The argument "predefined" is default to false;
|
||||
// when a default datatype is created, this argument is set
|
||||
// to true so H5Tclose will not be called on it later. - need
|
||||
// a reassessment after changing to the new ref counting mech.
|
||||
// - BMR 5/2004
|
||||
// its id.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
// Modification
|
||||
// Dec, 2005
|
||||
// Removed second argument, "predefined", after changing to the
|
||||
// new ref counting mechanism that relies on C's ref counting.
|
||||
//--------------------------------------------------------------------------
|
||||
DataType::DataType(const hid_t existing_id) : H5Object()
|
||||
{
|
||||
@@ -90,49 +95,19 @@ DataType::DataType( const H5T_class_t type_class, size_t size ) : H5Object()
|
||||
// Function: DataType overload constructor - dereference
|
||||
///\brief Given a reference, ref, to an hdf5 group, creates a
|
||||
/// DataType object
|
||||
///\param obj - IN: Specifying location referenced object is in
|
||||
///\param ref - IN: Reference pointer
|
||||
///\param ref_type - IN: Reference type - default to H5R_OBJECT
|
||||
///\exception H5::ReferenceException
|
||||
///\par Description
|
||||
/// \c obj can be DataSet, Group, or named DataType, that
|
||||
/// is a datatype that has been named by DataType::commit.
|
||||
// Programmer Binh-Minh Ribler - Oct, 2006
|
||||
// Modification
|
||||
// Jul, 2008
|
||||
// Added for application convenience.
|
||||
//--------------------------------------------------------------------------
|
||||
DataType::DataType(H5Object& obj, const void* ref, H5R_type_t ref_type) : H5Object()
|
||||
{
|
||||
try {
|
||||
id = p_dereference(obj.getId(), ref, ref_type);
|
||||
} catch (ReferenceException deref_error) {
|
||||
throw ReferenceException("DataType constructor - located by an H5Object",
|
||||
deref_error.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataType overload constructor - dereference
|
||||
///\brief Given a reference, ref, to an hdf5 group, creates a
|
||||
/// DataType object
|
||||
///\param h5file - IN: Location referenced object is in
|
||||
///\param loc - IN: Location referenced object is in
|
||||
///\param ref - IN: Reference pointer
|
||||
///\param ref_type - IN: Reference type - default to H5R_OBJECT
|
||||
///\param plist - IN: Property list - default to PropList::DEFAULT
|
||||
///\exception H5::ReferenceException
|
||||
// Programmer Binh-Minh Ribler - Oct, 2006
|
||||
// Modification
|
||||
// Jul, 2008
|
||||
// Added for application convenience.
|
||||
//--------------------------------------------------------------------------
|
||||
DataType::DataType(H5File& h5file, const void* ref, H5R_type_t ref_type) : H5Object()
|
||||
DataType::DataType(const H5Location& loc, const void* ref, H5R_type_t ref_type, const PropList& plist) : H5Object(), id(H5I_INVALID_HID)
|
||||
{
|
||||
try {
|
||||
id = p_dereference(h5file.getId(), ref, ref_type);
|
||||
} catch (ReferenceException deref_error) {
|
||||
throw ReferenceException("DataType constructor - located by an H5File",
|
||||
deref_error.getDetailMsg());
|
||||
}
|
||||
id = H5Location::p_dereference(loc.getId(), ref, ref_type, plist, "constructor - by dereference");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -142,29 +117,18 @@ DataType::DataType(H5File& h5file, const void* ref, H5R_type_t ref_type) : H5Obj
|
||||
///\param attr - IN: Specifying location where the referenced object is in
|
||||
///\param ref - IN: Reference pointer
|
||||
///\param ref_type - IN: Reference type - default to H5R_OBJECT
|
||||
///\param plist - IN: Property list - default to PropList::DEFAULT
|
||||
///\exception H5::ReferenceException
|
||||
// Programmer Binh-Minh Ribler - Oct, 2006
|
||||
// Modification
|
||||
// Jul, 2008
|
||||
// Added for application convenience.
|
||||
//--------------------------------------------------------------------------
|
||||
DataType::DataType(Attribute& attr, const void* ref, H5R_type_t ref_type) : H5Object()
|
||||
DataType::DataType(const Attribute& attr, const void* ref, H5R_type_t ref_type, const PropList& plist) : H5Object(), id(H5I_INVALID_HID)
|
||||
{
|
||||
try {
|
||||
id = p_dereference(attr.getId(), ref, ref_type);
|
||||
} catch (ReferenceException deref_error) {
|
||||
throw ReferenceException("DataType constructor - located by an Attribute",
|
||||
deref_error.getDetailMsg());
|
||||
}
|
||||
id = H5Location::p_dereference(attr.getId(), ref, ref_type, plist, "constructor - by dereference");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataType default constructor
|
||||
///\brief Default constructor: Creates a stub datatype
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
DataType::DataType() : H5Object(), id(0) {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataType copy constructor
|
||||
///\brief Copy constructor: makes a copy of the original DataType object.
|
||||
@@ -210,7 +174,7 @@ void DataType::copy( const DataType& like_type )
|
||||
///\param dset - IN: Dataset
|
||||
///\exception H5::DataTypeIException
|
||||
// Programmer Binh-Minh Ribler - Jan, 2007
|
||||
///\parDescription
|
||||
///\par Description
|
||||
/// The resulted dataset will be transient and modifiable.
|
||||
//--------------------------------------------------------------------------
|
||||
void DataType::copy(const DataSet& dset)
|
||||
@@ -297,38 +261,27 @@ void DataType::p_commit(hid_t loc_id, const char* name)
|
||||
// Function: DataType::commit
|
||||
///\brief Commits a transient datatype to a file, creating a new
|
||||
/// named datatype
|
||||
///\param loc - IN: A file
|
||||
///\param name - IN: Name of the datatype
|
||||
///\exception H5::DataTypeIException
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void DataType::commit(H5File& loc, const char* name)
|
||||
{
|
||||
p_commit(loc.getLocId(), name);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataType::commit
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function only in the type of the
|
||||
/// argument \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void DataType::commit(H5File& loc, const H5std_string& name)
|
||||
{
|
||||
p_commit(loc.getLocId(), name.c_str());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataType::commit
|
||||
///\brief Commits a transient datatype to a file, creating a new
|
||||
/// named datatype
|
||||
///\param loc - IN: Either a group, dataset, named datatype, or attribute.
|
||||
///\param loc - IN: A location (file, dataset, datatype, or group)
|
||||
///\param name - IN: Name of the datatype
|
||||
///\exception H5::DataTypeIException
|
||||
// Programmer Binh-Minh Ribler - Jan, 2007
|
||||
//--------------------------------------------------------------------------
|
||||
void DataType::commit(H5Object& loc, const char* name)
|
||||
void DataType::commit(const H5Location& loc, const char* name)
|
||||
{
|
||||
p_commit(loc.getId(), name);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataType::commit
|
||||
///\brief This is an overloaded member function, kept for backward
|
||||
/// compatibility. It differs from the above function in that it
|
||||
/// misses const's. This wrapper will be removed in future release.
|
||||
///\param loc - IN: A location (file, dataset, datatype, or group)
|
||||
///\param name - IN: Name of the datatype
|
||||
///\exception H5::DataTypeIException
|
||||
// Programmer Binh-Minh Ribler - Jan, 2007
|
||||
//--------------------------------------------------------------------------
|
||||
void DataType::commit(H5Location& loc, const char* name)
|
||||
{
|
||||
p_commit(loc.getId(), name);
|
||||
}
|
||||
@@ -340,7 +293,22 @@ void DataType::commit(H5Object& loc, const char* name)
|
||||
/// argument \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void DataType::commit(H5Object& loc, const H5std_string& name)
|
||||
void DataType::commit(const H5Location& loc, const H5std_string& name)
|
||||
{
|
||||
p_commit(loc.getId(), name.c_str());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataType::commit
|
||||
///\brief This is an overloaded member function, kept for backward
|
||||
/// compatibility. It differs from the above function in that it
|
||||
/// misses const's. This wrapper will be removed in future release.
|
||||
///\param loc - IN: A location (file, dataset, datatype, or group)
|
||||
///\param name - IN: Name of the datatype
|
||||
///\exception H5::DataTypeIException
|
||||
// Programmer Binh-Minh Ribler - Jan, 2007
|
||||
//--------------------------------------------------------------------------
|
||||
void DataType::commit(H5Location& loc, const H5std_string& name)
|
||||
{
|
||||
p_commit(loc.getId(), name.c_str());
|
||||
}
|
||||
@@ -397,7 +365,7 @@ H5T_conv_t DataType::find( const DataType& dest, H5T_cdata_t **pcdata ) const
|
||||
///\param buf - IN/OUT: Array containing pre- and post-conversion
|
||||
/// values
|
||||
///\param background - IN: Optional backgroud buffer
|
||||
///\param plist - IN: Dataset transfer property list
|
||||
///\param plist - IN: Property list - default to PropList::DEFAULT
|
||||
///\return Pointer to a suitable conversion function
|
||||
///\exception H5::DataTypeIException
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
@@ -517,7 +485,7 @@ DataType DataType::getSuper() const
|
||||
///\exception H5::DataTypeIException
|
||||
///\par Description
|
||||
/// For more information, please see:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5T.html#Datatype-Register
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5T.html#Datatype-Register
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void DataType::registerFunc( H5T_pers_t pers, const char* name, const DataType& dest, H5T_conv_t func ) const
|
||||
@@ -627,7 +595,7 @@ H5std_string DataType::getTag() const
|
||||
if( tag_Cstr != NULL )
|
||||
{
|
||||
H5std_string tag = H5std_string(tag_Cstr); // C string to string object
|
||||
HDfree(tag_Cstr); // free the C string
|
||||
H5free_memory(tag_Cstr); // free the C string
|
||||
return (tag); // return the tag
|
||||
}
|
||||
else
|
||||
@@ -681,54 +649,10 @@ bool DataType::isVariableStr() const
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataType::getObjType
|
||||
///\brief Retrieves the type of object that an object reference points to.
|
||||
///\param ref - IN: Reference to query
|
||||
///\param ref_type - IN: Type of reference to query
|
||||
///\return Object type, which can be one of the following:
|
||||
/// \li \c H5G_LINK Object is a symbolic link.
|
||||
/// \li \c H5G_GROUP Object is a group.
|
||||
/// \li \c H5G_DATASET Object is a dataset.
|
||||
/// \li \c H5G_TYPE Object is a named datatype
|
||||
///\exception H5::DataTypeIException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
H5G_obj_t DataType::getObjType(void *ref, H5R_type_t ref_type) const
|
||||
{
|
||||
try {
|
||||
return(p_get_obj_type(ref, ref_type));
|
||||
}
|
||||
catch (IdComponentException E) {
|
||||
throw DataTypeIException(inMemFunc("getObjType"), E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataType::getRegion
|
||||
///\brief Retrieves a dataspace with the region pointed to selected.
|
||||
///\param ref - IN: Reference to get region of
|
||||
///\param ref_type - IN: Type of reference to get region of - default
|
||||
///\return DataSpace instance
|
||||
///\exception H5::DataTypeIException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
DataSpace DataType::getRegion(void *ref, H5R_type_t ref_type) const
|
||||
{
|
||||
try {
|
||||
DataSpace dataspace(p_get_region(ref, ref_type));
|
||||
return(dataspace);
|
||||
}
|
||||
catch (IdComponentException E) {
|
||||
throw DataTypeIException(inMemFunc("getRegion"), E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataType::getId
|
||||
// Purpose: Get the id of this attribute
|
||||
///\brief Get the id of this datatype
|
||||
///\return Datatype identifier
|
||||
// Modification:
|
||||
// May 2008 - BMR
|
||||
// Class hierarchy is revised to address bugzilla 1068. Class
|
||||
@@ -742,6 +666,7 @@ hid_t DataType::getId() const
|
||||
return(id);
|
||||
}
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataType::p_setId
|
||||
///\brief Sets the identifier of this object to a new value.
|
||||
@@ -766,6 +691,7 @@ void DataType::p_setId(const hid_t new_id)
|
||||
// reset object's id to the given id
|
||||
id = new_id;
|
||||
}
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataType::close
|
||||
@@ -784,7 +710,7 @@ void DataType::close()
|
||||
throw DataTypeIException(inMemFunc("close"), "H5Tclose failed");
|
||||
}
|
||||
// reset the id
|
||||
id = 0;
|
||||
id = H5I_INVALID_HID;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -794,17 +720,33 @@ void DataType::close()
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
// Modification
|
||||
// - Replaced resetIdComponent() with decRefCount() to use C
|
||||
// library ID reference counting mechanism - BMR, Jun 1, 2004
|
||||
// library ID reference counting mechanism - BMR, Jun 1, 2004
|
||||
// - Replaced decRefCount with close() to let the C library
|
||||
// handle the reference counting - BMR, Jun 1, 2006
|
||||
// handle the reference counting - BMR, Jun 1, 2006
|
||||
// - Added the use of H5CPP_EXITED to terminate the HDF5 library
|
||||
// and elimiate previous memory leaks. See comments in the
|
||||
// header file "H5PredType.h" for details. - BMR, Mar 30, 2012
|
||||
//--------------------------------------------------------------------------
|
||||
DataType::~DataType()
|
||||
{
|
||||
try {
|
||||
close();
|
||||
} catch (Exception close_error) {
|
||||
cerr << inMemFunc("~DataType - ") << close_error.getDetailMsg() << endl;
|
||||
try
|
||||
{
|
||||
/* If this is the object AtExit, terminate the HDF5 library. This is
|
||||
to eliminate memory leaks due to the library being re-initiated
|
||||
(after the program has ended) and not re-terminated. */
|
||||
if (id == H5CPP_EXITED)
|
||||
{
|
||||
herr_t ret_value = H5close();
|
||||
if (ret_value == FAIL)
|
||||
throw DataTypeIException(inMemFunc("~DataType - "), "H5close failed");
|
||||
}
|
||||
// Close the HDF5 datatype
|
||||
else
|
||||
close();
|
||||
}
|
||||
catch (Exception close_error) {
|
||||
cerr << inMemFunc("~DataType - ") << close_error.getDetailMsg() << endl;
|
||||
}
|
||||
}
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
} // end namespace
|
||||
|
||||
@@ -14,13 +14,20 @@
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#ifndef _H5DataType_H
|
||||
#define _H5DataType_H
|
||||
#ifndef __H5DataType_H
|
||||
#define __H5DataType_H
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
#endif
|
||||
|
||||
/*! \class DataType
|
||||
\brief Class DataType provides generic operations on HDF5 datatypes.
|
||||
|
||||
DataType inherits from H5Object because a named datatype is an HDF5
|
||||
object and is a base class of ArrayType, AtomType, CompType, EnumType,
|
||||
and VarLenType.
|
||||
*/
|
||||
class H5_DLLCPP DataType : public H5Object {
|
||||
public:
|
||||
// Creates a datatype given its class and size
|
||||
@@ -30,9 +37,8 @@ class H5_DLLCPP DataType : public H5Object {
|
||||
DataType( const DataType& original );
|
||||
|
||||
// Creates a datatype by way of dereference.
|
||||
DataType(H5Object& obj, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
|
||||
DataType(H5File& h5file, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
|
||||
DataType(Attribute& attr, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
|
||||
DataType(const H5Location& loc, const void* ref, H5R_type_t ref_type = H5R_OBJECT, const PropList& plist = PropList::DEFAULT);
|
||||
DataType(const Attribute& attr, const void* ref, H5R_type_t ref_type = H5R_OBJECT, const PropList& plist = PropList::DEFAULT);
|
||||
|
||||
// Closes this datatype.
|
||||
virtual void close();
|
||||
@@ -48,10 +54,12 @@ class H5_DLLCPP DataType : public H5Object {
|
||||
|
||||
// Commits a transient datatype to a file; this datatype becomes
|
||||
// a named datatype which can be accessed from the location.
|
||||
void commit( H5File& loc, const char* name);
|
||||
void commit( H5File& loc, const H5std_string& name);
|
||||
void commit( H5Object& loc, const char* name);
|
||||
void commit( H5Object& loc, const H5std_string& name);
|
||||
void commit(const H5Location& loc, const char* name);
|
||||
void commit(const H5Location& loc, const H5std_string& name);
|
||||
// These two overloaded functions are kept for backward compatibility
|
||||
// only; they missed the const.
|
||||
void commit(H5Location& loc, const char* name);
|
||||
void commit(H5Location& loc, const H5std_string& name);
|
||||
|
||||
// Determines whether this datatype is a named datatype or
|
||||
// a transient datatype.
|
||||
@@ -101,15 +109,7 @@ class H5_DLLCPP DataType : public H5Object {
|
||||
// Checks whether this datatype is a variable-length string.
|
||||
bool isVariableStr() const;
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
// Retrieves the type of object that an object reference points to.
|
||||
H5G_obj_t getObjType(void *ref, H5R_type_t ref_type = H5R_OBJECT) const;
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
// Retrieves a dataspace with the region pointed to selected.
|
||||
DataSpace getRegion(void *ref, H5R_type_t ref_type = H5R_DATASET_REGION) const;
|
||||
|
||||
// Returns this class name
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass () const { return("DataType"); }
|
||||
|
||||
// Creates a copy of an existing DataType using its id
|
||||
@@ -125,10 +125,12 @@ class H5_DLLCPP DataType : public H5Object {
|
||||
virtual ~DataType();
|
||||
|
||||
protected:
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
hid_t id; // HDF5 datatype id
|
||||
|
||||
// Sets the datatype id.
|
||||
virtual void p_setId(const hid_t new_id);
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
private:
|
||||
void p_commit(hid_t loc_id, const char* name);
|
||||
@@ -136,4 +138,4 @@ class H5_DLLCPP DataType : public H5Object {
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif // __H5DataType_H
|
||||
|
||||
@@ -106,8 +106,8 @@ int DSetCreatPropList::getChunk( int max_ndims, hsize_t* dim ) const
|
||||
///\param layout - IN: Type of storage layout for raw data
|
||||
///\exception H5::PropListIException
|
||||
///\par Description
|
||||
/// For information on setting layout type, please refer to
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetLayout
|
||||
/// For information on valid layout types, please refer to
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetLayout
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void DSetCreatPropList::setLayout(H5D_layout_t layout) const
|
||||
@@ -211,7 +211,7 @@ void DSetCreatPropList::setSzip(unsigned int options_mask, unsigned int pixels_p
|
||||
///\par
|
||||
/// For information on setting fill value, please refer to the
|
||||
/// C layer Reference Manual at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetFillValue
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetFillValue
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void DSetCreatPropList::setFillValue( const DataType& fvalue_type, const void* value ) const
|
||||
@@ -349,13 +349,16 @@ int DSetCreatPropList::getNfilters() const
|
||||
///\param cd_nelmts - IN/OUT: Number of elements in \a cd_values /Number
|
||||
/// of values defined by the filter
|
||||
///\param cd_values - OUT: Array to hold the data; allocated by the user
|
||||
///\param namelen - OUT: Length of \a name
|
||||
///\param namelen - IN: Length of \a name
|
||||
///\param name - OUT: Name of the filter
|
||||
///\param filter_config - OUT: Flags indicating whether filter can encode/decode
|
||||
///\return Filter id
|
||||
///\exception H5::PropListIException
|
||||
///\par Description
|
||||
/// Failure occurs when \a filter_number is out of range.
|
||||
// Note: the first argument was mistakenly typed as int instead
|
||||
// of unsigned int, but for backward compatibility, it cannot be
|
||||
// changed. -BMR (2014/04/15)
|
||||
//--------------------------------------------------------------------------
|
||||
H5Z_filter_t DSetCreatPropList::getFilter(int filter_number,
|
||||
unsigned int &flags, size_t &cd_nelmts, unsigned int* cd_values,
|
||||
@@ -459,7 +462,7 @@ bool DSetCreatPropList::allFiltersAvail()
|
||||
///\par Description
|
||||
/// Please refer to the Reference Manual of \c H5Pset_shuffle for
|
||||
/// details.
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetShuffle
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetShuffle
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void DSetCreatPropList::setShuffle() const
|
||||
@@ -635,8 +638,8 @@ int DSetCreatPropList::getExternalCount() const
|
||||
///\param idx - IN: Index of the external file, ranges [0-(N-1)] and
|
||||
/// returned by getExternalCount()
|
||||
///\param name_size - IN: Maximum length of \a name
|
||||
///\param name - IN: Name of the external file
|
||||
///\param offset - IN: Location to return an offset value
|
||||
///\param name - OUT: Name of the external file
|
||||
///\param offset - OUT: Location to return an offset value
|
||||
///\param size - OUT: Location to return the size of the external file data
|
||||
///\exception H5::PropListIException
|
||||
///\par Description
|
||||
|
||||
@@ -14,13 +14,17 @@
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#ifndef _H5DSCreatPropList_H
|
||||
#define _H5DSCreatPropList_H
|
||||
#ifndef __H5DSCreatPropList_H
|
||||
#define __H5DSCreatPropList_H
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
#endif
|
||||
|
||||
/*! \class DSetCreatPropList
|
||||
\brief Class DSetCreatPropList represents the dataset creation property
|
||||
list.
|
||||
*/
|
||||
class H5_DLLCPP DSetCreatPropList : public PropList {
|
||||
public:
|
||||
// Default dataset creation property list.
|
||||
@@ -107,7 +111,7 @@ class H5_DLLCPP DSetCreatPropList : public PropList {
|
||||
// Sets SZIP compression method.
|
||||
void setSzip(unsigned int options_mask, unsigned int pixels_per_block) const;
|
||||
|
||||
// Returns this class name
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass () const { return("DSetCreatPropList"); }
|
||||
|
||||
// Copy constructor: creates a copy of a DSetCreatPropList object.
|
||||
@@ -123,4 +127,4 @@ class H5_DLLCPP DSetCreatPropList : public PropList {
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif // __H5DSCreatPropList_H
|
||||
|
||||
@@ -20,6 +20,17 @@
|
||||
#include "H5IdComponent.h"
|
||||
#include "H5PropList.h"
|
||||
#include "H5DxferProp.h"
|
||||
#include "H5private.h" // for HDmemset
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
#ifndef H5_NO_STD
|
||||
using std::cerr;
|
||||
using std::endl;
|
||||
#endif // H5_NO_STD
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
@@ -38,6 +49,17 @@ const DSetMemXferPropList DSetMemXferPropList::DEFAULT;
|
||||
//--------------------------------------------------------------------------
|
||||
DSetMemXferPropList::DSetMemXferPropList() : PropList(H5P_DATASET_XFER) {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function DSetMemXferPropList constructor
|
||||
///\brief Creates a dataset transfer property list with transform
|
||||
/// expression.
|
||||
// Programmer: Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
DSetMemXferPropList::DSetMemXferPropList(const char* exp) : PropList(H5P_DATASET_XFER)
|
||||
{
|
||||
setDataTransform(exp);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function DSetMemXferPropList copy constructor
|
||||
///\brief Copy constructor: makes a copy of the original
|
||||
@@ -175,7 +197,110 @@ void DSetMemXferPropList::getBtreeRatios( double& left, double& middle, double&
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DSetMemXferPropList::setTypeConvCB
|
||||
// Function: DSetMemXferPropList::setDataTransform
|
||||
///\brief Sets data transform expression.
|
||||
///\param expression - IN: null-terminated data transform expression (char*)
|
||||
///\exception H5::PropListIException
|
||||
// Programmer: Binh-Minh Ribler - Mar, 2014
|
||||
//--------------------------------------------------------------------------
|
||||
void DSetMemXferPropList::setDataTransform(const char* expression) const
|
||||
{
|
||||
herr_t ret_value = H5Pset_data_transform( id, expression);
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw PropListIException("DSetMemXferPropList::setDataTransform",
|
||||
"H5Pset_data_transform failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DSetMemXferPropList::setDataTransform
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It takes a reference to a \c H5std_string for the expression.
|
||||
///\param expression - IN: H5std_string data transform expression
|
||||
///\exception H5::PropListIException
|
||||
// Programmer: Binh-Minh Ribler - Mar, 2014
|
||||
//--------------------------------------------------------------------------
|
||||
void DSetMemXferPropList::setDataTransform(const H5std_string& expression) const
|
||||
{
|
||||
setDataTransform(expression.c_str());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DSetMemXferPropList::getDataTransform
|
||||
///\brief Sets data transform expression.
|
||||
///\param exp - OUT: buffer for data transform expression (char*)
|
||||
///\param buf_size - IN: size of buffer for expression, including the
|
||||
/// null terminator
|
||||
///\exception H5::PropListIException
|
||||
// Programmer: Binh-Minh Ribler - Mar, 2014
|
||||
//--------------------------------------------------------------------------
|
||||
ssize_t DSetMemXferPropList::getDataTransform(char* exp, size_t buf_size) const
|
||||
{
|
||||
// H5Pget_data_transform will get buf_size characters of the expression
|
||||
// including the null terminator
|
||||
ssize_t exp_len;
|
||||
exp_len = H5Pget_data_transform(id, exp, buf_size);
|
||||
|
||||
// H5Pget_data_transform returns a negative value, raise an exception
|
||||
if (exp_len < 0)
|
||||
{
|
||||
throw PropListIException("DSetMemXferPropList::getDataTransform",
|
||||
"H5Pget_data_transform failed");
|
||||
}
|
||||
|
||||
// H5Pget_data_transform will put a null terminator at the end of the
|
||||
// expression or at [buf_size-1] if the expression is at least the size
|
||||
// of the buffer.
|
||||
|
||||
// Return the expression length, which might be different from buf_size
|
||||
return(exp_len);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DSetMemXferPropList::getDataTransform
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It takes no parameter and returns a \c H5std_string for the expression.
|
||||
///\exception H5::PropListIException
|
||||
// Programmer: Binh-Minh Ribler - Mar, 2014
|
||||
//--------------------------------------------------------------------------
|
||||
H5std_string DSetMemXferPropList::getDataTransform() const
|
||||
{
|
||||
// Initialize string to "", so that if there is no expression, the returned
|
||||
// string will be empty
|
||||
H5std_string expression("");
|
||||
|
||||
// Preliminary call to get the expression's length
|
||||
ssize_t exp_len = H5Pget_data_transform(id, NULL, (size_t)0);
|
||||
|
||||
// If H5Pget_data_transform returns a negative value, raise an exception
|
||||
if (exp_len < 0)
|
||||
{
|
||||
throw PropListIException("DSetMemXferPropList::getDataTransform", "H5Pget_data_transform failed");
|
||||
}
|
||||
|
||||
// If expression exists, calls C routine again to get it
|
||||
else if (exp_len > 0)
|
||||
{
|
||||
// Temporary buffer for char* expression
|
||||
char* exp_C = new char[exp_len+1];
|
||||
HDmemset(exp_C, 0, exp_len+1); // clear buffer
|
||||
|
||||
// Used overloaded function
|
||||
exp_len = getDataTransform(exp_C, exp_len+1);
|
||||
|
||||
// Convert the C expression to return
|
||||
expression = exp_C;
|
||||
|
||||
// Clean up resource
|
||||
delete []exp_C;
|
||||
}
|
||||
// Return the string expression
|
||||
return(expression);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DSetMemXferPropList::getTypeConvCB
|
||||
///\brief Sets an exception handling callback for datatype conversion
|
||||
/// for a dataset transfer property list.
|
||||
///\param op - IN: User's function
|
||||
@@ -265,43 +390,6 @@ void DSetMemXferPropList::getVlenMemManager( H5MM_allocate_t& alloc_func, void**
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DSetMemXferPropList::setMulti
|
||||
///\brief Sets the data transfer property list for the multi-file driver.
|
||||
///\param memb_dxpl - OUT: Array of data access property lists
|
||||
///\exception H5::PropListIException
|
||||
///\par Description
|
||||
/// This function can only be used after the member map has
|
||||
/// been set with FileAccPropList::setMulti (not done - BMR.)
|
||||
// Programmer: Binh-Minh Ribler - April, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void DSetMemXferPropList::setMulti(const hid_t *memb_dxpl)
|
||||
{
|
||||
herr_t ret_value = H5Pset_dxpl_multi(id, memb_dxpl);
|
||||
if (ret_value < 0)
|
||||
{
|
||||
throw PropListIException("DSetMemXferPropList::setMulti",
|
||||
"H5Pset_dxpl_multi failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DSetMemXferPropList::getMulti
|
||||
///\brief Returns multi-file data transfer property list information.
|
||||
///\param memb_dxpl - OUT: Array of data access property lists
|
||||
///\exception H5::PropListIException
|
||||
// Programmer: Binh-Minh Ribler - April, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void DSetMemXferPropList::getMulti(hid_t *memb_dxpl)
|
||||
{
|
||||
herr_t ret_value = H5Pget_dxpl_multi(id, memb_dxpl);
|
||||
if (ret_value < 0)
|
||||
{
|
||||
throw PropListIException("DSetMemXferPropList::getMulti",
|
||||
"H5Pget_dxpl_multi failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DSetMemXferPropList::setSmallDataBlockSize
|
||||
///\brief Sets the size of a contiguous block reserved for small data.
|
||||
@@ -309,7 +397,7 @@ void DSetMemXferPropList::getMulti(hid_t *memb_dxpl)
|
||||
///\exception H5::PropListIException
|
||||
///\par Description
|
||||
/// For detail, please refer to the C layer Reference Manual at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetSmallData
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetSmallData
|
||||
// Programmer: Binh-Minh Ribler - April, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void DSetMemXferPropList::setSmallDataBlockSize(hsize_t size)
|
||||
@@ -349,7 +437,7 @@ hsize_t DSetMemXferPropList::getSmallDataBlockSize()
|
||||
///\par Description
|
||||
/// For information, please refer to the C layer Reference
|
||||
/// Manual at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetHyperVectorSize
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetHyperVectorSize
|
||||
// Programmer: Binh-Minh Ribler - April, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void DSetMemXferPropList::setHyperVectorSize(size_t vector_size)
|
||||
|
||||
@@ -14,13 +14,17 @@
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#ifndef _H5DSetMemXferPropList_H
|
||||
#define _H5DSetMemXferPropList_H
|
||||
#ifndef __H5DSetMemXferPropList_H
|
||||
#define __H5DSetMemXferPropList_H
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
#endif
|
||||
|
||||
/*! \class DSetMemXferPropList
|
||||
\brief Class DSetMemXferPropList represents the dataset memory and
|
||||
transfer property list.
|
||||
*/
|
||||
class H5_DLLCPP DSetMemXferPropList : public PropList {
|
||||
public:
|
||||
static const DSetMemXferPropList DEFAULT;
|
||||
@@ -28,6 +32,9 @@ class H5_DLLCPP DSetMemXferPropList : public PropList {
|
||||
// Creates a dataset memory and transfer property list.
|
||||
DSetMemXferPropList();
|
||||
|
||||
// Creates a dataset transform property list.
|
||||
DSetMemXferPropList(const char* expression);
|
||||
|
||||
// Sets type conversion and background buffers.
|
||||
void setBuffer( size_t size, void* tconv, void* bkg ) const;
|
||||
|
||||
@@ -40,6 +47,14 @@ class H5_DLLCPP DSetMemXferPropList : public PropList {
|
||||
// Gets B-tree split ratios for a dataset transfer property list.
|
||||
void getBtreeRatios( double& left, double& middle, double& right ) const;
|
||||
|
||||
// Sets data transform expression.
|
||||
void setDataTransform(const char* expression) const;
|
||||
void setDataTransform(const H5std_string& expression) const;
|
||||
|
||||
// Gets data transform expression.
|
||||
ssize_t getDataTransform(char* exp, size_t buf_size=0) const;
|
||||
H5std_string getDataTransform() const;
|
||||
|
||||
// Sets the dataset transfer property list status to TRUE or FALSE.
|
||||
void setPreserve( bool status ) const;
|
||||
|
||||
@@ -66,12 +81,6 @@ class H5_DLLCPP DSetMemXferPropList : public PropList {
|
||||
void getVlenMemManager( H5MM_allocate_t& alloc, void** alloc_info,
|
||||
H5MM_free_t& free, void** free_info ) const;
|
||||
|
||||
// Sets the data transfer property list for the multi-file driver.
|
||||
void setMulti(const hid_t *memb_dxpl);
|
||||
|
||||
// Returns multi-file data transfer property list information.
|
||||
void getMulti(hid_t *memb_dxpl);
|
||||
|
||||
// Sets the size of a contiguous block reserved for small data.
|
||||
void setSmallDataBlockSize(hsize_t size);
|
||||
|
||||
@@ -92,7 +101,7 @@ class H5_DLLCPP DSetMemXferPropList : public PropList {
|
||||
// Determines whether error-detection is enabled for dataset reads.
|
||||
H5Z_EDC_t getEDCCheck();
|
||||
|
||||
// Returns this class name.
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass () const { return("DSetMemXferPropList"); }
|
||||
|
||||
// Copy constructor: makes a copy of a DSetMemXferPropList object.
|
||||
@@ -108,4 +117,5 @@ class H5_DLLCPP DSetMemXferPropList : public PropList {
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif // __H5DSetMemXferPropList_H
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "H5AtomType.h"
|
||||
#include "H5IntType.h"
|
||||
#include "H5EnumType.h"
|
||||
#include "H5private.h" // for HDmemset
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
@@ -150,6 +151,7 @@ void EnumType::insert( const H5std_string& name, void *value ) const
|
||||
H5std_string EnumType::nameOf( void *value, size_t size ) const
|
||||
{
|
||||
char* name_C = new char[size+1]; // temporary C-string for C API
|
||||
HDmemset(name_C, 0, size+1); // clear buffer
|
||||
|
||||
// Calls C routine H5Tenum_nameof to get the name of the specified enum type
|
||||
herr_t ret_value = H5Tenum_nameof( id, value, name_C, size );
|
||||
@@ -157,10 +159,11 @@ H5std_string EnumType::nameOf( void *value, size_t size ) const
|
||||
// If H5Tenum_nameof returns a negative value, raise an exception,
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
delete []name_C;
|
||||
throw DataTypeIException("EnumType::nameOf", "H5Tenum_nameof failed");
|
||||
}
|
||||
// otherwise, create the string to hold the datatype name and return it
|
||||
H5std_string name = H5std_string(name_C);
|
||||
H5std_string name(name_C);
|
||||
delete []name_C;
|
||||
return( name );
|
||||
}
|
||||
|
||||
@@ -14,13 +14,14 @@
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#ifndef _H5EnumType_H
|
||||
#define _H5EnumType_H
|
||||
#ifndef __H5EnumType_H
|
||||
#define __H5EnumType_H
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
#endif
|
||||
|
||||
//! Class EnumType operates on HDF5 enum datatypes.
|
||||
class H5_DLLCPP EnumType : public DataType {
|
||||
|
||||
public:
|
||||
@@ -57,7 +58,7 @@ class H5_DLLCPP EnumType : public DataType {
|
||||
void valueOf( const char* name, void *value ) const;
|
||||
void valueOf( const H5std_string& name, void *value ) const;
|
||||
|
||||
// Returns this class name
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass () const { return("EnumType"); }
|
||||
|
||||
// Default constructor
|
||||
@@ -74,4 +75,4 @@ class H5_DLLCPP EnumType : public DataType {
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif // __H5EnumType_H
|
||||
|
||||
@@ -80,8 +80,11 @@ H5std_string Exception::getMajorString( hid_t err_major ) const
|
||||
|
||||
// Check for failure again
|
||||
if( mesg_size < 0 )
|
||||
{
|
||||
delete []mesg_C;
|
||||
throw IdComponentException("Exception::getMajorString",
|
||||
"H5Eget_msg failed");
|
||||
}
|
||||
|
||||
// Convert the C error description and return
|
||||
H5std_string major_str(mesg_C);
|
||||
@@ -116,8 +119,11 @@ H5std_string Exception::getMinorString( hid_t err_minor ) const
|
||||
|
||||
// Check for failure again
|
||||
if( mesg_size < 0 )
|
||||
{
|
||||
delete []mesg_C;
|
||||
throw IdComponentException("Exception::getMinorString",
|
||||
"H5Eget_msg failed");
|
||||
}
|
||||
|
||||
// Convert the C error description and return
|
||||
H5std_string minor_str(mesg_C);
|
||||
@@ -295,16 +301,33 @@ const char* Exception::getCFuncName() const
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Exception::printError
|
||||
// Function: Exception::printErrorStack (static)
|
||||
///\brief Prints the error stack in a default manner.
|
||||
///\param stream - IN: File pointer
|
||||
///\param stream - IN: File pointer, default to stderr
|
||||
///\param err_stack - IN: Error stack ID, default to H5E_DEFAULT(0)
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void Exception::printError( FILE* stream ) const
|
||||
void Exception::printErrorStack(FILE* stream, hid_t err_stack)
|
||||
{
|
||||
herr_t ret_value = H5Eprint2( H5E_DEFAULT, stream ); // print to stderr
|
||||
herr_t ret_value = H5Eprint2(err_stack, stream);
|
||||
if( ret_value < 0 )
|
||||
throw Exception( "Exception::printError", "H5Eprint failed" );
|
||||
throw Exception( "Printing error stack", "H5Eprint2 failed" );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Exception::printError
|
||||
///\brief Prints the error stack in a default manner. This member
|
||||
/// function is replaced by the static function printErrorStack
|
||||
/// and will be removed from the next major release.
|
||||
///\param stream - IN: File pointer
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
// Description:
|
||||
// This function can be removed in next major release.
|
||||
// -BMR, 2014/04/24
|
||||
//--------------------------------------------------------------------------
|
||||
void Exception::printError(FILE* stream) const
|
||||
{
|
||||
Exception::printErrorStack(stream, H5E_DEFAULT);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -312,7 +335,7 @@ void Exception::printError( FILE* stream ) const
|
||||
///\brief Noop destructor
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
Exception::~Exception() {}
|
||||
Exception::~Exception() throw() {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Subclass: FileIException
|
||||
@@ -335,7 +358,7 @@ FileIException::FileIException(const H5std_string& func_name, const H5std_string
|
||||
// Function: FileIException destructor
|
||||
///\brief Noop destructor.
|
||||
//--------------------------------------------------------------------------
|
||||
FileIException::~FileIException() {}
|
||||
FileIException::~FileIException() throw() {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Subclass: GroupIException
|
||||
@@ -358,7 +381,7 @@ GroupIException::GroupIException(const H5std_string& func_name, const H5std_stri
|
||||
// Function: GroupIException destructor
|
||||
///\brief Noop destructor.
|
||||
//--------------------------------------------------------------------------
|
||||
GroupIException::~GroupIException() {}
|
||||
GroupIException::~GroupIException() throw() {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Subclass: DataSpaceIException
|
||||
@@ -381,7 +404,7 @@ DataSpaceIException::DataSpaceIException(const H5std_string& func_name, const H5
|
||||
// Function: DataSpaceIException destructor
|
||||
///\brief Noop destructor.
|
||||
//--------------------------------------------------------------------------
|
||||
DataSpaceIException::~DataSpaceIException() {}
|
||||
DataSpaceIException::~DataSpaceIException() throw() {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Subclass: DataTypeIException
|
||||
@@ -404,7 +427,7 @@ DataTypeIException::DataTypeIException(const H5std_string& func_name, const H5st
|
||||
// Function: DataTypeIException destructor
|
||||
///\brief Noop destructor.
|
||||
//--------------------------------------------------------------------------
|
||||
DataTypeIException::~DataTypeIException() {}
|
||||
DataTypeIException::~DataTypeIException() throw() {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Subclass: PropListIException
|
||||
@@ -427,7 +450,7 @@ PropListIException::PropListIException(const H5std_string& func_name, const H5st
|
||||
// Function: PropListIException destructor
|
||||
///\brief Noop destructor.
|
||||
//--------------------------------------------------------------------------
|
||||
PropListIException::~PropListIException() {}
|
||||
PropListIException::~PropListIException() throw() {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Subclass: DataSetIException
|
||||
@@ -450,7 +473,7 @@ DataSetIException::DataSetIException(const H5std_string& func_name, const H5std_
|
||||
// Function: DataSetIException destructor
|
||||
///\brief Noop destructor.
|
||||
//--------------------------------------------------------------------------
|
||||
DataSetIException::~DataSetIException() {}
|
||||
DataSetIException::~DataSetIException() throw() {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Subclass: AttributeIException
|
||||
@@ -473,7 +496,7 @@ AttributeIException::AttributeIException(const H5std_string& func_name, const H5
|
||||
// Function: AttributeIException destructor
|
||||
///\brief Noop destructor.
|
||||
//--------------------------------------------------------------------------
|
||||
AttributeIException::~AttributeIException() {}
|
||||
AttributeIException::~AttributeIException() throw() {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Subclass: ReferenceException
|
||||
@@ -496,7 +519,7 @@ ReferenceException::ReferenceException(const H5std_string& func_name, const H5st
|
||||
// Function: ReferenceException destructor
|
||||
///\brief Noop destructor.
|
||||
//--------------------------------------------------------------------------
|
||||
ReferenceException::~ReferenceException() {}
|
||||
ReferenceException::~ReferenceException() throw() {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Subclass: LibraryIException
|
||||
@@ -519,7 +542,30 @@ LibraryIException::LibraryIException(const H5std_string& func_name, const H5std_
|
||||
// Function: LibraryIException destructor
|
||||
///\brief Noop destructor.
|
||||
//--------------------------------------------------------------------------
|
||||
LibraryIException::~LibraryIException() {}
|
||||
LibraryIException::~LibraryIException() throw() {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Subclass: LocationException
|
||||
// Programmer Binh-Minh Ribler - 2014
|
||||
//--------------------------------------------------------------------------
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: LocationException default constructor
|
||||
///\brief Default constructor.
|
||||
//--------------------------------------------------------------------------
|
||||
LocationException::LocationException():Exception(){}
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: LocationException overloaded constructor
|
||||
///\brief Creates a LocationException with the name of the function,
|
||||
/// in which the failure occurs, and an optional detailed message.
|
||||
///\param func_name - IN: Name of the function where failure occurs
|
||||
///\param message - IN: Message on the failure
|
||||
//--------------------------------------------------------------------------
|
||||
LocationException::LocationException(const H5std_string& func_name, const H5std_string& message) : Exception(func_name, message) {}
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: LocationException destructor
|
||||
///\brief Noop destructor.
|
||||
//--------------------------------------------------------------------------
|
||||
LocationException::~LocationException() throw() {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Subclass: IdComponentException
|
||||
@@ -542,7 +588,7 @@ IdComponentException::IdComponentException(const H5std_string& func_name, const
|
||||
// Function: IdComponentException destructor
|
||||
///\brief Noop destructor.
|
||||
//--------------------------------------------------------------------------
|
||||
IdComponentException::~IdComponentException() {}
|
||||
IdComponentException::~IdComponentException() throw() {}
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
} // end namespace
|
||||
#endif
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#ifndef _H5Exception_H
|
||||
#define _H5Exception_H
|
||||
#ifndef __H5Exception_H
|
||||
#define __H5Exception_H
|
||||
|
||||
#include <string>
|
||||
|
||||
@@ -28,6 +28,11 @@ namespace H5 {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*! \class Exception
|
||||
\brief Exception provides wrappers of HDF5 error handling functions.
|
||||
|
||||
Many classes are derived from Exception for specific HDF5 C interfaces.
|
||||
*/
|
||||
class H5_DLLCPP Exception {
|
||||
public:
|
||||
// Creates an exception with a function name where the failure occurs
|
||||
@@ -67,7 +72,9 @@ class H5_DLLCPP Exception {
|
||||
H5E_walk2_t func, void* client_data);
|
||||
|
||||
// Prints the error stack in a default manner.
|
||||
virtual void printError( FILE* stream = NULL ) const;
|
||||
static void printErrorStack(FILE* stream = stderr,
|
||||
hid_t err_stack = H5E_DEFAULT); // Static
|
||||
virtual void printError(FILE* stream = NULL) const;
|
||||
|
||||
// Default constructor
|
||||
Exception();
|
||||
@@ -76,89 +83,96 @@ class H5_DLLCPP Exception {
|
||||
Exception( const Exception& orig);
|
||||
|
||||
// virtual Destructor
|
||||
virtual ~Exception();
|
||||
|
||||
private:
|
||||
H5std_string detail_message;
|
||||
H5std_string func_name;
|
||||
virtual ~Exception() throw();
|
||||
|
||||
protected:
|
||||
// Default value for detail_message
|
||||
static const char DEFAULT_MSG[];
|
||||
|
||||
private:
|
||||
H5std_string detail_message;
|
||||
H5std_string func_name;
|
||||
};
|
||||
|
||||
class H5_DLLCPP FileIException : public Exception {
|
||||
public:
|
||||
FileIException( const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
|
||||
FileIException();
|
||||
virtual ~FileIException();
|
||||
virtual ~FileIException() throw();
|
||||
};
|
||||
|
||||
class H5_DLLCPP GroupIException : public Exception {
|
||||
public:
|
||||
GroupIException( const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
|
||||
GroupIException();
|
||||
virtual ~GroupIException();
|
||||
virtual ~GroupIException() throw();
|
||||
};
|
||||
|
||||
class H5_DLLCPP DataSpaceIException : public Exception {
|
||||
public:
|
||||
DataSpaceIException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
|
||||
DataSpaceIException();
|
||||
virtual ~DataSpaceIException();
|
||||
virtual ~DataSpaceIException() throw();
|
||||
};
|
||||
|
||||
class H5_DLLCPP DataTypeIException : public Exception {
|
||||
public:
|
||||
DataTypeIException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
|
||||
DataTypeIException();
|
||||
virtual ~DataTypeIException();
|
||||
virtual ~DataTypeIException() throw();
|
||||
};
|
||||
|
||||
class H5_DLLCPP PropListIException : public Exception {
|
||||
public:
|
||||
PropListIException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
|
||||
PropListIException();
|
||||
virtual ~PropListIException();
|
||||
virtual ~PropListIException() throw();
|
||||
};
|
||||
|
||||
class H5_DLLCPP DataSetIException : public Exception {
|
||||
public:
|
||||
DataSetIException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
|
||||
DataSetIException();
|
||||
virtual ~DataSetIException();
|
||||
virtual ~DataSetIException() throw();
|
||||
};
|
||||
|
||||
class H5_DLLCPP AttributeIException : public Exception {
|
||||
public:
|
||||
AttributeIException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
|
||||
AttributeIException();
|
||||
virtual ~AttributeIException();
|
||||
virtual ~AttributeIException() throw();
|
||||
};
|
||||
|
||||
class H5_DLLCPP ReferenceException : public Exception {
|
||||
public:
|
||||
ReferenceException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
|
||||
ReferenceException();
|
||||
virtual ~ReferenceException();
|
||||
virtual ~ReferenceException() throw();
|
||||
};
|
||||
|
||||
class H5_DLLCPP LibraryIException : public Exception {
|
||||
public:
|
||||
LibraryIException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
|
||||
LibraryIException();
|
||||
virtual ~LibraryIException();
|
||||
virtual ~LibraryIException() throw();
|
||||
};
|
||||
|
||||
class H5_DLLCPP LocationException : public Exception {
|
||||
public:
|
||||
LocationException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
|
||||
LocationException();
|
||||
virtual ~LocationException() throw();
|
||||
};
|
||||
|
||||
class H5_DLLCPP IdComponentException : public Exception {
|
||||
public:
|
||||
IdComponentException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
|
||||
IdComponentException();
|
||||
virtual ~IdComponentException();
|
||||
virtual ~IdComponentException() throw();
|
||||
};
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // _H5Exception_H
|
||||
#endif // __H5Exception_H
|
||||
|
||||
@@ -76,7 +76,7 @@ void FileAccPropList::setStdio() const
|
||||
/// driver was set for the property list. The driver ID is
|
||||
/// only valid as long as the file driver remains registered.
|
||||
/// Valid driver identifiers can be found at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-GetDriver
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-GetDriver
|
||||
///\exception H5::PropListIException
|
||||
// Programmer: Binh-Minh Ribler - April, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -99,7 +99,7 @@ hid_t FileAccPropList::getDriver() const
|
||||
///\par Description
|
||||
/// For a list of valid driver identifiers, please see the C
|
||||
/// layer Reference Manual at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-GetDriver
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetDriver
|
||||
// Programmer: Binh-Minh Ribler - April, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void FileAccPropList::setDriver(hid_t new_driver_id, const void *new_driver_info) const
|
||||
@@ -157,7 +157,7 @@ hsize_t FileAccPropList::getFamilyOffset() const
|
||||
///\par Description
|
||||
/// For more details on the use of \c H5FD_CORE driver, please
|
||||
/// refer to
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetFaplCore
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetFaplCore
|
||||
// Programmer: Binh-Minh Ribler - April, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void FileAccPropList::setCore (size_t increment, hbool_t backing_store) const
|
||||
@@ -261,10 +261,10 @@ FileAccPropList FileAccPropList::getFamily(hsize_t& memb_size) const
|
||||
///\exception H5::PropListIException
|
||||
///\par Description
|
||||
/// Temporary - For information, please refer to:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetFaplSplit
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetFaplSplit
|
||||
// Programmer: Binh-Minh Ribler - April, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void FileAccPropList::setSplit( FileAccPropList& meta_plist, FileAccPropList& raw_plist, const char* meta_ext, const char* raw_ext ) const
|
||||
void FileAccPropList::setSplit(const FileAccPropList& meta_plist, const FileAccPropList& raw_plist, const char* meta_ext, const char* raw_ext ) const
|
||||
{
|
||||
hid_t meta_pid = meta_plist.getId();
|
||||
hid_t raw_pid = raw_plist.getId();
|
||||
@@ -275,64 +275,61 @@ void FileAccPropList::setSplit( FileAccPropList& meta_plist, FileAccPropList& ra
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: FileAccPropList::setSplit
|
||||
///\brief This is an overloaded member function, kept for backward
|
||||
/// compatibility. It differs from the above function in that it
|
||||
/// misses const's. This wrapper will be removed in future release.
|
||||
///\param meta_plist - IN: File access plist for the metadata file
|
||||
///\param raw_plist - IN: File access plist for the raw data file
|
||||
///\param meta_ext - IN: Metadata filename extension as \c char*
|
||||
///\param raw_ext - IN: Raw data filename extension as \c char*
|
||||
///\exception H5::PropListIException
|
||||
// Programmer: Binh-Minh Ribler - April, 2004
|
||||
// Note: Retiring April, 2014
|
||||
//--------------------------------------------------------------------------
|
||||
void FileAccPropList::setSplit(FileAccPropList& meta_plist, FileAccPropList& raw_plist, const char* meta_ext, const char* raw_ext ) const
|
||||
{
|
||||
setSplit((const FileAccPropList)meta_plist, (const FileAccPropList)raw_plist, meta_ext, raw_ext);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: FileAccPropList::setSplit
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function only in what arguments it
|
||||
/// accepts.
|
||||
/// It takes character arguments as \c H5std_string.
|
||||
///\param meta_plist - IN: File access plist for the metadata file
|
||||
///\param raw_plist - IN: File access plist for the raw data file
|
||||
///\param meta_ext - IN: Metadata filename extension as \c H5std_string
|
||||
///\param raw_ext - IN: Raw data filename extension as \c H5std_string
|
||||
///\exception H5::PropListIException
|
||||
// Programmer: Binh-Minh Ribler - April, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void FileAccPropList::setSplit(const FileAccPropList& meta_plist, const FileAccPropList& raw_plist, const H5std_string& meta_ext, const H5std_string& raw_ext ) const
|
||||
{
|
||||
setSplit( meta_plist, raw_plist, meta_ext.c_str(), raw_ext.c_str() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: FileAccPropList::setSplit
|
||||
///\brief This is an overloaded member function, kept for backward
|
||||
/// compatibility. It differs from the above function in that it
|
||||
/// misses const's. This wrapper will be removed in future release.
|
||||
///\param meta_plist - IN: File access plist for the metadata file
|
||||
///\param raw_plist - IN: File access plist for the raw data file
|
||||
///\param meta_ext - IN: Metadata filename extension as \c string
|
||||
///\param raw_ext - IN: Raw data filename extension as \c string
|
||||
///\exception H5::PropListIException
|
||||
// Programmer: Binh-Minh Ribler - April, 2004
|
||||
// Note: Retiring April, 2014
|
||||
//--------------------------------------------------------------------------
|
||||
void FileAccPropList::setSplit( FileAccPropList& meta_plist, FileAccPropList& raw_plist, const H5std_string& meta_ext, const H5std_string& raw_ext ) const
|
||||
void FileAccPropList::setSplit(FileAccPropList& meta_plist, FileAccPropList& raw_plist, const H5std_string& meta_ext, const H5std_string& raw_ext ) const
|
||||
{
|
||||
setSplit( meta_plist, raw_plist, meta_ext.c_str(), raw_ext.c_str() );
|
||||
setSplit((const FileAccPropList)meta_plist, (const FileAccPropList)raw_plist, meta_ext.c_str(), raw_ext.c_str() );
|
||||
}
|
||||
|
||||
#ifdef H5_HAVE_STREAM // for Stream Virtual File Driver
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: FileAccPropList::getStream
|
||||
///\brief Retrieves the streaming I/O driver settings
|
||||
///\return The streaming I/O file access property list structure
|
||||
/// For detail on this structure, please refer to
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetFaplStream
|
||||
///\exception H5::PropListIException
|
||||
// Programmer: Binh-Minh Ribler - April, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
H5FD_stream_fapl_t FileAccPropList::getStream() const
|
||||
{
|
||||
H5FD_stream_fapl_t fapl;
|
||||
herr_t ret_value = H5Pget_fapl_stream(id, &fapl);
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw PropListIException("FileAccPropList::getStream", "H5Pget_fapl_stream failed");
|
||||
}
|
||||
return(fapl);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: FileAccPropList::setStream
|
||||
///\brief Modifies this file access property list to use the Stream
|
||||
/// driver.
|
||||
///\param fapl - IN: The streaming I/O file access property list
|
||||
///\exception H5::PropListIException
|
||||
///\par Description
|
||||
/// For detail on \a fapl, please refer to
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetFaplStream
|
||||
// Programmer: Binh-Minh Ribler - April, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void FileAccPropList::setStream(H5FD_stream_fapl_t &fapl) const
|
||||
{
|
||||
herr_t ret_value = H5Pset_fapl_stream (id, &fapl);
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw PropListIException("FileAccPropList::setStream", "H5Pset_fapl_stream failed");
|
||||
}
|
||||
}
|
||||
#endif // Stream Virtual File Driver
|
||||
// Stream Virtual File Driver had been removed from the main library.
|
||||
// FileAccPropList::[s,g]etStream are now removed from the C++ API.
|
||||
// -BMR, March, 2012
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: FileAccPropList::getSieveBufSize
|
||||
@@ -360,7 +357,7 @@ size_t FileAccPropList::getSieveBufSize() const
|
||||
///\exception H5::PropListIException
|
||||
///\par Description
|
||||
/// For detail on data sieving, please refer to
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetSieveBufSize
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetSieveBufSize
|
||||
// Programmer: Binh-Minh Ribler - April, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void FileAccPropList::setSieveBufSize(size_t bufsize) const
|
||||
@@ -380,7 +377,7 @@ void FileAccPropList::setSieveBufSize(size_t bufsize) const
|
||||
///\exception H5::PropListIException
|
||||
///\par Description
|
||||
/// For more detail, please see the C layer Reference Manual at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetMetaBlockSize
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetMetaBlockSize
|
||||
// Programmer: Binh-Minh Ribler - April, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void FileAccPropList::setMetaBlockSize(hsize_t &block_size) const
|
||||
@@ -420,7 +417,7 @@ hsize_t FileAccPropList::getMetaBlockSize() const
|
||||
///\exception H5::PropListIException
|
||||
///\par Description
|
||||
/// For detail on \a flags, please refer to
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetFaplStream
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetFaplLog
|
||||
// Programmer: Binh-Minh Ribler - April, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void FileAccPropList::setLog(const char *logfile, unsigned flags, size_t buf_size) const
|
||||
@@ -477,7 +474,7 @@ void FileAccPropList::setSec2() const
|
||||
/// The parameter \a alignment must have a positive value.
|
||||
///
|
||||
/// For detail on \a setting alignment, please refer to
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetAlignment
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetAlignment
|
||||
// Programmer: Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void FileAccPropList::setAlignment( hsize_t threshold, hsize_t alignment ) const
|
||||
@@ -514,7 +511,7 @@ void FileAccPropList::getAlignment( hsize_t &threshold, hsize_t &alignment ) con
|
||||
///\exception H5::PropListIException
|
||||
///\par Description
|
||||
/// More details and valid values for \a dtype can be found at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetMultiType
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetMultiType
|
||||
// Programmer: Binh-Minh Ribler - April, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void FileAccPropList::setMultiType(H5FD_mem_t dtype) const
|
||||
@@ -533,7 +530,7 @@ void FileAccPropList::setMultiType(H5FD_mem_t dtype) const
|
||||
///\exception H5::PropListIException
|
||||
///\par Description
|
||||
/// More details and possible returned values can be found at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-GetMultiType
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-GetMultiType
|
||||
// Programmer: Binh-Minh Ribler - April, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
H5FD_mem_t FileAccPropList::getMultiType() const
|
||||
@@ -634,7 +631,7 @@ H5F_close_degree_t FileAccPropList::getFcloseDegree()
|
||||
///\exception H5::PropListIException
|
||||
///\par Description
|
||||
/// For detail on \a fapl, please refer to
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetFaplStream
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetGCReferences
|
||||
// Programmer: Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void FileAccPropList::setGcReferences( unsigned gc_ref ) const
|
||||
|
||||
@@ -14,14 +14,14 @@
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#ifndef _H5FileAccPropList_H
|
||||
#define _H5FileAccPropList_H
|
||||
#ifndef __H5FileAccPropList_H
|
||||
#define __H5FileAccPropList_H
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
#endif
|
||||
|
||||
// class for file access properties
|
||||
//! Class FileAccPropList represents the HDF5 file access property list.
|
||||
class H5_DLLCPP FileAccPropList : public PropList {
|
||||
public:
|
||||
static const FileAccPropList DEFAULT;
|
||||
@@ -62,18 +62,21 @@ class H5_DLLCPP FileAccPropList : public PropList {
|
||||
FileAccPropList getFamily(hsize_t& memb_size) const;
|
||||
|
||||
// Emulates the old split file driver,
|
||||
void setSplit( FileAccPropList& meta_plist, FileAccPropList& raw_plist,
|
||||
const char* meta_ext = ".meta", const char* raw_ext = ".raw" ) const;
|
||||
void setSplit( FileAccPropList& meta_plist, FileAccPropList& raw_plist,
|
||||
const H5std_string& meta_ext, const H5std_string& raw_ext ) const;
|
||||
|
||||
#ifdef H5_HAVE_STREAM // for Stream Virtual File Driver
|
||||
// Modifies this file access property list to use the Stream driver.
|
||||
void setStream(H5FD_stream_fapl_t &fapl) const;
|
||||
|
||||
// Retrieves the streaming I/O driver settings
|
||||
H5FD_stream_fapl_t getStream() const;
|
||||
#endif
|
||||
void setSplit(const FileAccPropList& meta_plist,
|
||||
const FileAccPropList& raw_plist,
|
||||
const char* meta_ext = ".meta",
|
||||
const char* raw_ext = ".raw" ) const;
|
||||
void setSplit(const FileAccPropList& meta_plist,
|
||||
const FileAccPropList& raw_plist,
|
||||
const H5std_string& meta_ext = ".meta",
|
||||
const H5std_string& raw_ext = ".raw") const;
|
||||
// These two overloaded functions are kept for backward compatibility
|
||||
// only; they missed the const's and will be removed in future release.
|
||||
void setSplit(FileAccPropList& meta_plist, FileAccPropList& raw_plist,
|
||||
const char* meta_ext=".meta", const char* raw_ext=".raw") const;
|
||||
void setSplit(FileAccPropList& meta_plist, FileAccPropList& raw_plist,
|
||||
const H5std_string& meta_ext=".meta",
|
||||
const H5std_string& raw_ext=".raw") const;
|
||||
|
||||
// Sets the maximum size of the data sieve buffer.
|
||||
void setSieveBufSize(size_t bufsize) const;
|
||||
@@ -123,7 +126,7 @@ class H5_DLLCPP FileAccPropList : public PropList {
|
||||
// Returns garbage collecting references setting.
|
||||
unsigned getGcReferences() const;
|
||||
|
||||
// Returns this class name
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass () const { return("FileAccPropList"); }
|
||||
|
||||
// Copy constructor: creates a copy of a FileAccPropList object.
|
||||
@@ -139,4 +142,4 @@ class H5_DLLCPP FileAccPropList : public PropList {
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif // __H5FileAccPropList_H
|
||||
|
||||
@@ -128,7 +128,7 @@ hsize_t FileCreatPropList::getUserblock() const
|
||||
///\par Description
|
||||
/// For information on setting sizes, please refer to the
|
||||
/// C layer Reference Manual at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetSizes
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetSizes
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void FileCreatPropList::setSizes( size_t sizeof_addr, size_t sizeof_size ) const
|
||||
@@ -168,7 +168,7 @@ void FileCreatPropList::getSizes( size_t& sizeof_addr, size_t& sizeof_size ) con
|
||||
///\exception H5::PropListIException
|
||||
///\par Description
|
||||
/// For information, please see the C layer Reference Manual at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetSymK
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetSymK
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void FileCreatPropList::setSymk( unsigned ik, unsigned lk ) const
|
||||
@@ -189,7 +189,7 @@ void FileCreatPropList::setSymk( unsigned ik, unsigned lk ) const
|
||||
///\exception H5::PropListIException
|
||||
///\par Description
|
||||
/// For information, please see
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetSymK
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-GetSymK
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void FileCreatPropList::getSymk( unsigned& ik, unsigned& lk ) const
|
||||
@@ -210,7 +210,7 @@ void FileCreatPropList::getSymk( unsigned& ik, unsigned& lk ) const
|
||||
///\exception H5::PropListIException
|
||||
///\par Description
|
||||
/// For information, please see the C layer Reference Manual at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetIstoreK
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetIstoreK
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void FileCreatPropList::setIstorek( unsigned ik ) const
|
||||
@@ -230,7 +230,7 @@ void FileCreatPropList::setIstorek( unsigned ik ) const
|
||||
///\exception H5::PropListIException
|
||||
///\par Description
|
||||
/// For information, please see
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetIstoreK
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-GetIstoreK
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
unsigned FileCreatPropList::getIstorek() const
|
||||
|
||||
@@ -14,14 +14,14 @@
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#ifndef _H5FileCreatPropList_H
|
||||
#define _H5FileCreatPropList_H
|
||||
#ifndef __H5FileCreatPropList_H
|
||||
#define __H5FileCreatPropList_H
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
#endif
|
||||
|
||||
// class for file access properties
|
||||
//! Class FileCreatPropList represents the HDF5 file create property list.
|
||||
class H5_DLLCPP FileCreatPropList : public PropList {
|
||||
public:
|
||||
// Default file creation property list.
|
||||
@@ -62,7 +62,7 @@ class H5_DLLCPP FileCreatPropList : public PropList {
|
||||
// indexing chunked datasets.
|
||||
void setIstorek( unsigned ik ) const;
|
||||
|
||||
// Returns this class name
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass () const { return("FileCreatPropList"); }
|
||||
|
||||
// Copy constructor: creates a copy of a FileCreatPropList object.
|
||||
@@ -78,4 +78,4 @@ class H5_DLLCPP FileCreatPropList : public PropList {
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif // __H5FileCreatPropList_H
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace H5 {
|
||||
///\brief Default constructor: creates a stub H5File object.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
H5File::H5File() : IdComponent(), id(0) {}
|
||||
H5File::H5File() : H5Location(), id(H5I_INVALID_HID) {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File overloaded constructor
|
||||
@@ -61,7 +61,7 @@ H5File::H5File() : IdComponent(), id(0) {}
|
||||
/// modifying default file meta-data. Default to
|
||||
/// FileCreatPropList::DEFAULT
|
||||
///\param access_plist - IN: File access property list. Default to
|
||||
/// FileCreatPropList::DEFAULT
|
||||
/// FileAccPropList::DEFAULT
|
||||
///\par Description
|
||||
/// Valid values of \a flags include:
|
||||
/// \li \c H5F_ACC_TRUNC - Truncate file, if it already exists,
|
||||
@@ -69,6 +69,10 @@ H5File::H5File() : IdComponent(), id(0) {}
|
||||
/// the file.
|
||||
/// \li \c H5F_ACC_EXCL - Fail if file already exists.
|
||||
/// \c H5F_ACC_TRUNC and \c H5F_ACC_EXCL are mutually exclusive
|
||||
/// \li \c H5F_ACC_RDONLY - Open file as read-only, if it already
|
||||
/// exists, and fail, otherwise
|
||||
/// \li \c H5F_ACC_RDWR - Open file for read/write, if it already
|
||||
/// exists, and fail, otherwise
|
||||
/// \li \c H5F_ACC_DEBUG - print debug information. This flag is
|
||||
/// used only by HDF5 library developers; it is neither
|
||||
/// tested nor supported for use in applications.
|
||||
@@ -76,42 +80,60 @@ H5File::H5File() : IdComponent(), id(0) {}
|
||||
/// For info on file creation in the case of an already-open file,
|
||||
/// please refer to the \b Special \b case section in the C layer
|
||||
/// Reference Manual at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5F.html#File-Create
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5F.html#File-Create
|
||||
// Notes With a PGI compiler (~2012-2013), the exception thrown by p_get_file
|
||||
// could not be caught in the applications. Added try block here
|
||||
// to catch then re-throw it. -BMR 2013/03/21
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
H5File::H5File( const char* name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist ) : IdComponent(0)
|
||||
H5File::H5File( const char* name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist ) : H5Location(), id(H5I_INVALID_HID)
|
||||
{
|
||||
p_get_file(name, flags, create_plist, access_plist);
|
||||
try {
|
||||
p_get_file(name, flags, create_plist, access_plist);
|
||||
} catch (FileIException open_file) {
|
||||
throw open_file;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File overloaded constructor
|
||||
///\brief This is another overloaded constructor. It differs from the
|
||||
/// above constructor only in the type of the \a name argument.
|
||||
///\param name - IN: Name of the file - \c std::string
|
||||
///\param name - IN: Name of the file - \c H5std_string
|
||||
///\param flags - IN: File access flags
|
||||
///\param create_plist - IN: File creation property list, used when
|
||||
/// modifying default file meta-data. Default to
|
||||
/// FileCreatPropList::DEFAULT
|
||||
///\param access_plist - IN: File access property list. Default to
|
||||
/// FileCreatPropList::DEFAULT
|
||||
/// FileAccPropList::DEFAULT
|
||||
// Notes With a PGI compiler (~2012-2013), the exception thrown by p_get_file
|
||||
// could not be caught in the applications. Added try block here
|
||||
// to catch then re-throw it. -BMR 2013/03/21
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
H5File::H5File( const H5std_string& name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist ) : IdComponent(0)
|
||||
H5File::H5File( const H5std_string& name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist ) : H5Location(), id(H5I_INVALID_HID)
|
||||
{
|
||||
p_get_file(name.c_str(), flags, create_plist, access_plist);
|
||||
try {
|
||||
p_get_file(name.c_str(), flags, create_plist, access_plist);
|
||||
} catch (FileIException open_file) {
|
||||
throw open_file;
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
//--------------------------------------------------------------------------
|
||||
// This function is private and contains common code between the
|
||||
// constructors taking a string or a char*
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
// Modification
|
||||
// - removed H5F_ACC_CREAT because H5Fcreate will fail with
|
||||
// H5F_ACC_CREAT. - BMR, Sep 17, 2014
|
||||
//--------------------------------------------------------------------------
|
||||
void H5File::p_get_file(const char* name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist)
|
||||
{
|
||||
// These bits only set for creation, so if any of them are set,
|
||||
// create the file.
|
||||
if( flags & (H5F_ACC_CREAT|H5F_ACC_EXCL|H5F_ACC_TRUNC|H5F_ACC_DEBUG))
|
||||
if( flags & (H5F_ACC_EXCL|H5F_ACC_TRUNC|H5F_ACC_DEBUG))
|
||||
{
|
||||
hid_t create_plist_id = create_plist.getId();
|
||||
hid_t access_plist_id = access_plist.getId();
|
||||
@@ -133,6 +155,8 @@ void H5File::p_get_file(const char* name, unsigned int flags, const FileCreatPro
|
||||
}
|
||||
}
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File copy constructor
|
||||
///\brief Copy constructor: makes a copy of the original
|
||||
@@ -140,34 +164,15 @@ void H5File::p_get_file(const char* name, unsigned int flags, const FileCreatPro
|
||||
///\param original - IN: H5File instance to copy
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
H5File::H5File(const H5File& original) : IdComponent(original)
|
||||
H5File::H5File(const H5File& original) : H5Location(original)
|
||||
{
|
||||
id = original.getId();
|
||||
incRefCount(); // increment number of references to this id
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::flush
|
||||
///\brief Flushes all buffers associated with a file to disk.
|
||||
///\param scope - IN: Specifies the scope of the flushing action,
|
||||
/// which can be either of these values:
|
||||
/// \li \c H5F_SCOPE_GLOBAL - Flushes the entire virtual file
|
||||
/// \li \c H5F_SCOPE_LOCAL - Flushes only the specified file
|
||||
///\exception H5::FileIException
|
||||
// Programmer Binh-Minh Ribler - Dec. 2005
|
||||
//--------------------------------------------------------------------------
|
||||
void H5File::flush(H5F_scope_t scope) const
|
||||
{
|
||||
herr_t ret_value = H5Fflush( id, scope );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw FileIException("H5File::flush", "H5Fflush failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::isHdf5
|
||||
///\brief Determines whether a file in HDF5 format.
|
||||
// Function: H5File::isHdf5 (static)
|
||||
///\brief Determines whether a file in HDF5 format. (Static)
|
||||
///\param name - IN: Name of the file
|
||||
///\return true if the file is in HDF5 format, and false, otherwise
|
||||
///\exception H5::FileIException
|
||||
@@ -189,10 +194,10 @@ bool H5File::isHdf5(const char* name)
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::isHdf5
|
||||
// Function: H5File::isHdf5 (static)
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It takes an \c std::string for \a name.
|
||||
///\param name - IN: Name of the file - \c std::string
|
||||
/// It takes an \c H5std_string for \a name. (Static)
|
||||
///\param name - IN: Name of the file - \c H5std_string
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
bool H5File::isHdf5(const H5std_string& name )
|
||||
@@ -206,7 +211,7 @@ bool H5File::isHdf5(const H5std_string& name )
|
||||
///\param name - IN: Name of the file
|
||||
///\param flags - IN: File access flags
|
||||
///\param access_plist - IN: File access property list. Default to
|
||||
/// FileCreatPropList::DEFAULT
|
||||
/// FileAccPropList::DEFAULT
|
||||
///\par Description
|
||||
/// Valid values of \a flags include:
|
||||
/// H5F_ACC_RDWR: Open with read/write access. If the file is
|
||||
@@ -231,8 +236,8 @@ void H5File::openFile(const char* name, unsigned int flags, const FileAccPropLis
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::openFile
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It takes an \c std::string for \a name.
|
||||
///\param name - IN: Name of the file - \c std::string
|
||||
/// It takes an \c H5std_string for \a name.
|
||||
///\param name - IN: Name of the file - \c H5std_string
|
||||
///\param flags - IN: File access flags
|
||||
///\param access_plist - IN: File access property list. Default to
|
||||
/// FileAccPropList::DEFAULT
|
||||
@@ -269,28 +274,13 @@ void H5File::reOpen()
|
||||
throw FileIException("H5File::reOpen", close_error.getDetailMsg());
|
||||
}
|
||||
|
||||
// call C routine to reopen the file - Note: not sure about this
|
||||
// does id need to be closed later? which id to be the parameter?
|
||||
// call C routine to reopen the file - Note: not sure about this,
|
||||
// which id to be the parameter when closing?
|
||||
id = H5Freopen( id );
|
||||
if( id < 0 ) // Raise exception when H5Freopen returns a neg value
|
||||
throw FileIException("H5File::reOpen", "H5Freopen failed");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::reopen
|
||||
///\brief Reopens this file.
|
||||
///
|
||||
///\exception H5::FileIException
|
||||
///\par Description
|
||||
/// This function will be replaced by the above function \c reOpen
|
||||
/// in future releases.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void H5File::reopen()
|
||||
{
|
||||
H5File::reOpen();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::getCreatePlist
|
||||
///\brief Returns the creation property list of this file
|
||||
@@ -460,7 +450,7 @@ void H5File::getObjIDs(unsigned types, size_t max_objs, hid_t *oid_list) const
|
||||
/// closed and reopened or opened during a subsequent session.
|
||||
// Programmer Binh-Minh Ribler - May 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void H5File::getVFDHandle(FileAccPropList& fapl, void **file_handle) const
|
||||
void H5File::getVFDHandle(const FileAccPropList& fapl, void **file_handle) const
|
||||
{
|
||||
hid_t fapl_id = fapl.getId();
|
||||
herr_t ret_value = H5Fget_vfd_handle(id, fapl_id, file_handle);
|
||||
@@ -470,6 +460,23 @@ void H5File::getVFDHandle(FileAccPropList& fapl, void **file_handle) const
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::getVFDHandle
|
||||
///\brief This is an overloaded member function, kept for backward
|
||||
/// compatibility. It differs from the above function in that it
|
||||
/// misses const. This wrapper will be removed in future release.
|
||||
///\param fapl - File access property list
|
||||
///\param file_handle - Pointer to the file handle being used by
|
||||
/// the low-level virtual file driver
|
||||
///\exception H5::FileIException
|
||||
// Programmer Binh-Minh Ribler - May 2004
|
||||
// Note: Retiring April, 2014
|
||||
//--------------------------------------------------------------------------
|
||||
void H5File::getVFDHandle(FileAccPropList& fapl, void **file_handle) const
|
||||
{
|
||||
getVFDHandle((const FileAccPropList)fapl, file_handle);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::getVFDHandle
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
@@ -489,70 +496,6 @@ void H5File::getVFDHandle(void **file_handle) const
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::getFileName
|
||||
///\brief Gets the name of this file.
|
||||
///\return File name
|
||||
///\exception H5::FileIException
|
||||
// Programmer Binh-Minh Ribler - Jul, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
H5std_string H5File::getFileName() const
|
||||
{
|
||||
try {
|
||||
return(p_get_file_name());
|
||||
}
|
||||
catch (IdComponentException E) {
|
||||
throw FileIException("H5File::getFileName", E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::getObjType
|
||||
///\brief Retrieves the type of object that an object reference points to.
|
||||
///\param ref - IN: Reference to query
|
||||
///\param ref_type - IN: Type of reference, valid values are:
|
||||
/// \li \c H5R_OBJECT \tReference is an object reference.
|
||||
/// \li \c H5R_DATASET_REGION \tReference is a dataset region reference.
|
||||
///\return Object type, which can be one of the following:
|
||||
/// \li \c H5G_LINK - Object is a symbolic link.
|
||||
/// \li \c H5G_GROUP - Object is a group.
|
||||
/// \li \c H5G_DATASET - Object is a dataset.
|
||||
/// \li \c H5G_TYPE - Object is a named datatype
|
||||
///\exception H5::FileIException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
H5G_obj_t H5File::getObjType(void *ref, H5R_type_t ref_type) const
|
||||
{
|
||||
try {
|
||||
return(p_get_obj_type(ref, ref_type));
|
||||
}
|
||||
catch (IdComponentException E) {
|
||||
throw FileIException("H5File::getObjType", E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::getRegion
|
||||
///\brief Retrieves a dataspace with the region pointed to selected.
|
||||
///\param ref - IN: Reference to get region of
|
||||
///\param ref_type - IN: Type of reference to get region of - default
|
||||
///\return DataSpace instance
|
||||
///\exception H5::FileIException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
DataSpace H5File::getRegion(void *ref, H5R_type_t ref_type) const
|
||||
{
|
||||
try {
|
||||
DataSpace dataspace(p_get_region(ref, ref_type));
|
||||
return(dataspace);
|
||||
}
|
||||
catch (IdComponentException E) {
|
||||
throw FileIException("H5File::getRegion", E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::getFileSize
|
||||
///\brief Returns the file size of the HDF5 file.
|
||||
@@ -575,133 +518,23 @@ hsize_t H5File::getFileSize() const
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::p_reference (protected)
|
||||
// Purpose Creates a reference to an HDF5 object or a dataset region.
|
||||
// Parameters
|
||||
// name - IN: Name of the object to be referenced
|
||||
// dataspace - IN: Dataspace with selection
|
||||
// ref_type - IN: Type of reference; default to \c H5R_DATASET_REGION
|
||||
// Exception H5::IdComponentException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
// Function: H5File::getId
|
||||
///\brief Get the id of this file
|
||||
///\return File identifier
|
||||
// Modification:
|
||||
// May 2008 - BMR
|
||||
// Class hierarchy is revised to address bugzilla 1068. Class
|
||||
// AbstractDS and Attribute are moved out of H5Object. In
|
||||
// addition, member IdComponent::id is moved into subclasses, and
|
||||
// IdComponent::getId now becomes pure virtual function.
|
||||
// Programmer Binh-Minh Ribler - May, 2008
|
||||
//--------------------------------------------------------------------------
|
||||
void H5File::p_reference(void* ref, const char* name, hid_t space_id, H5R_type_t ref_type) const
|
||||
hid_t H5File::getId() const
|
||||
{
|
||||
herr_t ret_value = H5Rcreate(ref, getId(), name, ref_type, space_id);
|
||||
if (ret_value < 0)
|
||||
{
|
||||
throw IdComponentException("", "H5Rcreate failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::reference
|
||||
///\brief Creates a reference to an HDF5 object or a dataset region.
|
||||
///\param ref - IN: Reference pointer
|
||||
///\param name - IN: Name of the object to be referenced
|
||||
///\param dataspace - IN: Dataspace with selection
|
||||
///\param ref_type - IN: Type of reference to query, valid values are:
|
||||
/// \li \c H5R_OBJECT \tReference is an object reference.
|
||||
/// \li \c H5R_DATASET_REGION \tReference is a dataset region
|
||||
/// reference. - this is the default
|
||||
///\exception H5::IdComponentException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void H5File::reference(void* ref, const char* name, const DataSpace& dataspace, H5R_type_t ref_type) const
|
||||
{
|
||||
try {
|
||||
p_reference(ref, name, dataspace.getId(), ref_type);
|
||||
}
|
||||
catch (IdComponentException E) {
|
||||
throw IdComponentException("H5File::reference", E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::reference
|
||||
///\brief This is an overloaded function, provided for your convenience.
|
||||
/// It differs from the above function in that it only creates
|
||||
/// a reference to an HDF5 object, not to a dataset region.
|
||||
///\param ref - IN: Reference pointer
|
||||
///\param name - IN: Name of the object to be referenced - \c char pointer
|
||||
///\exception H5::IdComponentException
|
||||
///\par Description
|
||||
// This function passes H5R_OBJECT and -1 to the protected
|
||||
// function for it to pass to the C API H5Rcreate
|
||||
// to create a reference to the named object.
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void H5File::reference(void* ref, const char* name) const
|
||||
{
|
||||
try {
|
||||
p_reference(ref, name, -1, H5R_OBJECT);
|
||||
}
|
||||
catch (IdComponentException E) {
|
||||
throw IdComponentException("H5File::reference", E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::reference
|
||||
///\brief This is an overloaded function, provided for your convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for the object's name.
|
||||
///\param ref - IN: Reference pointer
|
||||
///\param name - IN: Name of the object to be referenced - \c std::string
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void H5File::reference(void* ref, const H5std_string& name) const
|
||||
{
|
||||
reference(ref, name.c_str());
|
||||
}
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::p_get_obj_type (protected)
|
||||
// Purpose Retrieves the type of object that an object reference points to.
|
||||
// Parameters
|
||||
// ref - IN: Reference to query
|
||||
// ref_type - IN: Type of reference to query
|
||||
// Return An object type, which can be one of the following:
|
||||
// H5G_LINK Object is a symbolic link.
|
||||
// H5G_GROUP Object is a group.
|
||||
// H5G_DATASET Object is a dataset.
|
||||
// H5G_TYPE Object is a named datatype
|
||||
// Exception H5::IdComponentException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
H5G_obj_t H5File::p_get_obj_type(void *ref, H5R_type_t ref_type) const
|
||||
{
|
||||
H5G_obj_t obj_type = H5Rget_obj_type1(getId(), ref_type, ref);
|
||||
|
||||
if (obj_type == H5G_UNKNOWN)
|
||||
{
|
||||
throw IdComponentException("", "H5Rget_obj_type failed");
|
||||
}
|
||||
return(obj_type);
|
||||
}
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::p_get_region (protected)
|
||||
// Purpose Retrieves a dataspace with the region pointed to selected.
|
||||
// Parameters
|
||||
// ref_type - IN: Type of reference to get region of - default
|
||||
// to H5R_DATASET_REGION
|
||||
// ref - IN: Reference to get region of
|
||||
// Return Dataspace id
|
||||
// Exception H5::IdComponentException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
hid_t H5File::p_get_region(void *ref, H5R_type_t ref_type) const
|
||||
{
|
||||
hid_t space_id = H5Rget_region(getId(), ref_type, ref);
|
||||
if (space_id < 0)
|
||||
{
|
||||
throw IdComponentException("", "H5Rget_region failed");
|
||||
}
|
||||
return(space_id);
|
||||
return(id);
|
||||
}
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::getLocId
|
||||
// Purpose: Get the id of this file
|
||||
@@ -716,23 +549,20 @@ hid_t H5File::getLocId() const
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::getId
|
||||
// Purpose: Get the id of this attribute
|
||||
// Modification:
|
||||
// May 2008 - BMR
|
||||
// Class hierarchy is revised to address bugzilla 1068. Class
|
||||
// AbstractDS and Attribute are moved out of H5Object. In
|
||||
// addition, member IdComponent::id is moved into subclasses, and
|
||||
// IdComponent::getId now becomes pure virtual function.
|
||||
// Programmer Binh-Minh Ribler - May, 2008
|
||||
// Function: H5File::reopen
|
||||
// Purpose: Reopens this file.
|
||||
// Exception H5::FileIException
|
||||
// Description
|
||||
// This function is replaced by the above function reOpen.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
hid_t H5File::getId() const
|
||||
void H5File::reopen()
|
||||
{
|
||||
return(id);
|
||||
H5File::reOpen();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::p_setId
|
||||
// Function: H5File::p_setId (protected)
|
||||
///\brief Sets the identifier of this object to a new value.
|
||||
///
|
||||
///\exception H5::IdComponentException when the attempt to close the HDF5
|
||||
@@ -755,6 +585,7 @@ void H5File::p_setId(const hid_t new_id)
|
||||
// reset object's id to the given id
|
||||
id = new_id;
|
||||
}
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::close
|
||||
@@ -773,7 +604,7 @@ void H5File::close()
|
||||
throw FileIException("H5File::close", "H5Fclose failed");
|
||||
}
|
||||
// reset the id
|
||||
id = 0;
|
||||
id = H5I_INVALID_HID;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,14 +14,19 @@
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#ifndef _H5File_H
|
||||
#define _H5File_H
|
||||
#ifndef __H5File_H
|
||||
#define __H5File_H
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
#endif
|
||||
|
||||
class H5_DLLCPP H5File : public IdComponent, public CommonFG {
|
||||
/*! \class H5File
|
||||
\brief Class H5File represents an HDF5 file.
|
||||
|
||||
It inherits from H5Location and CommonFG.
|
||||
*/
|
||||
class H5_DLLCPP H5File : public H5Location, public CommonFG {
|
||||
public:
|
||||
// Creates or opens an HDF5 file.
|
||||
H5File( const char* name, unsigned int flags,
|
||||
@@ -40,18 +45,12 @@ class H5_DLLCPP H5File : public IdComponent, public CommonFG {
|
||||
// Close this file.
|
||||
virtual void close();
|
||||
|
||||
// Flushes all buffers associated with this file to disk
|
||||
void flush(H5F_scope_t scope) const;
|
||||
|
||||
// Gets the access property list of this file.
|
||||
FileAccPropList getAccessPlist() const;
|
||||
|
||||
// Gets the creation property list of this file.
|
||||
FileCreatPropList getCreatePlist() const;
|
||||
|
||||
// Gets the name of this file.
|
||||
H5std_string getFileName() const;
|
||||
|
||||
// Retrieves the file size of an opened file.
|
||||
hsize_t getFileSize() const;
|
||||
|
||||
@@ -67,17 +66,10 @@ class H5_DLLCPP H5File : public IdComponent, public CommonFG {
|
||||
// and datatypes) in the same file.
|
||||
void getObjIDs(unsigned types, size_t max_objs, hid_t *oid_list) const;
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
// Retrieves the type of object that an object reference points to.
|
||||
H5G_obj_t getObjType(void *ref, H5R_type_t ref_type = H5R_OBJECT) const;
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
// Retrieves a dataspace with the region pointed to selected.
|
||||
DataSpace getRegion(void *ref, H5R_type_t ref_type = H5R_DATASET_REGION) const;
|
||||
|
||||
// Returns the pointer to the file handle of the low-level file driver.
|
||||
void getVFDHandle(FileAccPropList& fapl, void **file_handle) const;
|
||||
void getVFDHandle(void **file_handle) const;
|
||||
void getVFDHandle(const FileAccPropList& fapl, void **file_handle) const;
|
||||
void getVFDHandle(FileAccPropList& fapl, void **file_handle) const; // kept for backward compatibility
|
||||
|
||||
// Determines if a file, specified by its name, is in HDF5 format
|
||||
static bool isHdf5(const char* name );
|
||||
@@ -85,24 +77,21 @@ class H5_DLLCPP H5File : public IdComponent, public CommonFG {
|
||||
|
||||
// Reopens this file.
|
||||
void reOpen(); // added for better name
|
||||
void reopen();
|
||||
|
||||
// Creates a reference to a named HDF5 object or to a dataset region
|
||||
// in this object.
|
||||
void reference(void* ref, const char* name, const DataSpace& dataspace,
|
||||
H5R_type_t ref_type = H5R_DATASET_REGION) const;
|
||||
void reference(void* ref, const char* name) const;
|
||||
void reference(void* ref, const H5std_string& name) const;
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
void reopen(); // obsolete in favor of reOpen()
|
||||
|
||||
// Returns this class name
|
||||
// Gets the file id
|
||||
virtual hid_t getLocId() const;
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass () const { return("H5File"); }
|
||||
|
||||
// Throw file exception.
|
||||
virtual void throwException(const H5std_string& func_name, const H5std_string& msg) const;
|
||||
|
||||
// Gets the file id
|
||||
virtual hid_t getLocId() const;
|
||||
|
||||
// Default constructor
|
||||
H5File();
|
||||
|
||||
@@ -115,34 +104,21 @@ class H5_DLLCPP H5File : public IdComponent, public CommonFG {
|
||||
// H5File destructor.
|
||||
virtual ~H5File();
|
||||
|
||||
protected:
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
// Sets the HDF5 file id.
|
||||
virtual void p_setId(const hid_t new_id);
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
private:
|
||||
hid_t id; // HDF5 file id
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
// This function is private and contains common code between the
|
||||
// constructors taking a string or a char*
|
||||
void p_get_file( const char* name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist );
|
||||
|
||||
// Creates a reference to an HDF5 object or a dataset region.
|
||||
void p_reference(void* ref, const char* name, hid_t space_id, H5R_type_t ref_type) const;
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
// Retrieves the type of object that an object reference points to.
|
||||
H5G_obj_t p_get_obj_type(void *ref, H5R_type_t ref_type) const;
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
// Retrieves a dataspace with the region pointed to selected.
|
||||
hid_t p_get_region(void *ref, H5R_type_t ref_type) const;
|
||||
|
||||
protected:
|
||||
// Sets the HDF5 file id.
|
||||
virtual void p_setId(const hid_t new_id);
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
};
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif // __H5File_H
|
||||
|
||||
@@ -14,13 +14,14 @@
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#ifndef _H5FloatType_H
|
||||
#define _H5FloatType_H
|
||||
#ifndef __H5FloatType_H
|
||||
#define __H5FloatType_H
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
#endif
|
||||
|
||||
//! Class FloatType operates on HDF5 floating point datatype.
|
||||
class H5_DLLCPP FloatType : public AtomType {
|
||||
public:
|
||||
// Creates a floating-point type using a predefined type
|
||||
@@ -53,7 +54,7 @@ class H5_DLLCPP FloatType : public AtomType {
|
||||
// Sets the mantissa normalization of a floating-point datatype.
|
||||
void setNorm( H5T_norm_t norm ) const;
|
||||
|
||||
// Returns this class name
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass () const { return("FloatType"); }
|
||||
|
||||
// Default constructor
|
||||
@@ -71,4 +72,4 @@ class H5_DLLCPP FloatType : public AtomType {
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif // __H5FloatType_H
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace H5 {
|
||||
///\brief Default constructor: creates a stub Group.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
Group::Group() : H5Object(), id(0) {}
|
||||
Group::Group() : H5Object(), id(H5I_INVALID_HID) {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Group copy constructor
|
||||
@@ -79,7 +79,7 @@ hid_t Group::getLocId() const
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Group overloaded constructor
|
||||
///\brief Creates a Group object using the id of an existing group.
|
||||
///\param group_id - IN: Id of an existing group
|
||||
///\param existing_id - IN: Id of an existing group
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
Group::Group(const hid_t existing_id) : H5Object()
|
||||
@@ -90,42 +90,19 @@ Group::Group(const hid_t existing_id) : H5Object()
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Group overload constructor - dereference
|
||||
///\brief Given a reference, ref, to an hdf5 group, creates a Group object
|
||||
///\param obj - IN: Specifying location referenced object is in
|
||||
///\param loc - IN: Specifying location referenced object is in
|
||||
///\param ref - IN: Reference pointer
|
||||
///\param ref_type - IN: Reference type - default to H5R_OBJECT
|
||||
///\param plist - IN: Property list - default to PropList::DEFAULT
|
||||
///\exception H5::ReferenceException
|
||||
///\par Description
|
||||
/// \c obj can be DataSet, Group, or named DataType, that
|
||||
/// is a datatype that has been named by DataType::commit.
|
||||
// Programmer Binh-Minh Ribler - Oct, 2006
|
||||
//--------------------------------------------------------------------------
|
||||
Group::Group(H5Object& obj, const void* ref, H5R_type_t ref_type) : H5Object()
|
||||
Group::Group(const H5Location& loc, const void* ref, H5R_type_t ref_type, const PropList& plist) : H5Object(), id(H5I_INVALID_HID)
|
||||
{
|
||||
try {
|
||||
id = p_dereference(obj.getId(), ref, ref_type);
|
||||
} catch (ReferenceException deref_error) {
|
||||
throw ReferenceException("Group constructor - located by an H5Object",
|
||||
deref_error.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Group overload constructor - dereference
|
||||
///\brief Given a reference, ref, to an hdf5 group, creates a Group object
|
||||
///\param h5file - IN: Location referenced object is in
|
||||
///\param ref - IN: Reference pointer
|
||||
///\param ref_type - IN: Reference type - default to H5R_OBJECT
|
||||
///\exception H5::ReferenceException
|
||||
// Programmer Binh-Minh Ribler - Oct, 2006
|
||||
//--------------------------------------------------------------------------
|
||||
Group::Group(H5File& h5file, const void* ref, H5R_type_t ref_type) : H5Object()
|
||||
{
|
||||
try {
|
||||
id = p_dereference(h5file.getId(), ref, ref_type);
|
||||
} catch (ReferenceException deref_error) {
|
||||
throw ReferenceException("Group constructor - located by an H5File",
|
||||
deref_error.getDetailMsg());
|
||||
}
|
||||
id = H5Location::p_dereference(loc.getId(), ref, ref_type, plist, "constructor - by dereference");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -134,75 +111,25 @@ Group::Group(H5File& h5file, const void* ref, H5R_type_t ref_type) : H5Object()
|
||||
///\param attr - IN: Specifying location where the referenced object is in
|
||||
///\param ref - IN: Reference pointer
|
||||
///\param ref_type - IN: Reference type - default to H5R_OBJECT
|
||||
///\param plist - IN: Property list - default to PropList::DEFAULT
|
||||
///\exception H5::ReferenceException
|
||||
// Programmer Binh-Minh Ribler - Oct, 2006
|
||||
//--------------------------------------------------------------------------
|
||||
Group::Group(Attribute& attr, const void* ref, H5R_type_t ref_type) : H5Object()
|
||||
Group::Group(const Attribute& attr, const void* ref, H5R_type_t ref_type, const PropList& plist) : H5Object(), id(H5I_INVALID_HID)
|
||||
{
|
||||
try {
|
||||
id = p_dereference(attr.getId(), ref, ref_type);
|
||||
} catch (ReferenceException deref_error) {
|
||||
throw ReferenceException("Group constructor - located by an Attribute",
|
||||
deref_error.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Group::getObjType
|
||||
///\brief Retrieves the type of object that an object reference points to.
|
||||
///\param ref - IN: Reference to query
|
||||
///\param ref_type - IN: Type of reference to query, valid values are:
|
||||
/// \li \c H5R_OBJECT \tReference is an object reference.
|
||||
/// \li \c H5R_DATASET_REGION \tReference is a dataset region reference.
|
||||
///\return An object type, which can be one of the following:
|
||||
/// H5G_LINK Object is a symbolic link.
|
||||
/// H5G_GROUP Object is a group.
|
||||
/// H5G_DATASET Object is a dataset.
|
||||
/// H5G_TYPE Object is a named datatype
|
||||
///\exception H5::GroupIException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
H5G_obj_t Group::getObjType(void *ref, H5R_type_t ref_type) const
|
||||
{
|
||||
try {
|
||||
return(p_get_obj_type(ref, ref_type));
|
||||
}
|
||||
catch (IdComponentException E) {
|
||||
throw GroupIException("Group::getObjType", E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Group::getRegion
|
||||
///\brief Retrieves a dataspace with the region pointed to selected.
|
||||
///\param ref - IN: Reference to get region of
|
||||
///\param ref_type - IN: Type of reference to get region of - default
|
||||
///\return DataSpace instance
|
||||
///\exception H5::GroupIException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
DataSpace Group::getRegion(void *ref, H5R_type_t ref_type) const
|
||||
{
|
||||
try {
|
||||
DataSpace dataspace(p_get_region(ref, ref_type));
|
||||
return(dataspace);
|
||||
}
|
||||
catch (IdComponentException E) {
|
||||
throw GroupIException("Group::getRegion", E.getDetailMsg());
|
||||
}
|
||||
id = H5Location::p_dereference(attr.getId(), ref, ref_type, plist, "constructor - by dereference");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Group::getId
|
||||
// Purpose: Get the id of this attribute
|
||||
///\brief Get the id of this group
|
||||
///\return Group identifier
|
||||
// Modification:
|
||||
// May 2008 - BMR
|
||||
// Class hierarchy is revised to address bugzilla 1068. Class
|
||||
// AbstractDS and Attribute are moved out of H5Object. In
|
||||
// addition, member IdComponent::id is moved into subclasses, and
|
||||
// IdComponent::getId now becomes pure virtual function.
|
||||
// Class hierarchy is revised to address bugzilla 1068. Class
|
||||
// AbstractDS and Attribute are moved out of H5Object. In
|
||||
// addition, member IdComponent::id is moved into subclasses, and
|
||||
// IdComponent::getId now becomes pure virtual function.
|
||||
// Programmer Binh-Minh Ribler - May, 2008
|
||||
//--------------------------------------------------------------------------
|
||||
hid_t Group::getId() const
|
||||
@@ -210,16 +137,17 @@ hid_t Group::getId() const
|
||||
return(id);
|
||||
}
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Group::p_setId
|
||||
///\brief Sets the identifier of this object to a new value.
|
||||
///
|
||||
///\exception H5::IdComponentException when the attempt to close the HDF5
|
||||
/// object fails
|
||||
/// object fails
|
||||
// Description:
|
||||
// The underlaying reference counting in the C library ensures
|
||||
// that the current valid id of this object is properly closed.
|
||||
// Then the object's id is reset to the new id.
|
||||
// The underlaying reference counting in the C library ensures
|
||||
// that the current valid id of this object is properly closed.
|
||||
// Then the object's id is reset to the new id.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void Group::p_setId(const hid_t new_id)
|
||||
@@ -234,6 +162,7 @@ void Group::p_setId(const hid_t new_id)
|
||||
// reset object's id to the given id
|
||||
id = new_id;
|
||||
}
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Group::close
|
||||
@@ -252,7 +181,7 @@ void Group::close()
|
||||
throw GroupIException("Group::close", "H5Gclose failed");
|
||||
}
|
||||
// reset the id
|
||||
id = 0;
|
||||
id = H5I_INVALID_HID;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,27 +14,24 @@
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#ifndef _H5Group_H
|
||||
#define _H5Group_H
|
||||
#ifndef __H5Group_H
|
||||
#define __H5Group_H
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
#endif
|
||||
|
||||
/*! \class Group
|
||||
\brief Class Group represents an HDF5 group.
|
||||
|
||||
It inherits many operations from H5Location and CommonFG.
|
||||
*/
|
||||
class H5_DLLCPP Group : public H5Object, public CommonFG {
|
||||
public:
|
||||
// Close this group.
|
||||
virtual void close();
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
// Retrieves the type of object that an object reference points to.
|
||||
H5G_obj_t getObjType(void *ref, H5R_type_t ref_type = H5R_OBJECT) const;
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
// Retrieves a dataspace with the region pointed to selected.
|
||||
DataSpace getRegion(void *ref, H5R_type_t ref_type = H5R_DATASET_REGION) const;
|
||||
|
||||
// Returns this class name
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass () const { return("Group"); }
|
||||
|
||||
// Throw group exception.
|
||||
@@ -44,9 +41,8 @@ class H5_DLLCPP Group : public H5Object, public CommonFG {
|
||||
virtual hid_t getLocId() const;
|
||||
|
||||
// Creates a group by way of dereference.
|
||||
Group(H5Object& obj, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
|
||||
Group(H5File& h5file, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
|
||||
Group(Attribute& attr, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
|
||||
Group(const H5Location& loc, const void* ref, H5R_type_t ref_type = H5R_OBJECT, const PropList& plist = PropList::DEFAULT);
|
||||
Group(const Attribute& attr, const void* ref, H5R_type_t ref_type = H5R_OBJECT, const PropList& plist = PropList::DEFAULT);
|
||||
|
||||
// default constructor
|
||||
Group();
|
||||
@@ -63,14 +59,16 @@ class H5_DLLCPP Group : public H5Object, public CommonFG {
|
||||
// Creates a copy of an existing group using its id.
|
||||
Group( const hid_t group_id );
|
||||
|
||||
private:
|
||||
hid_t id; // HDF5 group id
|
||||
|
||||
protected:
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
// Sets the group id.
|
||||
virtual void p_setId(const hid_t new_id);
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
private:
|
||||
hid_t id; // HDF5 group id
|
||||
};
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif // __H5Group_H
|
||||
|
||||
@@ -13,16 +13,19 @@
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#ifdef H5_VMS
|
||||
#ifdef OLD_HEADER_FILENAME
|
||||
#include <iostream.h>
|
||||
#else
|
||||
#include <iostream>
|
||||
#endif /*H5_VMS*/
|
||||
|
||||
#endif
|
||||
#include <string>
|
||||
|
||||
#include "H5Include.h"
|
||||
#include "H5Exception.h"
|
||||
#include "H5Library.h"
|
||||
#include "H5IdComponent.h"
|
||||
#include "H5DataSpace.h"
|
||||
#include "H5private.h" // for HDmemset
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
@@ -127,9 +130,9 @@ int IdComponent::getCounter() const
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: hdfObjectType
|
||||
// Function: getHDFObjType (static)
|
||||
///\brief Given an id, returns the type of the object.
|
||||
///return a valid HDF object type, which may be one of the following:
|
||||
///\return a valid HDF object type, which may be one of the following:
|
||||
/// \li \c H5I_FILE
|
||||
/// \li \c H5I_GROUP
|
||||
/// \li \c H5I_DATATYPE
|
||||
@@ -142,6 +145,8 @@ int IdComponent::getCounter() const
|
||||
//--------------------------------------------------------------------------
|
||||
H5I_type_t IdComponent::getHDFObjType(const hid_t obj_id)
|
||||
{
|
||||
if (obj_id <= 0)
|
||||
return H5I_BADID; // invalid
|
||||
H5I_type_t id_type = H5Iget_type(obj_id);
|
||||
if (id_type <= H5I_BADID || id_type >= H5I_NTYPES)
|
||||
return H5I_BADID; // invalid
|
||||
@@ -149,6 +154,26 @@ H5I_type_t IdComponent::getHDFObjType(const hid_t obj_id)
|
||||
return id_type; // valid type
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: getHDFObjType
|
||||
///\brief Returns the type of the object. It is an overloaded function
|
||||
/// of the above function.
|
||||
///\return a valid HDF object type, which may be one of the following:
|
||||
/// \li \c H5I_FILE
|
||||
/// \li \c H5I_GROUP
|
||||
/// \li \c H5I_DATATYPE
|
||||
/// \li \c H5I_DATASPACE
|
||||
/// \li \c H5I_DATASET
|
||||
/// \li \c H5I_ATTR
|
||||
/// \li or \c H5I_BADID, if no valid type can be determined or the
|
||||
/// input object id is invalid.
|
||||
// Programmer Binh-Minh Ribler - Mar, 2014
|
||||
//--------------------------------------------------------------------------
|
||||
H5I_type_t IdComponent::getHDFObjType() const
|
||||
{
|
||||
return(getHDFObjType(getId()));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: IdComponent::operator=
|
||||
///\brief Assignment operator.
|
||||
@@ -267,7 +292,7 @@ IdComponent::IdComponent() {}
|
||||
// Description:
|
||||
// This function is protected so that the user applications can
|
||||
// only have access to its code via allowable classes, namely,
|
||||
// H5File and H5Object subclasses.
|
||||
// Attribute and H5Location subclasses.
|
||||
// Programmer Binh-Minh Ribler - Jul, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
H5std_string IdComponent::p_get_file_name() const
|
||||
@@ -285,11 +310,14 @@ H5std_string IdComponent::p_get_file_name() const
|
||||
|
||||
// Call H5Fget_name again to get the actual file name
|
||||
char* name_C = new char[name_size+1]; // temporary C-string for C API
|
||||
HDmemset(name_C, 0, name_size+1); // clear buffer
|
||||
|
||||
name_size = H5Fget_name(temp_id, name_C, name_size+1);
|
||||
|
||||
// Check for failure again
|
||||
if( name_size < 0 )
|
||||
{
|
||||
delete []name_C;
|
||||
throw IdComponentException("", "H5Fget_name failed");
|
||||
}
|
||||
|
||||
@@ -312,6 +340,9 @@ H5std_string IdComponent::p_get_file_name() const
|
||||
//--------------------------------------------------------------------------
|
||||
bool IdComponent::p_valid_id(const hid_t obj_id)
|
||||
{
|
||||
if (obj_id <= 0)
|
||||
return false;
|
||||
|
||||
H5I_type_t id_type = H5Iget_type(obj_id);
|
||||
if (id_type <= H5I_BADID || id_type >= H5I_NTYPES)
|
||||
return false;
|
||||
@@ -319,6 +350,14 @@ bool IdComponent::p_valid_id(const hid_t obj_id)
|
||||
return true;
|
||||
}
|
||||
|
||||
// Notes about IdComponent::id
|
||||
// May 2008 - BMR
|
||||
// Class hierarchy is revised to address bugzilla 1068...
|
||||
// ...member IdComponent::id is moved into subclasses, and
|
||||
// IdComponent::getId now becomes pure virtual function.
|
||||
// (reasons: 1. encountered problems when adding H5Location;
|
||||
// 2. Scott Meyers, item 33)
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
|
||||
@@ -14,16 +14,21 @@
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#ifndef _IdComponent_H
|
||||
#define _IdComponent_H
|
||||
|
||||
// IdComponent represents an HDF5 object that has an identifier.
|
||||
#ifndef __IdComponent_H
|
||||
#define __IdComponent_H
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
#endif
|
||||
|
||||
class DataSpace;
|
||||
/*! \class IdComponent
|
||||
\brief Class IdComponent provides wrappers of the C functions that
|
||||
operate on an HDF5 identifier.
|
||||
|
||||
In most cases, the C library handles these operations and an application
|
||||
rarely needs them.
|
||||
*/
|
||||
class H5_DLLCPP IdComponent {
|
||||
public:
|
||||
// Increment reference counter.
|
||||
@@ -41,11 +46,16 @@ class H5_DLLCPP IdComponent {
|
||||
// Returns an HDF5 object type, given the object id.
|
||||
static H5I_type_t getHDFObjType(const hid_t obj_id);
|
||||
|
||||
// Returns an HDF5 object type of this object.
|
||||
H5I_type_t getHDFObjType() const;
|
||||
|
||||
// Assignment operator.
|
||||
IdComponent& operator=( const IdComponent& rhs );
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
// Gets the identifier of this object.
|
||||
virtual hid_t getId () const = 0;
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
// Sets the identifier of this object to a new value.
|
||||
void setId(const hid_t new_id);
|
||||
@@ -65,7 +75,7 @@ class H5_DLLCPP IdComponent {
|
||||
// <class-name> is returned by fromClass().
|
||||
H5std_string inMemFunc(const char* func_name) const;
|
||||
|
||||
// Returns this class name.
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass() const { return("IdComponent");}
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
@@ -74,11 +84,10 @@ class H5_DLLCPP IdComponent {
|
||||
virtual ~IdComponent();
|
||||
|
||||
protected:
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
// Default constructor.
|
||||
IdComponent();
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
// Gets the name of the file, in which an HDF5 object belongs.
|
||||
H5std_string p_get_file_name() const;
|
||||
|
||||
@@ -96,4 +105,4 @@ class H5_DLLCPP IdComponent {
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif // __IdComponent_H
|
||||
|
||||
@@ -14,13 +14,14 @@
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#ifndef _H5IntType_H
|
||||
#define _H5IntType_H
|
||||
#ifndef __H5IntType_H
|
||||
#define __H5IntType_H
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
#endif
|
||||
|
||||
//! Class IntType operates on HDF5 integer datatype.
|
||||
class H5_DLLCPP IntType : public AtomType {
|
||||
public:
|
||||
// Creates a integer type using a predefined type
|
||||
@@ -35,7 +36,7 @@ class H5_DLLCPP IntType : public AtomType {
|
||||
// Sets the sign proprety for an integer type.
|
||||
void setSign( H5T_sign_t sign ) const;
|
||||
|
||||
// Returns this class name
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass () const { return("IntType"); }
|
||||
|
||||
// Default constructor
|
||||
@@ -53,4 +54,4 @@ class H5_DLLCPP IntType : public AtomType {
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif // __H5IntType_H
|
||||
|
||||
@@ -106,7 +106,7 @@ void H5Library::getLibVersion( unsigned& majnum, unsigned& minnum, unsigned& rel
|
||||
///\par Description
|
||||
/// For information about library version, please refer to
|
||||
/// the C layer Reference Manual at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5.html#Library-VersCheck
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5.html#Library-VersCheck
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Library::checkVersion(unsigned majnum, unsigned minnum, unsigned relnum)
|
||||
@@ -161,7 +161,7 @@ void H5Library::garbageCollect()
|
||||
/// Setting a value of -1 for a limit means no limit of that type.
|
||||
/// For more information on free list limits, please refer to C
|
||||
/// layer Reference Manual at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5.html#Library-SetFreeListLimits
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5.html#Library-SetFreeListLimits
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Library::setFreeListLimits(int reg_global_lim, int reg_list_lim,
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#ifndef _H5Library_H
|
||||
#define _H5Library_H
|
||||
#ifndef __H5Library_H
|
||||
#define __H5Library_H
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
@@ -29,6 +29,12 @@ namespace H5 {
|
||||
// calling H5close
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
/*! \class H5Library
|
||||
\brief Class H5Library operates the HDF5 library globably.
|
||||
|
||||
It is not neccessary to construct an instance of H5Library to use the
|
||||
methods.
|
||||
*/
|
||||
class H5_DLLCPP H5Library {
|
||||
public:
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
@@ -67,4 +73,4 @@ class H5_DLLCPP H5Library {
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif // __H5Library_H
|
||||
|
||||
925
c++/src/H5Location.cpp
Normal file
925
c++/src/H5Location.cpp
Normal file
@@ -0,0 +1,925 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* 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 files COPYING and Copyright.html. COPYING can be found at the root *
|
||||
* of the source code distribution tree; Copyright.html can be found at the *
|
||||
* root level of an installed copy of the electronic HDF5 document set and *
|
||||
* is linked from the top-level documents page. It can also be found at *
|
||||
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "H5Include.h"
|
||||
#include "H5Exception.h"
|
||||
#include "H5IdComponent.h"
|
||||
#include "H5PropList.h"
|
||||
#include "H5Location.h"
|
||||
#include "H5Object.h"
|
||||
#include "H5DcreatProp.h"
|
||||
#include "H5DxferProp.h"
|
||||
#include "H5FaccProp.h"
|
||||
#include "H5FcreatProp.h"
|
||||
#include "H5CommonFG.h"
|
||||
#include "H5DataType.h"
|
||||
#include "H5DataSpace.h"
|
||||
#include "H5AbstractDs.h"
|
||||
#include "H5File.h"
|
||||
#include "H5DataSet.h"
|
||||
#include "H5Attribute.h"
|
||||
#include "H5private.h" // for HDmemset
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
#endif
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
// userAttrOpWrpr simply interfaces between the user's function and the
|
||||
// C library function H5Aiterate2; used to resolve the different prototype
|
||||
// problem. May be moved to Iterator later.
|
||||
extern "C" herr_t userAttrOpWrpr(hid_t loc_id, const char *attr_name,
|
||||
const H5A_info_t *ainfo, void *op_data)
|
||||
{
|
||||
H5std_string s_attr_name = H5std_string( attr_name );
|
||||
#ifdef NO_STATIC_CAST
|
||||
UserData4Aiterate* myData = (UserData4Aiterate *) op_data;
|
||||
#else
|
||||
UserData4Aiterate* myData = static_cast <UserData4Aiterate *> (op_data);
|
||||
#endif
|
||||
myData->op( *myData->location, s_attr_name, myData->opData );
|
||||
return 0;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location default constructor (protected)
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
H5Location::H5Location() : IdComponent() {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location overloaded constructor (protected)
|
||||
// Purpose Creates an H5Location object using the id of an existing HDF5
|
||||
// object.
|
||||
// Parameters object_id - IN: Id of an existing HDF5 object
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
H5Location::H5Location(const hid_t object_id) : IdComponent(object_id) {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location copy constructor
|
||||
///\brief Copy constructor: makes a copy of the original H5Location
|
||||
/// instance.
|
||||
///\param original - IN: H5Location instance to copy
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
H5Location::H5Location( const H5Location& original ) : IdComponent( original ) {}
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::createAttribute
|
||||
///\brief Creates an attribute for a group, dataset, or named datatype.
|
||||
///\param name - IN: Name of the attribute
|
||||
///\param data_type - IN: Datatype for the attribute
|
||||
///\param data_space - IN: Dataspace for the attribute - only simple
|
||||
/// dataspaces are allowed at this time
|
||||
///\param create_plist - IN: Creation property list - default to
|
||||
/// PropList::DEFAULT
|
||||
///\return Attribute instance
|
||||
///\exception H5::AttributeIException
|
||||
///\par Description
|
||||
/// The attribute name specified in \a name must be unique.
|
||||
/// Attempting to create an attribute with the same name as an
|
||||
/// existing attribute will raise an exception, leaving the
|
||||
/// pre-existing attribute intact. To overwrite an existing
|
||||
/// attribute with a new attribute of the same name, first
|
||||
/// delete the existing one with \c H5Location::removeAttr, then
|
||||
/// recreate it with this function.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
Attribute H5Location::createAttribute( const char* name, const DataType& data_type, const DataSpace& data_space, const PropList& create_plist ) const
|
||||
{
|
||||
hid_t type_id = data_type.getId();
|
||||
hid_t space_id = data_space.getId();
|
||||
hid_t plist_id = create_plist.getId();
|
||||
hid_t attr_id = H5Acreate2(getId(), name, type_id, space_id, plist_id, H5P_DEFAULT );
|
||||
|
||||
// If the attribute id is valid, create and return the Attribute object
|
||||
if( attr_id > 0 )
|
||||
{
|
||||
Attribute attr( attr_id );
|
||||
return( attr );
|
||||
}
|
||||
else
|
||||
throw AttributeIException(inMemFunc("createAttribute"), "H5Acreate2 failed");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::createAttribute
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes
|
||||
/// a reference to an \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
Attribute H5Location::createAttribute( const H5std_string& name, const DataType& data_type, const DataSpace& data_space, const PropList& create_plist ) const
|
||||
{
|
||||
return( createAttribute( name.c_str(), data_type, data_space, create_plist ));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::openAttribute
|
||||
///\brief Opens an attribute given its name.
|
||||
///\param name - IN: Name of the attribute
|
||||
///\return Attribute instance
|
||||
///\exception H5::AttributeIException
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
Attribute H5Location::openAttribute( const char* name ) const
|
||||
{
|
||||
hid_t attr_id = H5Aopen(getId(), name, H5P_DEFAULT);
|
||||
if( attr_id > 0 )
|
||||
{
|
||||
Attribute attr( attr_id );
|
||||
return( attr );
|
||||
}
|
||||
else
|
||||
{
|
||||
throw AttributeIException(inMemFunc("openAttribute"), "H5Aopen failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::openAttribute
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes
|
||||
/// a reference to an \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
Attribute H5Location::openAttribute( const H5std_string& name ) const
|
||||
{
|
||||
return( openAttribute( name.c_str()) );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::openAttribute
|
||||
///\brief Opens an attribute given its index.
|
||||
///\param idx - IN: Index of the attribute, a 0-based, non-negative integer
|
||||
///\return Attribute instance
|
||||
///\exception H5::AttributeIException
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
Attribute H5Location::openAttribute( const unsigned int idx ) const
|
||||
{
|
||||
hid_t attr_id = H5Aopen_by_idx(getId(), ".", H5_INDEX_CRT_ORDER,
|
||||
H5_ITER_INC, (hsize_t)idx, H5P_DEFAULT, H5P_DEFAULT);
|
||||
if( attr_id > 0 )
|
||||
{
|
||||
Attribute attr( attr_id );
|
||||
return( attr );
|
||||
}
|
||||
else
|
||||
{
|
||||
throw AttributeIException(inMemFunc("openAttribute"), "H5Aopen_by_idx failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::iterateAttrs
|
||||
///\brief Iterates a user's function over all the attributes of an H5
|
||||
/// object, which may be a group, dataset or named datatype.
|
||||
///\param user_op - IN: User's function to operate on each attribute
|
||||
///\param _idx - IN/OUT: Starting (IN) and ending (OUT) attribute indices
|
||||
///\param op_data - IN: User's data to pass to user's operator function
|
||||
///\return Returned value of the last operator if it was non-zero, or
|
||||
/// zero if all attributes were processed
|
||||
///\exception H5::AttributeIException
|
||||
///\par Description
|
||||
/// The signature of user_op is
|
||||
/// void (*)(H5::H5Location&, H5std_string, void*).
|
||||
/// For information, please refer to the C layer Reference Manual
|
||||
/// at:
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5A.html#Annot-Iterate
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
int H5Location::iterateAttrs( attr_operator_t user_op, unsigned *_idx, void *op_data )
|
||||
{
|
||||
// store the user's function and data
|
||||
UserData4Aiterate* userData = new UserData4Aiterate;
|
||||
userData->opData = op_data;
|
||||
userData->op = user_op;
|
||||
userData->location = this;
|
||||
|
||||
// call the C library routine H5Aiterate2 to iterate the attributes
|
||||
hsize_t idx = _idx ? (hsize_t)*_idx : 0;
|
||||
int ret_value = H5Aiterate2(getId(), H5_INDEX_NAME, H5_ITER_INC, &idx,
|
||||
userAttrOpWrpr, (void *) userData);
|
||||
|
||||
// release memory
|
||||
delete userData;
|
||||
|
||||
if( ret_value >= 0 ) {
|
||||
/* Pass back update index value to calling code */
|
||||
if (_idx)
|
||||
*_idx = (unsigned)idx;
|
||||
|
||||
return( ret_value );
|
||||
}
|
||||
else // raise exception when H5Aiterate returns a negative value
|
||||
throw AttributeIException(inMemFunc("iterateAttrs"), "H5Aiterate2 failed");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::getNumAttrs
|
||||
///\brief Returns the number of attributes attached to this HDF5 object.
|
||||
///\return Number of attributes
|
||||
///\exception H5::AttributeIException
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
int H5Location::getNumAttrs() const
|
||||
{
|
||||
H5O_info_t oinfo; /* Object info */
|
||||
|
||||
if(H5Oget_info(getId(), &oinfo) < 0)
|
||||
throw AttributeIException(inMemFunc("getNumAttrs"), "H5Oget_info failed");
|
||||
else
|
||||
return( (int)oinfo.num_attrs );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::attrExists
|
||||
///\brief Checks whether the named attribute exists at this location.
|
||||
///\param name - IN: Name of the attribute to be queried
|
||||
///\exception H5::AttributeIException
|
||||
// Programmer Binh-Minh Ribler - 2013
|
||||
//--------------------------------------------------------------------------
|
||||
bool H5Location::attrExists(const char* name) const
|
||||
{
|
||||
// Call C routine H5Aexists to determine whether an attribute exists
|
||||
// at this location, which could be specified by a file, group, dataset,
|
||||
// or named datatype.
|
||||
herr_t ret_value = H5Aexists(getId(), name);
|
||||
if( ret_value > 0 )
|
||||
return true;
|
||||
else if(ret_value == 0)
|
||||
return false;
|
||||
else // Raise exception when H5Aexists returns a negative value
|
||||
throw AttributeIException(inMemFunc("attrExists"), "H5Aexists failed");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::attrExists
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes
|
||||
/// a reference to an \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
bool H5Location::attrExists(const H5std_string& name) const
|
||||
{
|
||||
return(attrExists(name.c_str()));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::removeAttr
|
||||
///\brief Removes the named attribute from this object.
|
||||
///\param name - IN: Name of the attribute to be removed
|
||||
///\exception H5::AttributeIException
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Location::removeAttr( const char* name ) const
|
||||
{
|
||||
herr_t ret_value = H5Adelete(getId(), name);
|
||||
if( ret_value < 0 )
|
||||
throw AttributeIException(inMemFunc("removeAttr"), "H5Adelete failed");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::removeAttr
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes
|
||||
/// a reference to an \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Location::removeAttr( const H5std_string& name ) const
|
||||
{
|
||||
removeAttr( name.c_str() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::renameAttr
|
||||
///\brief Renames the named attribute from this object.
|
||||
///\param oldname - IN: Name of the attribute to be renamed
|
||||
///\param newname - IN: New name ame of the attribute
|
||||
///\exception H5::AttributeIException
|
||||
// Programmer Binh-Minh Ribler - Mar, 2005
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Location::renameAttr(const char* oldname, const char* newname) const
|
||||
{
|
||||
herr_t ret_value = H5Arename(getId(), oldname, newname);
|
||||
if (ret_value < 0)
|
||||
throw AttributeIException(inMemFunc("renameAttr"), "H5Arename failed");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::renameAttr
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes
|
||||
/// a reference to an \c H5std_string for the names.
|
||||
// Programmer Binh-Minh Ribler - Mar, 2005
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Location::renameAttr(const H5std_string& oldname, const H5std_string& newname) const
|
||||
{
|
||||
renameAttr (oldname.c_str(), newname.c_str());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::flush
|
||||
///\brief Flushes all buffers associated with a location to disk.
|
||||
///\param scope - IN: Specifies the scope of the flushing action,
|
||||
/// which can be either of these values:
|
||||
/// \li \c H5F_SCOPE_GLOBAL - Flushes the entire virtual file
|
||||
/// \li \c H5F_SCOPE_LOCAL - Flushes only the specified file
|
||||
///\exception H5::Exception
|
||||
///\par Description
|
||||
/// This location is used to identify the file to be flushed.
|
||||
// Programmer Binh-Minh Ribler - 2012
|
||||
// Modification
|
||||
// Sep 2012 - BMR
|
||||
// Moved from H5File/H5Object
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Location::flush(H5F_scope_t scope) const
|
||||
{
|
||||
herr_t ret_value = H5Fflush(getId(), scope);
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw LocationException(inMemFunc("flush"), "H5Fflush failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::getFileName
|
||||
///\brief Gets the name of the file, in which this HDF5 object belongs.
|
||||
///\return File name
|
||||
///\exception H5::LocationException
|
||||
// Programmer Binh-Minh Ribler - Jul, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
H5std_string H5Location::getFileName() const
|
||||
{
|
||||
try {
|
||||
return(p_get_file_name());
|
||||
}
|
||||
catch (LocationException E) {
|
||||
throw FileIException(inMemFunc("getFileName"), E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::setComment
|
||||
///\brief Sets or resets the comment for an object specified by its name.
|
||||
///\param name - IN: Name of the object
|
||||
///\param comment - IN: New comment
|
||||
///\exception H5::LocationException
|
||||
///\par Description
|
||||
/// If \a comment is an empty string or a null pointer, the comment
|
||||
/// message is removed from the object.
|
||||
/// Comments should be relatively short, null-terminated, ASCII
|
||||
/// strings. They can be attached to any object that has an
|
||||
/// object header, e.g., data sets, groups, named data types,
|
||||
/// and data spaces, but not symbolic links.
|
||||
// Programmer Binh-Minh Ribler - 2000 (moved from CommonFG, Sep 2013)
|
||||
// Modification
|
||||
// 2007: QAK modified to use H5O APIs; however the first parameter is
|
||||
// no longer just file or group, this function should be moved
|
||||
// to another class to accommodate attribute, dataset, and named
|
||||
// datatype. - BMR
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Location::setComment(const char* name, const char* comment) const
|
||||
{
|
||||
herr_t ret_value = H5Oset_comment_by_name(getId(), name, comment, H5P_DEFAULT);
|
||||
if( ret_value < 0 )
|
||||
throw LocationException(inMemFunc("setComment"), "H5Oset_comment_by_name failed");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::setComment
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c H5std_string for \a name and \a comment.
|
||||
// Programmer Binh-Minh Ribler - 2000 (moved from CommonFG, Sep 2013)
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Location::setComment(const H5std_string& name, const H5std_string& comment) const
|
||||
{
|
||||
setComment(name.c_str(), comment.c_str());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::setComment
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it doesn't take
|
||||
/// an object name.
|
||||
// Programmer Binh-Minh Ribler - Sep 2013
|
||||
// Modification
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Location::setComment(const char* comment) const
|
||||
{
|
||||
herr_t ret_value = H5Oset_comment_by_name(getId(), ".", comment, H5P_DEFAULT);
|
||||
if( ret_value < 0 )
|
||||
throw LocationException(inMemFunc("setComment"), "H5Oset_comment_by_name failed");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::setComment
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c H5std_string for \a comment.
|
||||
// Programmer Binh-Minh Ribler - Sep 2013
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Location::setComment(const H5std_string& comment) const
|
||||
{
|
||||
setComment(comment.c_str());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::removeComment
|
||||
///\brief Removes the comment from an object specified by its name.
|
||||
///\param name - IN: Name of the object
|
||||
///\exception H5::LocationException
|
||||
// Programmer Binh-Minh Ribler - May 2005 (moved from CommonFG, Sep 2013)
|
||||
// 2007: QAK modified to use H5O APIs; however the first parameter is
|
||||
// no longer just file or group, this function should be moved
|
||||
// to another class to accommodate attribute, dataset, and named
|
||||
// datatype. - BMR
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Location::removeComment(const char* name) const
|
||||
{
|
||||
herr_t ret_value = H5Oset_comment_by_name(getId(), name, NULL, H5P_DEFAULT);
|
||||
if( ret_value < 0 )
|
||||
throw LocationException(inMemFunc("removeComment"), "H5Oset_comment_by_name failed");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::removeComment
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - May 2005 (moved from CommonFG, Sep 2013)
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Location::removeComment(const H5std_string& name) const
|
||||
{
|
||||
removeComment (name.c_str());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::getComment
|
||||
///\brief Retrieves the comment for this location, returning its length.
|
||||
///\param name - IN: Name of the object
|
||||
///\param buf_size - IN: Length of the comment to retrieve
|
||||
///\param comment - OUT: Retrieved comment
|
||||
///\return Actual length of the comment
|
||||
///\exception H5::LocationException
|
||||
///\par Description
|
||||
/// This function retrieves \a buf_size characters of the comment
|
||||
/// including the null terminator. Thus, if the actual length
|
||||
/// of the comment is more than buf_size-1, the retrieved comment
|
||||
/// will be truncated to accommodate the null terminator.
|
||||
// Programmer Binh-Minh Ribler - Mar 2014
|
||||
//--------------------------------------------------------------------------
|
||||
ssize_t H5Location::getComment(const char* name, size_t buf_size, char* comment) const
|
||||
{
|
||||
// H5Oget_comment_by_name will get buf_size chars of the comment including
|
||||
// the null terminator
|
||||
ssize_t comment_len;
|
||||
comment_len = H5Oget_comment_by_name(getId(), name, comment, buf_size, H5P_DEFAULT);
|
||||
|
||||
// If H5Oget_comment_by_name returns a negative value, raise an exception
|
||||
if (comment_len < 0)
|
||||
{
|
||||
throw LocationException("H5Location::getComment", "H5Oget_comment_by_name failed");
|
||||
}
|
||||
// If the comment is longer than the provided buffer size, the C library
|
||||
// will not null terminate it
|
||||
if ((size_t)comment_len >= buf_size)
|
||||
comment[buf_size-1] = '\0';
|
||||
|
||||
// Return the actual comment length, which might be different from buf_size
|
||||
return(comment_len);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::getComment
|
||||
///\brief Returns the comment as \a string for this location,
|
||||
/// returning its length.
|
||||
///\param name - IN: Name of the object
|
||||
///\param buf_size - IN: Length of the comment to retrieve, default to 0
|
||||
///\return Comment string
|
||||
///\exception H5::LocationException
|
||||
// Programmer Binh-Minh Ribler - 2000 (moved from CommonFG, Sep 2013)
|
||||
//--------------------------------------------------------------------------
|
||||
H5std_string H5Location::getComment(const char* name, size_t buf_size) const
|
||||
{
|
||||
// Initialize string to "", so that if there is no comment, the returned
|
||||
// string will be empty
|
||||
H5std_string comment("");
|
||||
|
||||
// Preliminary call to get the comment's length
|
||||
ssize_t comment_len = H5Oget_comment_by_name(getId(), name, NULL, (size_t)0, H5P_DEFAULT);
|
||||
|
||||
// If H5Oget_comment_by_name returns a negative value, raise an exception
|
||||
if (comment_len < 0)
|
||||
{
|
||||
throw LocationException("H5Location::getComment", "H5Oget_comment_by_name failed");
|
||||
}
|
||||
|
||||
// If comment exists, calls C routine again to get it
|
||||
else if (comment_len > 0)
|
||||
{
|
||||
size_t tmp_len = buf_size;
|
||||
|
||||
// If buffer size is not provided, use comment length
|
||||
if (tmp_len == 0)
|
||||
tmp_len = comment_len;
|
||||
|
||||
// Temporary buffer for char* comment
|
||||
char* comment_C = new char[tmp_len+1];
|
||||
HDmemset(comment_C, 0, tmp_len+1); // clear buffer
|
||||
|
||||
// Used overloaded function
|
||||
ssize_t comment_len = getComment(name, tmp_len+1, comment_C);
|
||||
if (comment_len < 0)
|
||||
{
|
||||
delete []comment_C;
|
||||
throw LocationException("H5Location::getComment", "H5Oget_comment_by_name failed");
|
||||
}
|
||||
|
||||
// Convert the C comment to return
|
||||
comment = comment_C;
|
||||
|
||||
// Clean up resource
|
||||
delete []comment_C;
|
||||
}
|
||||
|
||||
// Return the string comment
|
||||
return(comment);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::getComment
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000 (moved from CommonFG, Sep 2013)
|
||||
//--------------------------------------------------------------------------
|
||||
H5std_string H5Location::getComment(const H5std_string& name, size_t buf_size) const
|
||||
{
|
||||
return(getComment(name.c_str(), buf_size));
|
||||
}
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::p_reference (protected)
|
||||
// Purpose Creates a reference to an HDF5 object or a dataset region.
|
||||
// Parameters
|
||||
// name - IN: Name of the object to be referenced
|
||||
// dataspace - IN: Dataspace with selection
|
||||
// ref_type - IN: Type of reference; default to \c H5R_DATASET_REGION
|
||||
// Exception H5::ReferenceException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Location::p_reference(void* ref, const char* name, hid_t space_id, H5R_type_t ref_type) const
|
||||
{
|
||||
herr_t ret_value = H5Rcreate(ref, getId(), name, ref_type, space_id);
|
||||
if (ret_value < 0)
|
||||
{
|
||||
throw ReferenceException(inMemFunc("reference"), "H5Rcreate failed");
|
||||
}
|
||||
}
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::reference
|
||||
///\brief Creates a reference to an HDF5 object or a dataset region.
|
||||
///\param ref - IN: Reference pointer
|
||||
///\param name - IN: Name of the object to be referenced
|
||||
///\param dataspace - IN: Dataspace with selection
|
||||
///\param ref_type - IN: Type of reference to query, valid values are:
|
||||
/// \li \c H5R_OBJECT - Reference is an object reference.
|
||||
/// \li \c H5R_DATASET_REGION - Reference is a dataset region
|
||||
/// reference. (default)
|
||||
///\exception H5::ReferenceException
|
||||
///\note This method is more suitable for a dataset region reference.
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Location::reference(void* ref, const char* name, const DataSpace& dataspace, H5R_type_t ref_type) const
|
||||
{
|
||||
try {
|
||||
p_reference(ref, name, dataspace.getId(), ref_type);
|
||||
}
|
||||
catch (ReferenceException E) {
|
||||
throw ReferenceException(inMemFunc("reference"), E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::reference
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c H5std_string for \a name.
|
||||
///\param ref - IN: Reference pointer
|
||||
///\param name - IN: Name of the object to be referenced
|
||||
///\param dataspace - IN: Dataspace with selection
|
||||
///\param ref_type - IN: Type of reference to query, valid values are:
|
||||
/// \li \c H5R_OBJECT - Reference is an object reference.
|
||||
/// \li \c H5R_DATASET_REGION - Reference is a dataset region
|
||||
/// reference. (default)
|
||||
///\exception H5::ReferenceException
|
||||
///\note This method is more suitable for a dataset region reference.
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Location::reference(void* ref, const H5std_string& name, const DataSpace& dataspace, H5R_type_t ref_type) const
|
||||
{
|
||||
try {
|
||||
p_reference(ref, name.c_str(), dataspace.getId(), ref_type);
|
||||
}
|
||||
catch (ReferenceException E) {
|
||||
throw ReferenceException(inMemFunc("reference"), E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::reference
|
||||
///\brief This is an overloaded function, provided for your convenience.
|
||||
/// It differs from the above function in that it does not take
|
||||
/// a DataSpace object and the reference type must be specified.
|
||||
///\param ref - IN: Reference pointer
|
||||
///\param name - IN: Name of the object to be referenced
|
||||
///\param ref_type - IN: Type of reference to query, valid values are:
|
||||
/// \li \c H5R_OBJECT - Reference is an object reference (default)
|
||||
/// \li \c H5R_DATASET_REGION - Reference is a dataset region
|
||||
///\exception H5::ReferenceException
|
||||
///\note This method is more suitable for an object reference.
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Location::reference(void* ref, const char* name, H5R_type_t ref_type) const
|
||||
{
|
||||
try {
|
||||
p_reference(ref, name, -1, ref_type);
|
||||
}
|
||||
catch (ReferenceException E) {
|
||||
throw ReferenceException(inMemFunc("reference"), E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::reference
|
||||
///\brief This is an overloaded function, provided for your convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c H5std_string for the object's name.
|
||||
///\param ref - IN: Reference pointer
|
||||
///\param name - IN: Name of the object to be referenced - \c H5std_string
|
||||
///\param ref_type - IN: Type of reference to query, valid values are:
|
||||
/// \li \c H5R_OBJECT - Reference is an object reference (default)
|
||||
/// \li \c H5R_DATASET_REGION - Reference is a dataset region
|
||||
///\note This method is more suitable for an object reference.
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Location::reference(void* ref, const H5std_string& name, H5R_type_t ref_type) const
|
||||
{
|
||||
reference(ref, name.c_str(), ref_type);
|
||||
}
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::p_dereference (protected)
|
||||
// Purpose Dereference a ref into an hdf5 object.
|
||||
// Parameters
|
||||
// loc_id - IN: An hdf5 identifier specifying the location of the
|
||||
// referenced object
|
||||
// ref - IN: Reference pointer
|
||||
// ref_type - IN: Reference type
|
||||
// plist - IN: Property list - default to PropList::DEFAULT
|
||||
// from_func - IN: Name of the calling function
|
||||
// Exception H5::ReferenceException
|
||||
// Programmer Binh-Minh Ribler - Oct, 2006
|
||||
// Modification
|
||||
// May 2008 - BMR
|
||||
// Moved from IdComponent.
|
||||
//--------------------------------------------------------------------------
|
||||
hid_t H5Location::p_dereference(hid_t loc_id, const void* ref, H5R_type_t ref_type, const PropList& plist, const char* from_func)
|
||||
{
|
||||
hid_t plist_id;
|
||||
if (p_valid_id(plist.getId()))
|
||||
plist_id = plist.getId();
|
||||
else
|
||||
plist_id = H5P_DEFAULT;
|
||||
|
||||
hid_t temp_id = H5Rdereference2(loc_id, plist_id, ref_type, ref);
|
||||
if (temp_id < 0)
|
||||
{
|
||||
throw ReferenceException(inMemFunc(from_func), "H5Rdereference failed");
|
||||
}
|
||||
|
||||
return(temp_id);
|
||||
}
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::dereference
|
||||
///\brief Dereferences a reference into an HDF5 object, given an HDF5 object.
|
||||
///\param loc - IN: Location of the referenced object
|
||||
///\param ref - IN: Reference pointer
|
||||
///\param ref_type - IN: Reference type
|
||||
///\param plist - IN: Property list - default to PropList::DEFAULT
|
||||
///\exception H5::ReferenceException
|
||||
// Programmer Binh-Minh Ribler - Oct, 2006
|
||||
// Modification
|
||||
// May, 2008
|
||||
// Corrected missing parameters. - BMR
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Location::dereference(const H5Location& loc, const void* ref, H5R_type_t ref_type, const PropList& plist)
|
||||
{
|
||||
p_setId(p_dereference(loc.getId(), ref, ref_type, plist, "dereference"));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::dereference
|
||||
///\brief Dereferences a reference into an HDF5 object, given an attribute.
|
||||
///\param attr - IN: Attribute specifying the location of the referenced object
|
||||
///\param ref - IN: Reference pointer
|
||||
///\param ref_type - IN: Reference type
|
||||
///\param plist - IN: Property list - default to PropList::DEFAULT
|
||||
///\exception H5::ReferenceException
|
||||
// Programmer Binh-Minh Ribler - Oct, 2006
|
||||
// Modification
|
||||
// May, 2008
|
||||
// Corrected missing parameters. - BMR
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Location::dereference(const Attribute& attr, const void* ref, H5R_type_t ref_type, const PropList& plist)
|
||||
{
|
||||
p_setId(p_dereference(attr.getId(), ref, ref_type, plist, "dereference"));
|
||||
}
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::getObjType
|
||||
///\brief Retrieves the type of object that an object reference points to.
|
||||
///\param ref_type - IN: Type of reference to query, valid values are:
|
||||
/// \li \c H5R_OBJECT - Reference is an object reference.
|
||||
/// \li \c H5R_DATASET_REGION - Reference is a dataset region reference.
|
||||
///\param ref - IN: Reference to query
|
||||
///\return An object type, which can be one of the following:
|
||||
/// \li \c H5G_UNKNOWN - A failure occurs. (-1)
|
||||
/// \li \c H5G_GROUP - Object is a group.
|
||||
/// \li \c H5G_DATASET - Object is a dataset.
|
||||
/// \li \c H5G_TYPE Object - is a named datatype
|
||||
/// \li \c H5G_LINK - Object is a symbolic link.
|
||||
/// \li \c H5G_UDLINK - Object is a user-defined link.
|
||||
///\exception H5::ReferenceException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
// Modification
|
||||
// Sep 2012: Moved up from H5File, Group, DataSet, and DataType
|
||||
//--------------------------------------------------------------------------
|
||||
H5G_obj_t H5Location::getObjType(void *ref, H5R_type_t ref_type) const
|
||||
{
|
||||
try {
|
||||
return(p_get_obj_type(ref, ref_type));
|
||||
}
|
||||
catch (ReferenceException E) {
|
||||
throw ReferenceException(inMemFunc("getObjType"), E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::p_get_obj_type (protected)
|
||||
// Purpose Retrieves the type of object that an object reference points to.
|
||||
// Parameters
|
||||
// ref - IN: Reference to query
|
||||
// ref_type - IN: Type of reference to query
|
||||
// Return An object type, which can be one of the following:
|
||||
// H5G_UNKNOWN \tFailure occurs (-1)
|
||||
// H5G_GROUP \tObject is a group.
|
||||
// H5G_DATASET \tObject is a dataset.
|
||||
// H5G_TYPE Object \tis a named datatype.
|
||||
// H5G_LINK \tObject is a symbolic link.
|
||||
// H5G_UDLINK \tObject is a user-defined link.
|
||||
// Exception H5::ReferenceException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
H5G_obj_t H5Location::p_get_obj_type(void *ref, H5R_type_t ref_type) const
|
||||
{
|
||||
H5G_obj_t obj_type = H5Rget_obj_type1(getId(), ref_type, ref);
|
||||
|
||||
if (obj_type == H5G_UNKNOWN)
|
||||
{
|
||||
throw ReferenceException(inMemFunc("getObjType"), "H5Rget_obj_type1 failed");
|
||||
}
|
||||
return(obj_type);
|
||||
}
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::getRefObjType
|
||||
///\brief Retrieves the type of object that an object reference points to.
|
||||
///\param ref - IN: Reference to query
|
||||
///\param ref_type - IN: Type of reference to query, valid values are:
|
||||
/// \li \c H5R_OBJECT - Reference is an object reference.
|
||||
/// \li \c H5R_DATASET_REGION - Reference is a dataset region reference.
|
||||
///\return An object type, which can be one of the following:
|
||||
/// \li \c H5O_TYPE_UNKNOWN - Unknown object type (-1)
|
||||
/// \li \c H5O_TYPE_GROUP - Object is a group
|
||||
/// \li \c H5O_TYPE_DATASET - Object is a dataset
|
||||
/// \li \c H5O_TYPE_NAMED_DATATYPE - Object is a named datatype
|
||||
/// \li \c H5O_TYPE_NTYPES - Number of different object types
|
||||
///\exception H5::ReferenceException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
H5O_type_t H5Location::getRefObjType(void *ref, H5R_type_t ref_type) const
|
||||
{
|
||||
try {
|
||||
return(p_get_ref_obj_type(ref, ref_type));
|
||||
}
|
||||
catch (ReferenceException E) {
|
||||
throw ReferenceException(inMemFunc("getRefObjType"), E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::p_get_ref_obj_type (protected)
|
||||
// Purpose Retrieves the type of object that an object reference points to.
|
||||
// Parameters
|
||||
// ref - IN: Reference to query
|
||||
// ref_type - IN: Type of reference to query
|
||||
// Return An object type, which can be one of the following:
|
||||
// H5O_TYPE_UNKNOWN - Unknown object type (-1)
|
||||
// H5O_TYPE_GROUP - Object is a group
|
||||
// H5O_TYPE_DATASET - Object is a dataset
|
||||
// H5O_TYPE_NAMED_DATATYPE - Object is a named datatype
|
||||
// H5O_TYPE_NTYPES - Number of object types
|
||||
// Exception H5::ReferenceException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
H5O_type_t H5Location::p_get_ref_obj_type(void *ref, H5R_type_t ref_type) const
|
||||
{
|
||||
H5O_type_t obj_type = H5O_TYPE_UNKNOWN;
|
||||
herr_t ret_value = H5Rget_obj_type2(getId(), ref_type, ref, &obj_type);
|
||||
if (ret_value < 0)
|
||||
{
|
||||
throw ReferenceException(inMemFunc("getRefObjType"), "H5Rget_obj_type2 failed");
|
||||
}
|
||||
if (obj_type == H5O_TYPE_UNKNOWN || obj_type >= H5O_TYPE_NTYPES)
|
||||
{
|
||||
throw ReferenceException(inMemFunc("getRefObjType"), "H5Rget_obj_type2 returned invalid type");
|
||||
}
|
||||
return(obj_type);
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::getRegion
|
||||
///\brief Retrieves a dataspace with the region pointed to selected.
|
||||
///\param ref - IN: Reference to get region of
|
||||
///\param ref_type - IN: Type of reference to get region of - default
|
||||
// to H5R_DATASET_REGION
|
||||
///\return DataSpace object
|
||||
///\exception H5::ReferenceException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
DataSpace H5Location::getRegion(void *ref, H5R_type_t ref_type) const
|
||||
{
|
||||
hid_t space_id = H5Rget_region(getId(), ref_type, ref);
|
||||
if (space_id < 0)
|
||||
{
|
||||
throw ReferenceException(inMemFunc("getRegion"), "H5Rget_region failed");
|
||||
}
|
||||
try {
|
||||
DataSpace dataspace(space_id);
|
||||
return(dataspace);
|
||||
}
|
||||
catch (DataSpaceIException E) {
|
||||
throw ReferenceException(inMemFunc("getRegion"), E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location destructor
|
||||
///\brief Noop destructor.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
H5Location::~H5Location() {}
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
} // end namespace
|
||||
#endif
|
||||
172
c++/src/H5Location.h
Normal file
172
c++/src/H5Location.h
Normal file
@@ -0,0 +1,172 @@
|
||||
// C++ informative line for the emacs editor: -*- C++ -*-
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* 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 files COPYING and Copyright.html. COPYING can be found at the root *
|
||||
* of the source code distribution tree; Copyright.html can be found at the *
|
||||
* root level of an installed copy of the electronic HDF5 document set and *
|
||||
* is linked from the top-level documents page. It can also be found at *
|
||||
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#ifndef __H5Location_H
|
||||
#define __H5Location_H
|
||||
|
||||
#include "H5Classes.h" // constains forward class declarations
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
#endif
|
||||
|
||||
class H5_DLLCPP H5Location; // forward declaration for UserData4Aiterate
|
||||
|
||||
// Define the operator function pointer for H5Aiterate().
|
||||
typedef void (*attr_operator_t)( H5Location& loc/*in*/,
|
||||
const H5std_string attr_name/*in*/,
|
||||
void *operator_data/*in,out*/);
|
||||
|
||||
//! User data for attribute iteration
|
||||
class UserData4Aiterate {
|
||||
public:
|
||||
attr_operator_t op;
|
||||
void* opData;
|
||||
H5Location* location;
|
||||
};
|
||||
|
||||
/*! \class H5Location
|
||||
\brief H5Location is an abstract base class, added in version 1.8.12.
|
||||
|
||||
It provides a collection of wrappers for the C functions that take a
|
||||
location identifier to specify the HDF5 object. The location identifier
|
||||
can be either file, group, dataset, or named datatype.
|
||||
*/
|
||||
// Most of these methods were in H5Object but are now moved here because
|
||||
// a location can be a file, group, dataset, or named datatype. -BMR, 2013-10-1
|
||||
class H5_DLLCPP H5Location : public IdComponent {
|
||||
public:
|
||||
// Creates an attribute for the specified object at this location
|
||||
// PropList is currently not used, so always be default.
|
||||
Attribute createAttribute( const char* name, const DataType& type, const DataSpace& space, const PropList& create_plist = PropList::DEFAULT ) const;
|
||||
Attribute createAttribute( const H5std_string& name, const DataType& type, const DataSpace& space, const PropList& create_plist = PropList::DEFAULT ) const;
|
||||
|
||||
// Given its name, opens the attribute that belongs to an object at
|
||||
// this location.
|
||||
Attribute openAttribute( const char* name ) const;
|
||||
Attribute openAttribute( const H5std_string& name ) const;
|
||||
|
||||
// Given its index, opens the attribute that belongs to an object at
|
||||
// this location.
|
||||
Attribute openAttribute( const unsigned int idx ) const;
|
||||
|
||||
// Flushes all buffers associated with this location to disk.
|
||||
void flush( H5F_scope_t scope ) const;
|
||||
|
||||
// Gets the name of the file, specified by this location.
|
||||
H5std_string getFileName() const;
|
||||
|
||||
// Determines the number of attributes at this location.
|
||||
int getNumAttrs() const;
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
// Retrieves the type of object that an object reference points to.
|
||||
H5G_obj_t getObjType(void *ref, H5R_type_t ref_type = H5R_OBJECT) const;
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
// Retrieves the type of object that an object reference points to.
|
||||
H5O_type_t getRefObjType(void *ref, H5R_type_t ref_type = H5R_OBJECT) const;
|
||||
// Note: getRefObjType deprecates getObjType, but getObjType's name is
|
||||
// misleading, so getRefObjType is used in the new function instead.
|
||||
|
||||
// Iterate user's function over the attributes at this location.
|
||||
int iterateAttrs(attr_operator_t user_op, unsigned* idx = NULL, void* op_data = NULL);
|
||||
|
||||
// Checks whether the named attribute exists at this location.
|
||||
bool attrExists(const char* name) const;
|
||||
bool attrExists(const H5std_string& name) const;
|
||||
|
||||
// Renames the named attribute to a new name.
|
||||
void renameAttr(const char* oldname, const char* newname) const;
|
||||
void renameAttr(const H5std_string& oldname, const H5std_string& newname) const;
|
||||
|
||||
// Removes the named attribute from this location.
|
||||
void removeAttr(const char* name) const;
|
||||
void removeAttr(const H5std_string& name) const;
|
||||
|
||||
// Sets the comment for an HDF5 object specified by its name.
|
||||
void setComment(const char* name, const char* comment) const;
|
||||
void setComment(const H5std_string& name, const H5std_string& comment) const;
|
||||
void setComment(const char* comment) const;
|
||||
void setComment(const H5std_string& comment) const;
|
||||
|
||||
// Retrieves comment for the HDF5 object specified by its name.
|
||||
ssize_t getComment(const char* name, size_t buf_size, char* comment) const;
|
||||
H5std_string getComment(const char* name, size_t buf_size=0) const;
|
||||
H5std_string getComment(const H5std_string& name, size_t buf_size=0) const;
|
||||
|
||||
// Removes the comment for the HDF5 object specified by its name.
|
||||
void removeComment(const char* name) const;
|
||||
void removeComment(const H5std_string& name) const;
|
||||
|
||||
// Creates a reference to a named object or to a dataset region
|
||||
// in this object.
|
||||
void reference(void* ref, const char* name,
|
||||
H5R_type_t ref_type = H5R_OBJECT) const;
|
||||
void reference(void* ref, const H5std_string& name,
|
||||
H5R_type_t ref_type = H5R_OBJECT) const;
|
||||
void reference(void* ref, const char* name, const DataSpace& dataspace,
|
||||
H5R_type_t ref_type = H5R_DATASET_REGION) const;
|
||||
void reference(void* ref, const H5std_string& name, const DataSpace& dataspace,
|
||||
H5R_type_t ref_type = H5R_DATASET_REGION) const;
|
||||
|
||||
// Open a referenced object whose location is specified by either
|
||||
// a file, an HDF5 object, or an attribute.
|
||||
void dereference(const H5Location& loc, const void* ref, H5R_type_t ref_type = H5R_OBJECT, const PropList& plist = PropList::DEFAULT);
|
||||
void dereference(const Attribute& attr, const void* ref, H5R_type_t ref_type = H5R_OBJECT, const PropList& plist = PropList::DEFAULT);
|
||||
|
||||
// Retrieves a dataspace with the region pointed to selected.
|
||||
DataSpace getRegion(void *ref, H5R_type_t ref_type = H5R_DATASET_REGION) const;
|
||||
|
||||
///\brief Returns an identifier. (pure virtual)
|
||||
virtual hid_t getId() const = 0;
|
||||
|
||||
protected:
|
||||
// Default constructor
|
||||
H5Location();
|
||||
|
||||
// Creates a copy of an existing object giving the location id.
|
||||
H5Location(const hid_t loc_id);
|
||||
|
||||
// Copy constructor.
|
||||
H5Location(const H5Location& original);
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
// Creates a reference to an HDF5 object or a dataset region.
|
||||
void p_reference(void* ref, const char* name, hid_t space_id, H5R_type_t ref_type) const;
|
||||
|
||||
// Dereferences a ref into an HDF5 id.
|
||||
hid_t p_dereference(hid_t loc_id, const void* ref, H5R_type_t ref_type, const PropList& plist, const char* from_func);
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
// Retrieves the type of object that an object reference points to.
|
||||
H5G_obj_t p_get_obj_type(void *ref, H5R_type_t ref_type) const;
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
// Retrieves the type of object that an object reference points to.
|
||||
H5O_type_t p_get_ref_obj_type(void *ref, H5R_type_t ref_type) const;
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
// Noop destructor.
|
||||
virtual ~H5Location();
|
||||
|
||||
}; /* end class H5Location */
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
}
|
||||
#endif
|
||||
#endif // __H5Location_H
|
||||
@@ -31,36 +31,18 @@
|
||||
#include "H5File.h"
|
||||
#include "H5DataSet.h"
|
||||
#include "H5Attribute.h"
|
||||
#include "H5private.h" // for HDmemset
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
#endif
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
// userAttrOpWrpr simply interfaces between the user's function and the
|
||||
// C library function H5Aiterate2; used to resolve the different prototype
|
||||
// problem. May be moved to Iterator later.
|
||||
extern "C" herr_t userAttrOpWrpr(hid_t loc_id, const char *attr_name,
|
||||
const H5A_info_t *ainfo, void *op_data)
|
||||
{
|
||||
H5std_string s_attr_name = H5std_string( attr_name );
|
||||
#ifdef NO_STATIC_CAST
|
||||
UserData4Aiterate* myData = (UserData4Aiterate *) op_data;
|
||||
#else
|
||||
UserData4Aiterate* myData = static_cast <UserData4Aiterate *> (op_data);
|
||||
#endif
|
||||
myData->op( *myData->object, s_attr_name, myData->opData );
|
||||
return 0;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object default constructor (protected)
|
||||
// Description
|
||||
// The id is set by IdComponent() but subclass constructor will
|
||||
// set it to a valid HDF5 id.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
H5Object::H5Object() : IdComponent(0) {}
|
||||
H5Object::H5Object() : H5Location() {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object overloaded constructor (protected)
|
||||
@@ -69,9 +51,118 @@ H5Object::H5Object() : IdComponent(0) {}
|
||||
// Parameters object_id - IN: Id of an existing HDF5 object
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
H5Object::H5Object( const hid_t object_id ) : IdComponent( object_id ) {}
|
||||
H5Object::H5Object( const hid_t object_id ) : H5Location( object_id ) {}
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: getObjName
|
||||
///\brief Given an id, returns the type of the object.
|
||||
///\return The name of the object
|
||||
// Programmer Binh-Minh Ribler - Mar, 2014
|
||||
//--------------------------------------------------------------------------
|
||||
ssize_t H5Object::getObjName(char *obj_name, size_t buf_size) const
|
||||
{
|
||||
// H5Iget_name will get buf_size-1 chars of the name to null terminate it
|
||||
ssize_t name_size = H5Iget_name(getId(), obj_name, buf_size);
|
||||
|
||||
// If H5Iget_name returns a negative value, raise an exception
|
||||
if (name_size < 0)
|
||||
{
|
||||
throw Exception(inMemFunc("getObjName"), "H5Iget_name failed");
|
||||
}
|
||||
else if (name_size == 0)
|
||||
{
|
||||
throw Exception(inMemFunc("getObjName"), "Object must have a name, but name length is 0");
|
||||
}
|
||||
// Return length of the name
|
||||
return(name_size);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::getObjName
|
||||
///\brief Returns the name of this object as an \a H5std_string.
|
||||
///\return Name of the object
|
||||
///\exception H5::Exception
|
||||
// Programmer Binh-Minh Ribler - Mar, 2014
|
||||
// Modification
|
||||
//--------------------------------------------------------------------------
|
||||
H5std_string H5Object::getObjName() const
|
||||
{
|
||||
H5std_string obj_name(""); // object name to return
|
||||
|
||||
// Preliminary call to get the size of the object name
|
||||
ssize_t name_size = H5Iget_name(getId(), NULL, (size_t)0);
|
||||
|
||||
// If H5Iget_name failed, throw exception
|
||||
if (name_size < 0)
|
||||
{
|
||||
throw Exception(inMemFunc("getObjName"), "H5Iget_name failed");
|
||||
}
|
||||
else if (name_size == 0)
|
||||
{
|
||||
throw Exception(inMemFunc("getObjName"), "Object must have a name, but name length is 0");
|
||||
}
|
||||
// Object's name exists, retrieve it
|
||||
else if (name_size > 0)
|
||||
{
|
||||
char* name_C = new char[name_size+1]; // temporary C-string
|
||||
HDmemset(name_C, 0, name_size+1); // clear buffer
|
||||
|
||||
// Use overloaded function
|
||||
name_size = getObjName(name_C, name_size+1);
|
||||
|
||||
// Convert the C object name to return
|
||||
obj_name = name_C;
|
||||
|
||||
// Clean up resource
|
||||
delete []name_C;
|
||||
}
|
||||
// Return object's name
|
||||
return(obj_name);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::getObjName
|
||||
///\brief Gets the name of this object, returning its length.
|
||||
///\param obj_name - OUT: Buffer for the name string as \a H5std_string
|
||||
///\param len - IN: Desired length of the name, default to 0
|
||||
///\return Actual length of the object name
|
||||
///\exception H5::Exception
|
||||
///\par Description
|
||||
/// This function retrieves the object's name as an std string.
|
||||
/// buf_size can specify a specific length or default to 0, in
|
||||
/// which case the entire name will be retrieved.
|
||||
// Programmer Binh-Minh Ribler - Mar, 2014
|
||||
//--------------------------------------------------------------------------
|
||||
ssize_t H5Object::getObjName(H5std_string& obj_name, size_t len) const
|
||||
{
|
||||
ssize_t name_size = 0;
|
||||
|
||||
// If no length is provided, get the entire object name
|
||||
if (len == 0)
|
||||
{
|
||||
obj_name = getObjName();
|
||||
name_size = obj_name.length();
|
||||
}
|
||||
// If length is provided, get that number of characters in name
|
||||
else
|
||||
{
|
||||
char* name_C = new char[len+1]; // temporary C-string
|
||||
HDmemset(name_C, 0, len+1); // clear buffer
|
||||
|
||||
// Use overloaded function
|
||||
name_size = getObjName(name_C, len+1);
|
||||
|
||||
// Convert the C object name to return
|
||||
obj_name = name_C;
|
||||
|
||||
// Clean up resource
|
||||
delete []name_C;
|
||||
}
|
||||
// Otherwise, keep obj_name intact
|
||||
|
||||
// Return name size
|
||||
return(name_size);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object copy constructor
|
||||
@@ -80,494 +171,7 @@ H5Object::H5Object( const hid_t object_id ) : IdComponent( object_id ) {}
|
||||
///\param original - IN: H5Object instance to copy
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
H5Object::H5Object( const H5Object& original ) : IdComponent( original ) {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::createAttribute
|
||||
///\brief Creates an attribute for a group, dataset, or named datatype.
|
||||
///\param name - IN: Name of the attribute
|
||||
///\param data_type - IN: Datatype for the attribute
|
||||
///\param data_space - IN: Dataspace for the attribute - only simple
|
||||
/// dataspaces are allowed at this time
|
||||
///\param create_plist - IN: Creation property list - default to
|
||||
/// PropList::DEFAULT
|
||||
///\return Attribute instance
|
||||
///\exception H5::AttributeIException
|
||||
///\par Description
|
||||
/// The attribute name specified in \a name must be unique.
|
||||
/// Attempting to create an attribute with the same name as an
|
||||
/// existing attribute will raise an exception, leaving the
|
||||
/// pre-existing attribute intact. To overwrite an existing
|
||||
/// attribute with a new attribute of the same name, first
|
||||
/// delete the existing one with \c H5Object::removeAttr, then
|
||||
/// recreate it with this function.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
Attribute H5Object::createAttribute( const char* name, const DataType& data_type, const DataSpace& data_space, const PropList& create_plist ) const
|
||||
{
|
||||
hid_t type_id = data_type.getId();
|
||||
hid_t space_id = data_space.getId();
|
||||
hid_t plist_id = create_plist.getId();
|
||||
hid_t attr_id = H5Acreate2(getId(), name, type_id, space_id, plist_id, H5P_DEFAULT );
|
||||
|
||||
// If the attribute id is valid, create and return the Attribute object
|
||||
if( attr_id > 0 )
|
||||
{
|
||||
Attribute attr( attr_id );
|
||||
return( attr );
|
||||
}
|
||||
else
|
||||
throw AttributeIException(inMemFunc("createAttribute"), "H5Acreate2 failed");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::createAttribute
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes
|
||||
/// a reference to an \c std::string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
Attribute H5Object::createAttribute( const H5std_string& name, const DataType& data_type, const DataSpace& data_space, const PropList& create_plist ) const
|
||||
{
|
||||
return( createAttribute( name.c_str(), data_type, data_space, create_plist ));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::openAttribute
|
||||
///\brief Opens an attribute given its name.
|
||||
///\param name - IN: Name of the attribute
|
||||
///\return Attribute instance
|
||||
///\exception H5::AttributeIException
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
Attribute H5Object::openAttribute( const char* name ) const
|
||||
{
|
||||
hid_t attr_id = H5Aopen(getId(), name, H5P_DEFAULT);
|
||||
if( attr_id > 0 )
|
||||
{
|
||||
Attribute attr( attr_id );
|
||||
return( attr );
|
||||
}
|
||||
else
|
||||
{
|
||||
throw AttributeIException(inMemFunc("openAttribute"), "H5Aopen failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::openAttribute
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes
|
||||
/// a reference to an \c std::string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
Attribute H5Object::openAttribute( const H5std_string& name ) const
|
||||
{
|
||||
return( openAttribute( name.c_str()) );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::openAttribute
|
||||
///\brief Opens an attribute given its index.
|
||||
///\param idx - IN: Index of the attribute, a 0-based, non-negative integer
|
||||
///\return Attribute instance
|
||||
///\exception H5::AttributeIException
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
Attribute H5Object::openAttribute( const unsigned int idx ) const
|
||||
{
|
||||
hid_t attr_id = H5Aopen_by_idx(getId(), ".", H5_INDEX_CRT_ORDER,
|
||||
H5_ITER_INC, (hsize_t)idx, H5P_DEFAULT, H5P_DEFAULT);
|
||||
if( attr_id > 0 )
|
||||
{
|
||||
Attribute attr( attr_id );
|
||||
return( attr );
|
||||
}
|
||||
else
|
||||
{
|
||||
throw AttributeIException(inMemFunc("openAttribute"), "H5Aopen_by_idx failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::iterateAttrs
|
||||
///\brief Iterates a user's function over all the attributes of an H5
|
||||
/// object, which may be a group, dataset or named datatype.
|
||||
///\param user_op - IN: User's function to operate on each attribute
|
||||
///\param idx - IN/OUT: Starting (IN) and ending (OUT) attribute indices
|
||||
///\param op_data - IN: User's data to pass to user's operator function
|
||||
///\return Returned value of the last operator if it was non-zero, or
|
||||
/// zero if all attributes were processed
|
||||
///\exception H5::AttributeIException
|
||||
///\par Description
|
||||
/// For information, please refer to the C layer Reference Manual
|
||||
/// at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5A.html#Annot-Iterate
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
int H5Object::iterateAttrs( attr_operator_t user_op, unsigned *_idx, void *op_data )
|
||||
{
|
||||
// store the user's function and data
|
||||
UserData4Aiterate* userData = new UserData4Aiterate;
|
||||
userData->opData = op_data;
|
||||
userData->op = user_op;
|
||||
userData->object = this;
|
||||
|
||||
// call the C library routine H5Aiterate2 to iterate the attributes
|
||||
hsize_t idx = _idx ? (hsize_t)*_idx : 0;
|
||||
int ret_value = H5Aiterate2(getId(), H5_INDEX_NAME, H5_ITER_INC, &idx,
|
||||
userAttrOpWrpr, (void *) userData);
|
||||
|
||||
// release memory
|
||||
delete userData;
|
||||
|
||||
if( ret_value >= 0 ) {
|
||||
/* Pass back update index value to calling code */
|
||||
if (_idx)
|
||||
*_idx = (unsigned)idx;
|
||||
|
||||
return( ret_value );
|
||||
}
|
||||
else // raise exception when H5Aiterate returns a negative value
|
||||
throw AttributeIException(inMemFunc("iterateAttrs"), "H5Aiterate2 failed");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::getNumAttrs
|
||||
///\brief Returns the number of attributes attached to this HDF5 object.
|
||||
///\return Number of attributes
|
||||
///\exception H5::AttributeIException
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
int H5Object::getNumAttrs() const
|
||||
{
|
||||
H5O_info_t oinfo; /* Object info */
|
||||
|
||||
if(H5Oget_info(getId(), &oinfo) < 0)
|
||||
throw AttributeIException(inMemFunc("getNumAttrs"), "H5Oget_info failed");
|
||||
else
|
||||
return( (int)oinfo.num_attrs );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::removeAttr
|
||||
///\brief Removes the named attribute from this object.
|
||||
///\param name - IN: Name of the attribute to be removed
|
||||
///\exception H5::AttributeIException
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Object::removeAttr( const char* name ) const
|
||||
{
|
||||
herr_t ret_value = H5Adelete(getId(), name);
|
||||
if( ret_value < 0 )
|
||||
throw AttributeIException(inMemFunc("removeAttr"), "H5Adelete failed");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::removeAttr
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes
|
||||
/// a reference to an \c std::string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Object::removeAttr( const H5std_string& name ) const
|
||||
{
|
||||
removeAttr( name.c_str() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::renameAttr
|
||||
///\brief Renames the named attribute from this object.
|
||||
///\param oldname - IN: Name of the attribute to be renamed
|
||||
///\param newname - IN: New name ame of the attribute
|
||||
///\exception H5::AttributeIException
|
||||
// Programmer Binh-Minh Ribler - Mar, 2005
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Object::renameAttr(const char* oldname, const char* newname) const
|
||||
{
|
||||
herr_t ret_value = H5Arename(getId(), oldname, newname);
|
||||
if (ret_value < 0)
|
||||
throw AttributeIException(inMemFunc("renameAttr"), "H5Arename failed");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::renameAttr
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes
|
||||
/// a reference to an \c std::string for the names.
|
||||
// Programmer Binh-Minh Ribler - Mar, 2005
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Object::renameAttr(const H5std_string& oldname, const H5std_string& newname) const
|
||||
{
|
||||
renameAttr (oldname.c_str(), newname.c_str());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::flush
|
||||
///\brief Flushes all buffers associated with a file to disk.
|
||||
///\param scope - IN: Specifies the scope of the flushing action,
|
||||
/// which can be either of these values:
|
||||
/// \li \c H5F_SCOPE_GLOBAL - Flushes the entire virtual file
|
||||
/// \li \c H5F_SCOPE_LOCAL - Flushes only the specified file
|
||||
///\exception H5::AttributeIException
|
||||
///\par Description
|
||||
/// This object is used to identify the file to be flushed.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Object::flush(H5F_scope_t scope) const
|
||||
{
|
||||
herr_t ret_value = H5Fflush(getId(), scope);
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw FileIException(inMemFunc("flush"), "H5Fflush failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::getFileName
|
||||
///\brief Gets the name of the file, in which this HDF5 object belongs.
|
||||
///\return File name
|
||||
///\exception H5::IdComponentException
|
||||
// Programmer Binh-Minh Ribler - Jul, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
H5std_string H5Object::getFileName() const
|
||||
{
|
||||
try {
|
||||
return(p_get_file_name());
|
||||
}
|
||||
catch (IdComponentException E) {
|
||||
throw FileIException(inMemFunc("getFileName"), E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::p_reference (protected)
|
||||
// Purpose Creates a reference to an HDF5 object or a dataset region.
|
||||
// Parameters
|
||||
// name - IN: Name of the object to be referenced
|
||||
// dataspace - IN: Dataspace with selection
|
||||
// ref_type - IN: Type of reference; default to \c H5R_DATASET_REGION
|
||||
// Exception H5::IdComponentException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Object::p_reference(void* ref, const char* name, hid_t space_id, H5R_type_t ref_type) const
|
||||
{
|
||||
herr_t ret_value = H5Rcreate(ref, getId(), name, ref_type, space_id);
|
||||
if (ret_value < 0)
|
||||
{
|
||||
throw IdComponentException("", "H5Rcreate failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::reference
|
||||
///\brief Creates a reference to an HDF5 object or a dataset region.
|
||||
///\param ref - IN: Reference pointer
|
||||
///\param name - IN: Name of the object to be referenced
|
||||
///\param dataspace - IN: Dataspace with selection
|
||||
///\param ref_type - IN: Type of reference to query, valid values are:
|
||||
/// \li \c H5R_OBJECT \tReference is an object reference.
|
||||
/// \li \c H5R_DATASET_REGION \tReference is a dataset region
|
||||
/// reference. - this is the default
|
||||
///\exception H5::IdComponentException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Object::reference(void* ref, const char* name, const DataSpace& dataspace, H5R_type_t ref_type) const
|
||||
{
|
||||
try {
|
||||
p_reference(ref, name, dataspace.getId(), ref_type);
|
||||
}
|
||||
catch (IdComponentException E) {
|
||||
throw IdComponentException("H5Object::reference", E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::reference
|
||||
///\brief This is an overloaded function, provided for your convenience.
|
||||
/// It differs from the above function in that it only creates
|
||||
/// a reference to an HDF5 object, not to a dataset region.
|
||||
///\param ref - IN: Reference pointer
|
||||
///\param name - IN: Name of the object to be referenced - \c char pointer
|
||||
///\exception H5::IdComponentException
|
||||
///\par Description
|
||||
// This function passes H5R_OBJECT and -1 to the protected
|
||||
// function for it to pass to the C API H5Rcreate
|
||||
// to create a reference to the named object.
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Object::reference(void* ref, const char* name) const
|
||||
{
|
||||
try {
|
||||
p_reference(ref, name, -1, H5R_OBJECT);
|
||||
}
|
||||
catch (IdComponentException E) {
|
||||
throw IdComponentException("H5Object::reference", E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::reference
|
||||
///\brief This is an overloaded function, provided for your convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for the object's name.
|
||||
///\param ref - IN: Reference pointer
|
||||
///\param name - IN: Name of the object to be referenced - \c std::string
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Object::reference(void* ref, const H5std_string& name) const
|
||||
{
|
||||
reference(ref, name.c_str());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::p_dereference (protected)
|
||||
// Purpose Dereference a ref into an hdf5 object.
|
||||
// Parameters
|
||||
// loc_id - IN: An hdf5 identifier specifying the location of the
|
||||
// referenced object
|
||||
// ref - IN: Reference pointer
|
||||
// ref_type - IN: Reference type
|
||||
// Exception H5::ReferenceException
|
||||
// Programmer Binh-Minh Ribler - Oct, 2006
|
||||
// Modification
|
||||
// May 2008 - BMR
|
||||
// Moved from IdComponent.
|
||||
//--------------------------------------------------------------------------
|
||||
hid_t H5Object::p_dereference(hid_t loc_id, const void* ref, H5R_type_t ref_type)
|
||||
{
|
||||
hid_t temp_id;
|
||||
temp_id = H5Rdereference2(loc_id, H5P_DEFAULT, ref_type, ref);
|
||||
if (temp_id < 0)
|
||||
{
|
||||
throw ReferenceException("", "H5Rdereference failed");
|
||||
}
|
||||
|
||||
// No failure, set id to the object
|
||||
return(temp_id);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::dereference
|
||||
///\brief Dereferences a reference into an HDF5 object, given an HDF5 object.
|
||||
///\param obj - IN: Object specifying the location of the referenced object
|
||||
///\param ref - IN: Reference pointer
|
||||
///\param ref_type - IN: Reference type
|
||||
///\exception H5::ReferenceException
|
||||
// Programmer Binh-Minh Ribler - Oct, 2006
|
||||
// Modification
|
||||
// May, 2008
|
||||
// Corrected missing parameters. - BMR
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Object::dereference(H5Object& obj, const void* ref, H5R_type_t ref_type)
|
||||
{
|
||||
hid_t temp_id;
|
||||
try {
|
||||
temp_id = p_dereference(obj.getId(), ref, ref_type);
|
||||
}
|
||||
catch (ReferenceException E) {
|
||||
throw ReferenceException("H5Object::dereference - located by object", E.getDetailMsg());
|
||||
}
|
||||
p_setId(temp_id);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::dereference
|
||||
///\brief Dereferences a reference into an HDF5 object, given an HDF5 file.
|
||||
///\param h5file - IN: HDF5 file specifying the location of the referenced object
|
||||
///\param ref - IN: Reference pointer
|
||||
///\param ref_type - IN: Reference type
|
||||
///\exception H5::ReferenceException
|
||||
// Programmer Binh-Minh Ribler - Oct, 2006
|
||||
// Modification
|
||||
// May, 2008
|
||||
// Corrected missing parameters. - BMR
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Object::dereference(H5File& h5file, const void* ref, H5R_type_t ref_type)
|
||||
{
|
||||
hid_t temp_id;
|
||||
try {
|
||||
temp_id = p_dereference(h5file.getId(), ref, ref_type);
|
||||
}
|
||||
catch (ReferenceException E) {
|
||||
throw ReferenceException("H5Object::dereference - located by file", E.getDetailMsg());
|
||||
}
|
||||
p_setId(temp_id);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::dereference
|
||||
///\brief Dereferences a reference into an HDF5 object, given an attribute.
|
||||
///\param attr - IN: Attribute specifying the location of the referenced object
|
||||
///\param ref - IN: Reference pointer
|
||||
///\param ref_type - IN: Reference type
|
||||
///\exception H5::ReferenceException
|
||||
// Programmer Binh-Minh Ribler - Oct, 2006
|
||||
// Modification
|
||||
// May, 2008
|
||||
// Corrected missing parameters. - BMR
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Object::dereference(Attribute& attr, const void* ref, H5R_type_t ref_type)
|
||||
{
|
||||
hid_t temp_id;
|
||||
try {
|
||||
temp_id = p_dereference(attr.getId(), ref, ref_type);
|
||||
}
|
||||
catch (ReferenceException E) {
|
||||
throw ReferenceException("H5Object::dereference - located by attribute", E.getDetailMsg());
|
||||
}
|
||||
p_setId(temp_id);
|
||||
}
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::p_get_obj_type (protected)
|
||||
// Purpose Retrieves the type of object that an object reference points to.
|
||||
// Parameters
|
||||
// ref - IN: Reference to query
|
||||
// ref_type - IN: Type of reference to query
|
||||
// Return An object type, which can be one of the following:
|
||||
// H5G_LINK Object is a symbolic link.
|
||||
// H5G_GROUP Object is a group.
|
||||
// H5G_DATASET Object is a dataset.
|
||||
// H5G_TYPE Object is a named datatype
|
||||
// Exception H5::IdComponentException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
H5G_obj_t H5Object::p_get_obj_type(void *ref, H5R_type_t ref_type) const
|
||||
{
|
||||
H5G_obj_t obj_type = H5Rget_obj_type1(getId(), ref_type, ref);
|
||||
|
||||
if (obj_type == H5G_UNKNOWN)
|
||||
{
|
||||
throw IdComponentException("", "H5Rget_obj_type failed");
|
||||
}
|
||||
return(obj_type);
|
||||
}
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::p_get_region (protected)
|
||||
// Purpose Retrieves a dataspace with the region pointed to selected.
|
||||
// Parameters
|
||||
// ref_type - IN: Type of reference to get region of - default
|
||||
// to H5R_DATASET_REGION
|
||||
// ref - IN: Reference to get region of
|
||||
// Return Dataspace id
|
||||
// Exception H5::IdComponentException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
hid_t H5Object::p_get_region(void *ref, H5R_type_t ref_type) const
|
||||
{
|
||||
hid_t space_id = H5Rget_region(getId(), ref_type, ref);
|
||||
if (space_id < 0)
|
||||
{
|
||||
throw IdComponentException("", "H5Rget_region failed");
|
||||
}
|
||||
return(space_id);
|
||||
}
|
||||
|
||||
H5Object::H5Object( const H5Object& original ) : H5Location( original ) {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object destructor
|
||||
@@ -575,6 +179,7 @@ hid_t H5Object::p_get_region(void *ref, H5R_type_t ref_type) const
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
H5Object::~H5Object() {}
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
} // end namespace
|
||||
|
||||
@@ -14,115 +14,58 @@
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#ifndef _H5Object_H
|
||||
#define _H5Object_H
|
||||
#ifndef __H5Object_H
|
||||
#define __H5Object_H
|
||||
|
||||
#include "H5Location.h"
|
||||
#include "H5Classes.h" // constains forward class declarations
|
||||
|
||||
// H5Object is a baseclass. It has these subclasses:
|
||||
// Group, DataSet, and DataType.
|
||||
// DataType, in turn, has several specific datatypes as subclasses.
|
||||
|
||||
// Modification:
|
||||
// Sept 18, 2012: Added class H5Location in between IdComponent and
|
||||
// H5Object. An H5File now inherits from H5Location. All HDF5
|
||||
// wrappers in H5Object are moved up to H5Location. H5Object
|
||||
// is left mostly empty for future wrappers that are only for
|
||||
// group, dataset, and named datatype. Note that the reason for
|
||||
// adding H5Location instead of simply moving H5File to be under
|
||||
// H5Object is H5File is not an HDF5 object, and renaming H5Object
|
||||
// to H5Location will risk breaking user applications.
|
||||
// -BMR
|
||||
// Apr 2, 2014: Added wrapper getObjName for H5Iget_name
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
#endif
|
||||
|
||||
/*! \class H5Object
|
||||
\brief Class H5Object is a bridge between H5Location and DataSet, DataType,
|
||||
and Group.
|
||||
|
||||
All the wrappers in H5Object were moved to H5Location.
|
||||
*/
|
||||
class H5_DLLCPP H5Object : public H5Location {
|
||||
public:
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
class H5_DLLCPP H5Object; // forward declaration for UserData4Aiterate
|
||||
|
||||
// Define the operator function pointer for H5Aiterate().
|
||||
typedef void (*attr_operator_t)( H5Object& loc/*in*/,
|
||||
const H5std_string attr_name/*in*/,
|
||||
void *operator_data/*in,out*/);
|
||||
|
||||
class UserData4Aiterate { // user data for attribute iteration
|
||||
public:
|
||||
attr_operator_t op;
|
||||
void* opData;
|
||||
H5Object* object;
|
||||
};
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
// The above part is being moved into Iterator, but not completed
|
||||
|
||||
class H5_DLLCPP H5Object : public IdComponent {
|
||||
public:
|
||||
// Creates an attribute for a group, dataset, or named datatype.
|
||||
// PropList is currently not used, so always be default.
|
||||
Attribute createAttribute( const char* name, const DataType& type, const DataSpace& space, const PropList& create_plist = PropList::DEFAULT ) const;
|
||||
Attribute createAttribute( const H5std_string& name, const DataType& type, const DataSpace& space, const PropList& create_plist = PropList::DEFAULT ) const;
|
||||
|
||||
// Opens an attribute given its name.
|
||||
Attribute openAttribute( const char* name ) const;
|
||||
Attribute openAttribute( const H5std_string& name ) const;
|
||||
|
||||
// Opens an attribute given its index.
|
||||
Attribute openAttribute( const unsigned int idx ) const;
|
||||
|
||||
// Flushes all buffers associated with this object to disk
|
||||
void flush( H5F_scope_t scope ) const;
|
||||
|
||||
// Gets the name of the file, in which this HDF5 object belongs.
|
||||
H5std_string getFileName() const;
|
||||
|
||||
// Determines the number of attributes attached to this object.
|
||||
int getNumAttrs() const;
|
||||
|
||||
// Iterate user's function over the attributes of this object
|
||||
int iterateAttrs( attr_operator_t user_op, unsigned* idx = NULL, void* op_data = NULL );
|
||||
|
||||
// Removes the named attribute from this object.
|
||||
void removeAttr( const char* name ) const;
|
||||
void removeAttr( const H5std_string& name ) const;
|
||||
|
||||
// Renames the attribute to a new name.
|
||||
void renameAttr(const char* oldname, const char* newname) const;
|
||||
void renameAttr(const H5std_string& oldname, const H5std_string& newname) const;
|
||||
|
||||
// Creates a reference to a named Hdf5 object or to a dataset region
|
||||
// in this object.
|
||||
void reference(void* ref, const char* name, const DataSpace& dataspace,
|
||||
H5R_type_t ref_type = H5R_DATASET_REGION) const;
|
||||
void reference(void* ref, const char* name) const;
|
||||
void reference(void* ref, const H5std_string& name) const;
|
||||
|
||||
// Open a referenced HDF5 object whose location is specified by either
|
||||
// a file, an HDF5 object, or an attribute.
|
||||
void dereference(H5File& h5file, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
|
||||
void dereference(H5Object& obj, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
|
||||
void dereference(Attribute& attr, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
|
||||
|
||||
// Copy constructor: makes copy of an H5Object object.
|
||||
H5Object(const H5Object& original);
|
||||
|
||||
// Gets the name of this HDF5 object, i.e., Group, DataSet, or
|
||||
// DataType.
|
||||
ssize_t getObjName(char *obj_name, size_t buf_size = 0) const;
|
||||
ssize_t getObjName(H5std_string& obj_name, size_t len = 0) const;
|
||||
H5std_string getObjName() const;
|
||||
|
||||
// Noop destructor.
|
||||
virtual ~H5Object();
|
||||
|
||||
protected:
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
// Default constructor
|
||||
H5Object();
|
||||
|
||||
// Creates a copy of an existing object giving the object id
|
||||
H5Object( const hid_t object_id );
|
||||
|
||||
// Gets the id of the H5 file in which the given object is located.
|
||||
hid_t p_get_file_id();
|
||||
|
||||
// Creates a reference to an HDF5 object or a dataset region.
|
||||
void p_reference(void* ref, const char* name, hid_t space_id, H5R_type_t ref_type) const;
|
||||
|
||||
// Dereferences a ref into an hdf5 id.
|
||||
hid_t p_dereference(hid_t loc_id, const void* ref, H5R_type_t ref_type);
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
// Retrieves the type of object that an object reference points to.
|
||||
H5G_obj_t p_get_obj_type(void *ref, H5R_type_t ref_type) const;
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
// Retrieves a dataspace with the region pointed to selected.
|
||||
hid_t p_get_region(void *ref, H5R_type_t ref_type) const;
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
}; /* end class H5Object */
|
||||
@@ -130,4 +73,4 @@ class H5_DLLCPP H5Object : public IdComponent {
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif // __H5Object_H
|
||||
|
||||
@@ -44,7 +44,10 @@ namespace H5 {
|
||||
//--------------------------------------------------------------------------
|
||||
PredType::PredType( const hid_t predtype_id ) : AtomType( predtype_id )
|
||||
{
|
||||
id = H5Tcopy(predtype_id);
|
||||
if (predtype_id == H5CPP_EXITED)
|
||||
id = predtype_id;
|
||||
else
|
||||
id = H5Tcopy(predtype_id);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -53,6 +56,7 @@ PredType::PredType( const hid_t predtype_id ) : AtomType( predtype_id )
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
PredType::PredType() : AtomType() {}
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: PredType copy constructor
|
||||
@@ -62,7 +66,9 @@ PredType::PredType() : AtomType() {}
|
||||
//--------------------------------------------------------------------------
|
||||
PredType::PredType( const PredType& original ) : AtomType( original ) {}
|
||||
|
||||
const PredType PredType::NotAtexit; // only for atexit/global dest. problem
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
// Flag to terminate HDF5 library in DataType::~DataType
|
||||
const PredType PredType::AtExit(H5CPP_EXITED);
|
||||
|
||||
// Definition of pre-defined types
|
||||
const PredType PredType::C_S1( H5T_C_S1 );
|
||||
@@ -266,22 +272,12 @@ PredType& PredType::operator=( const PredType& rhs )
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
// These dummy functions do not inherit from DataType - they'll
|
||||
// throw an DataTypeIException if invoked.
|
||||
void PredType::commit( H5File& loc, const char* name )
|
||||
void PredType::commit(H5Location& loc, const char* name )
|
||||
{
|
||||
throw DataTypeIException("PredType::commit", "Error: Attempted to commit a predefined datatype. Invalid operation!" );
|
||||
}
|
||||
|
||||
void PredType::commit( H5File& loc, const H5std_string& name )
|
||||
{
|
||||
commit( loc, name.c_str());
|
||||
}
|
||||
|
||||
void PredType::commit( H5Object& loc, const char* name )
|
||||
{
|
||||
throw DataTypeIException("PredType::commit", "Error: Attempted to commit a predefined datatype. Invalid operation!" );
|
||||
}
|
||||
|
||||
void PredType::commit( H5Object& loc, const H5std_string& name )
|
||||
void PredType::commit(H5Location& loc, const H5std_string& name )
|
||||
{
|
||||
commit( loc, name.c_str());
|
||||
}
|
||||
|
||||
@@ -14,21 +14,33 @@
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
// PredType holds the definition of all the HDF5 predefined datatypes.
|
||||
// These types can only be made copy of, not created by H5Tcreate or
|
||||
// closed by H5Tclose. They are treated as constants.
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _H5PredType_H
|
||||
#define _H5PredType_H
|
||||
#ifndef __H5PredType_H
|
||||
#define __H5PredType_H
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
#endif
|
||||
|
||||
/* This constant is defined for a workaround to eliminate memory leaks due to
|
||||
the library being re-initiated when PredType destructors are invoked. A
|
||||
PredType instant with H5CPP_EXITED as the value of its "id" is constructed
|
||||
before the other PredType objects are created. At exit, when this special
|
||||
PredType object is to be destructed, no HDF5 library function will be called
|
||||
and the library will be terminated. -BMR, Mar 30, 2012 */
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
#define H5CPP_EXITED -3 // -3 is less likely to be used elsewhere
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
/*! \class PredType
|
||||
\brief Class PredType holds the definition of all the HDF5 predefined
|
||||
datatypes.
|
||||
|
||||
These types can only be made copy of, not created by H5Tcreate or
|
||||
closed by H5Tclose. They are treated as constants.
|
||||
*/
|
||||
class H5_DLLCPP PredType : public AtomType {
|
||||
public:
|
||||
// Returns this class name
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass () const { return("PredType"); }
|
||||
|
||||
// Makes a copy of the predefined type and stores the new
|
||||
@@ -218,20 +230,18 @@ class H5_DLLCPP PredType : public AtomType {
|
||||
static const PredType NATIVE_UINT_FAST64;
|
||||
#endif /* H5_SIZEOF_UINT_FAST64_T */
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
// These dummy functions do not inherit from DataType - they'll
|
||||
// throw a DataTypeIException if invoked.
|
||||
void commit( H5File& loc, const H5std_string& name );
|
||||
void commit( H5File& loc, const char* name );
|
||||
void commit( H5Object& loc, const H5std_string& name );
|
||||
void commit( H5Object& loc, const char* name );
|
||||
/*! \brief This dummy function do not inherit from DataType - it will
|
||||
throw a DataTypeIException if invoked.
|
||||
*/
|
||||
void commit(H5Location& loc, const H5std_string& name );
|
||||
/*! \brief This dummy function do not inherit from DataType - it will
|
||||
throw a DataTypeIException if invoked.
|
||||
*/
|
||||
void commit(H5Location& loc, const char* name );
|
||||
/*! \brief This dummy function do not inherit from DataType - it will
|
||||
throw a DataTypeIException if invoked.
|
||||
*/
|
||||
bool committed();
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
private:
|
||||
// added this to work around the atexit/global destructor problem
|
||||
// temporarily - it'll prevent the use of atexit to clean up
|
||||
static const PredType NotAtexit; // not working yet
|
||||
|
||||
protected:
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
@@ -243,8 +253,14 @@ class H5_DLLCPP PredType : public AtomType {
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
private:
|
||||
// Added this to work around the atexit/global destructor problem.
|
||||
// It'll help to terminate the library after other PredType instances
|
||||
// are closed. -BMR, Mar 30, 2012
|
||||
static const PredType AtExit;
|
||||
|
||||
};
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif // __H5PredType_H
|
||||
|
||||
@@ -39,14 +39,14 @@ namespace H5 {
|
||||
//--------------------------------------------------------------------------
|
||||
///\brief Constant for default property.
|
||||
//--------------------------------------------------------------------------
|
||||
const PropList PropList::DEFAULT( H5P_DEFAULT );
|
||||
const PropList PropList::DEFAULT;
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function Default constructor
|
||||
///\brief Default constructor: creates a stub property list object.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
PropList::PropList() : IdComponent(), id(0) {}
|
||||
PropList::PropList() : IdComponent(), id(H5P_DEFAULT) {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: PropList copy constructor
|
||||
@@ -74,6 +74,9 @@ PropList::PropList(const PropList& original) : IdComponent(original)
|
||||
//--------------------------------------------------------------------------
|
||||
PropList::PropList( const hid_t plist_id ) : IdComponent()
|
||||
{
|
||||
if (plist_id <= 0)
|
||||
id = H5P_DEFAULT;
|
||||
|
||||
H5I_type_t id_type = H5Iget_type(plist_id);
|
||||
switch (id_type) {
|
||||
case H5I_GENPROP_CLS:
|
||||
@@ -216,7 +219,8 @@ void PropList::copyProp( PropList& dest, PropList& src, const H5std_string& name
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: PropList::getId
|
||||
// Purpose: Get the id of this attribute
|
||||
///\brief Get the id of this property list
|
||||
///\return Property list identifier
|
||||
// Description:
|
||||
// Class hierarchy is revised to address bugzilla 1068. Class
|
||||
// AbstractDS and Attribute are moved out of H5Object. In
|
||||
@@ -229,6 +233,7 @@ hid_t PropList::getId() const
|
||||
return(id);
|
||||
}
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: PropList::p_setId
|
||||
///\brief Sets the identifier of this object to a new value.
|
||||
@@ -253,6 +258,7 @@ void PropList::p_setId(const hid_t new_id)
|
||||
// reset object's id to the given id
|
||||
id = new_id;
|
||||
}
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: PropList::close
|
||||
@@ -271,7 +277,7 @@ void PropList::close()
|
||||
throw PropListIException(inMemFunc("close"), "H5Pclose failed");
|
||||
}
|
||||
// reset the id
|
||||
id = 0;
|
||||
id = H5I_INVALID_HID;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -384,13 +390,19 @@ void PropList::getProperty(const char* name, void* value) const
|
||||
//--------------------------------------------------------------------------
|
||||
H5std_string PropList::getProperty(const char* name) const
|
||||
{
|
||||
// Get property size first
|
||||
size_t size = getPropSize(name);
|
||||
|
||||
// Allocate buffer then get the property
|
||||
char* prop_strg_C = new char[size+1]; // temporary C-string for C API
|
||||
HDmemset(prop_strg_C, 0, size+1); // clear buffer
|
||||
|
||||
herr_t ret_value = H5Pget(id, name, prop_strg_C); // call C API
|
||||
|
||||
// Throw exception if H5Pget returns failure
|
||||
if (ret_value < 0)
|
||||
{
|
||||
delete []prop_strg_C;
|
||||
throw PropListIException(inMemFunc("getProperty"), "H5Pget failed");
|
||||
}
|
||||
|
||||
@@ -479,7 +491,7 @@ H5std_string PropList::getClassName() const
|
||||
if (temp_str != NULL)
|
||||
{
|
||||
H5std_string class_name(temp_str);
|
||||
HDfree(temp_str);
|
||||
H5free_memory(temp_str);
|
||||
return(class_name);
|
||||
}
|
||||
else
|
||||
@@ -570,7 +582,7 @@ void PropList::setProperty(const H5std_string& name, void* value) const
|
||||
/// It differs from the above function only in what arguments it
|
||||
/// accepts.
|
||||
///\param name - IN: Name of property to set - \c H5std_string
|
||||
///\param strg - IN: Value for the property is a \c std::string
|
||||
///\param strg - IN: Value for the property is a \c H5std_string
|
||||
// Programmer: Binh-Minh Ribler - April, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void PropList::setProperty(const H5std_string& name, H5std_string& strg) const
|
||||
|
||||
@@ -14,13 +14,14 @@
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#ifndef _H5PropList_H
|
||||
#define _H5PropList_H
|
||||
#ifndef __H5PropList_H
|
||||
#define __H5PropList_H
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
#endif
|
||||
|
||||
//! Class PropList provides operations for generic property lists.
|
||||
class H5_DLLCPP PropList : public IdComponent {
|
||||
public:
|
||||
// Default property list
|
||||
@@ -94,7 +95,7 @@ class H5_DLLCPP PropList : public IdComponent {
|
||||
void removeProp(const char *name) const;
|
||||
void removeProp(const H5std_string& name) const;
|
||||
|
||||
// Returns this class name
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass () const { return("PropList"); }
|
||||
|
||||
// Default constructor: creates a stub PropList object.
|
||||
@@ -110,13 +111,15 @@ class H5_DLLCPP PropList : public IdComponent {
|
||||
virtual ~PropList();
|
||||
|
||||
protected:
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
hid_t id; // HDF5 property list id
|
||||
|
||||
// Sets the property list id.
|
||||
virtual void p_setId(const hid_t new_id);
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
};
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
}
|
||||
#endif
|
||||
#endif // _H5PropList_H
|
||||
#endif // __H5PropList_H
|
||||
|
||||
@@ -87,7 +87,7 @@ StrType::StrType( const PredType& pred_type, const size_t& size ) : AtomType()
|
||||
// Function: StrType overloaded constructor
|
||||
///\brief Creates a string datatype with a specified length
|
||||
///\param dummy - IN: To simplify calling the previous constructor
|
||||
// and avoid prototype clash with another constructor
|
||||
/// and avoid prototype clash with another constructor
|
||||
///\param size - IN: Length of the new string type
|
||||
///\exception H5::DataTypeIException
|
||||
///\par Description
|
||||
@@ -146,6 +146,13 @@ StrType::StrType( const DataSet& dataset ) : AtomType ()
|
||||
///\brief Retrieves the character set type of this string datatype.
|
||||
///\return Character set type, which can be:
|
||||
/// \li \c H5T_CSET_ASCII (0) - Character set is US ASCII.
|
||||
///\note
|
||||
/// ASCII and UTF-8 Unicode are the only currently supported character
|
||||
/// encodings. Extended ASCII encodings (for example, ISO 8859) are not
|
||||
/// supported. This encoding policy is not enforced by the HDF5 Library.
|
||||
/// Using encodings other than ASCII and UTF-8 can lead to compatibility
|
||||
/// and usability problems. See the C API entry H5Pset_char_encoding for
|
||||
/// more information.
|
||||
///\exception H5::DataTypeIException
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -166,6 +173,13 @@ H5T_cset_t StrType::getCset() const
|
||||
///\brief Sets character set to be used.
|
||||
///\param cset - IN: character set type, which can be:
|
||||
/// \li \c H5T_CSET_ASCII (0) - Character set is US ASCII.
|
||||
///\note
|
||||
/// ASCII and UTF-8 Unicode are the only currently supported character
|
||||
/// encodings. Extended ASCII encodings (for example, ISO 8859) are not
|
||||
/// supported. This encoding policy is not enforced by the HDF5 Library.
|
||||
/// Using encodings other than ASCII and UTF-8 can lead to compatibility
|
||||
/// and usability problems. See the C API entry H5Pset_char_encoding for
|
||||
/// more information.
|
||||
///\exception H5::DataTypeIException
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -209,7 +223,7 @@ H5T_str_t StrType::getStrpad() const
|
||||
///\exception H5::DataTypeIException
|
||||
///\par Description
|
||||
/// For detail, please refer to the C layer Reference Manual at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5T.html#Datatype-SetStrpad
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5T.html#Datatype-SetStrpad
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void StrType::setStrpad( H5T_str_t strpad ) const
|
||||
|
||||
@@ -14,13 +14,14 @@
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#ifndef _H5StrType_H
|
||||
#define _H5StrType_H
|
||||
#ifndef __H5StrType_H
|
||||
#define __H5StrType_H
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
#endif
|
||||
|
||||
//! Class StrType operates on HDF5 string datatypes.
|
||||
class H5_DLLCPP StrType : public AtomType {
|
||||
public:
|
||||
// Creates a string type using a predefined type
|
||||
@@ -47,7 +48,7 @@ class H5_DLLCPP StrType : public AtomType {
|
||||
// Defines the storage mechanism for character strings.
|
||||
void setStrpad(H5T_str_t strpad) const;
|
||||
|
||||
// Returns this class name
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass () const { return("StrType"); }
|
||||
|
||||
// default constructor
|
||||
@@ -65,4 +66,4 @@ class H5_DLLCPP StrType : public AtomType {
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif // __H5StrType_H
|
||||
|
||||
@@ -14,23 +14,21 @@
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
// Class VarLenType inherits from DataType and provides wrappers for
|
||||
// the HDF5 C's Variable-length Datatypes.
|
||||
|
||||
#ifndef _H5VarLenType_H
|
||||
#define _H5VarLenType_H
|
||||
#ifndef __H5VarLenType_H
|
||||
#define __H5VarLenType_H
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
#endif
|
||||
|
||||
//! VarLenType operates on the HDF5 C's Variable-length Datatypes.
|
||||
class H5_DLLCPP VarLenType : public DataType {
|
||||
public:
|
||||
// Constructor that creates a variable-length datatype based
|
||||
// on the specified base type.
|
||||
VarLenType(const DataType* base_type);
|
||||
|
||||
// Returns this class name
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass () const { return("VarLenType"); }
|
||||
|
||||
// Copy constructor: makes copy of the original object.
|
||||
@@ -49,4 +47,4 @@ class H5_DLLCPP VarLenType : public DataType {
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif // __H5VarLenType_H
|
||||
|
||||
@@ -22,7 +22,7 @@ include $(top_srcdir)/config/commence.am
|
||||
include $(top_srcdir)/config/lt_vers.am
|
||||
|
||||
# Include src directory
|
||||
INCLUDES=-I$(top_srcdir)/src
|
||||
AM_CPPFLAGS+=-I$(top_srcdir)/src
|
||||
|
||||
# This is our main target
|
||||
lib_LTLIBRARIES=libhdf5_cpp.la
|
||||
@@ -40,12 +40,12 @@ bin_SCRIPTS=h5c++
|
||||
|
||||
# Source files for the library
|
||||
libhdf5_cpp_la_SOURCES=H5Exception.cpp H5IdComponent.cpp H5Library.cpp \
|
||||
H5Attribute.cpp H5Object.cpp H5PropList.cpp H5FaccProp.cpp \
|
||||
H5FcreatProp.cpp H5DcreatProp.cpp H5DxferProp.cpp H5DataType.cpp \
|
||||
H5DataSpace.cpp H5AbstractDs.cpp H5AtomType.cpp H5PredType.cpp \
|
||||
H5EnumType.cpp H5IntType.cpp H5FloatType.cpp H5StrType.cpp \
|
||||
H5ArrayType.cpp H5VarLenType.cpp H5CompType.cpp H5DataSet.cpp \
|
||||
H5CommonFG.cpp H5Group.cpp H5File.cpp
|
||||
H5Attribute.cpp H5Location.cpp H5Object.cpp H5PropList.cpp \
|
||||
H5FaccProp.cpp H5FcreatProp.cpp H5DcreatProp.cpp H5DxferProp.cpp \
|
||||
H5DataType.cpp H5DataSpace.cpp H5AbstractDs.cpp H5AtomType.cpp \
|
||||
H5PredType.cpp H5EnumType.cpp H5IntType.cpp H5FloatType.cpp \
|
||||
H5StrType.cpp H5ArrayType.cpp H5VarLenType.cpp H5CompType.cpp \
|
||||
H5DataSet.cpp H5CommonFG.cpp H5Group.cpp H5File.cpp
|
||||
|
||||
# HDF5 C++ library depends on HDF5 Library.
|
||||
libhdf5_cpp_la_LIBADD=$(LIBHDF5)
|
||||
@@ -55,8 +55,9 @@ include_HEADERS=H5Cpp.h H5AbstractDs.h H5AtomType.h H5Attribute.h H5Classes.h \
|
||||
H5CommonFG.h H5CompType.h H5DataSet.h H5DataSpace.h H5DataType.h \
|
||||
H5DcreatProp.h H5DxferProp.h H5EnumType.h H5Exception.h H5FaccProp.h \
|
||||
H5FcreatProp.h H5File.h H5FloatType.h H5Group.h H5IdComponent.h \
|
||||
H5Include.h H5IntType.h H5Library.h H5Object.h H5PredType.h \
|
||||
H5PropList.h H5StrType.h H5CppDoc.h H5ArrayType.h H5VarLenType.h
|
||||
H5Include.h H5IntType.h H5Library.h H5Location.h H5Object.h \
|
||||
H5PredType.h H5PropList.h H5StrType.h H5CppDoc.h H5ArrayType.h \
|
||||
H5VarLenType.h
|
||||
|
||||
# h5c++ and libhdf5.settings are generated during configure. Remove only when
|
||||
# distclean.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user