Compare commits
891 Commits
develop
...
hdf5-1_8_4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
627ccc0449 | ||
|
|
2ffd2d16bb | ||
|
|
55262e9936 | ||
|
|
18cefd89b7 | ||
|
|
569ee68d8e | ||
|
|
6372cbfe9e | ||
|
|
3274506aa1 | ||
|
|
21fc8a5e32 | ||
|
|
38626d0d29 | ||
|
|
894280046b | ||
|
|
40107d14d1 | ||
|
|
3490d6391e | ||
|
|
430cf74708 | ||
|
|
4226175c80 | ||
|
|
1cc53d9877 | ||
|
|
6921e39a6d | ||
|
|
ebf532a683 | ||
|
|
d1c0d540fe | ||
|
|
0346ae4b35 | ||
|
|
429c33fb2d | ||
|
|
534f2a99c9 | ||
|
|
b23076d3e9 | ||
|
|
98f4d1fd11 | ||
|
|
718ce1fc3d | ||
|
|
608c4bd428 | ||
|
|
24a5a5505c | ||
|
|
1caa8b61a5 | ||
|
|
97c03a8ba2 | ||
|
|
5c2030da0c | ||
|
|
ba712ce016 | ||
|
|
7395e6cd7a | ||
|
|
498fd3e24d | ||
|
|
a35d12a0c5 | ||
|
|
b67e755f74 | ||
|
|
3e59a565ad | ||
|
|
281c6f5f47 | ||
|
|
7ad81e70ac | ||
|
|
ce5e8b2a39 | ||
|
|
aa46073801 | ||
|
|
cdff348e48 | ||
|
|
f6377589f7 | ||
|
|
cdf49b6472 | ||
|
|
e91af4bdbd | ||
|
|
d173513315 | ||
|
|
5158a3f3e4 | ||
|
|
9c6753a50e | ||
|
|
74665e4c13 | ||
|
|
0161c90b9b | ||
|
|
b26426f5b3 | ||
|
|
1ea112f552 | ||
|
|
f912cacabc | ||
|
|
f3986a1b59 | ||
|
|
4083412033 | ||
|
|
1825d962df | ||
|
|
11155cf5c3 | ||
|
|
26b0d9bde8 | ||
|
|
a861d4914b | ||
|
|
62521fcb96 | ||
|
|
148828d46a | ||
|
|
22e4a9b874 | ||
|
|
4486bc35bc | ||
|
|
94cb1c465b | ||
|
|
dd4360dccf | ||
|
|
2a2a49f422 | ||
|
|
eb8838be0b | ||
|
|
5237ffce52 | ||
|
|
d3aa5c967e | ||
|
|
ceddabad65 | ||
|
|
6f6a2c726d | ||
|
|
be6691b33d | ||
|
|
de76999134 | ||
|
|
190e10b63d | ||
|
|
98658b074e | ||
|
|
ba0858ab7a | ||
|
|
b733be9eec | ||
|
|
a7cf6ea11a | ||
|
|
c26ed138a6 | ||
|
|
e8e9b163c3 | ||
|
|
7a607d519a | ||
|
|
47c9464d5d | ||
|
|
dbb2eadcaa | ||
|
|
11f088a44c | ||
|
|
fbf7f470e2 | ||
|
|
d495a52fdd | ||
|
|
d98c4cb0e5 | ||
|
|
8746367121 | ||
|
|
e3101ecc46 | ||
|
|
89404acc45 | ||
|
|
0ead3e8873 | ||
|
|
0fa14048c2 | ||
|
|
858c8af18f | ||
|
|
ca0268116e | ||
|
|
a2faf5621f | ||
|
|
51d3e9b173 | ||
|
|
9726d77e95 | ||
|
|
a52d213b55 | ||
|
|
73f24a8ed0 | ||
|
|
e46380bfb6 | ||
|
|
40d2c29786 | ||
|
|
bb660b670b | ||
|
|
ef2aa6be0b | ||
|
|
3a83be48fb | ||
|
|
8664cb26c3 | ||
|
|
2b1e09bc97 | ||
|
|
c44c9feb35 | ||
|
|
f4d69b78e5 | ||
|
|
c0bb2c979b | ||
|
|
7dc63bdf27 | ||
|
|
8185461991 | ||
|
|
4faad745e8 | ||
|
|
885e92cba8 | ||
|
|
aeec66cf49 | ||
|
|
258d4b3835 | ||
|
|
0b3fbf9089 | ||
|
|
d5c3626181 | ||
|
|
ef70e57999 | ||
|
|
c7be102c70 | ||
|
|
3c0de7fb0c | ||
|
|
ee3ed7a67f | ||
|
|
4f9b08427b | ||
|
|
5d795c0260 | ||
|
|
39641369fe | ||
|
|
0595d6b912 | ||
|
|
b6494f0fc9 | ||
|
|
81e3eef99a | ||
|
|
b328dbbc31 | ||
|
|
d96910fe93 | ||
|
|
9316a67a89 | ||
|
|
6ee76fffc7 | ||
|
|
d96442aae5 | ||
|
|
5fc9bd9a5e | ||
|
|
7a91bd45d4 | ||
|
|
91e6f1e04d | ||
|
|
d1ee62c915 | ||
|
|
24b03e3472 | ||
|
|
05fb67f75d | ||
|
|
d5dfe34e0a | ||
|
|
4b160dd890 | ||
|
|
05f36e2be8 | ||
|
|
ebde7af78a | ||
|
|
339471fe0d | ||
|
|
b1c3c4abe3 | ||
|
|
d47fb4b752 | ||
|
|
92b37616d2 | ||
|
|
5e435bd8ac | ||
|
|
1db993a271 | ||
|
|
6a72ec80e5 | ||
|
|
5f9e36528c | ||
|
|
37cea8f1b6 | ||
|
|
35fc6fe082 | ||
|
|
445fec27e1 | ||
|
|
5aa72127e6 | ||
|
|
908ce6d721 | ||
|
|
db134c8627 | ||
|
|
0a2d67ebdf | ||
|
|
ab23b45259 | ||
|
|
1cbd7b4fd7 | ||
|
|
6a24df2bb9 | ||
|
|
3816a02c03 | ||
|
|
92b1407a53 | ||
|
|
d96e6789c0 | ||
|
|
aaa84b4542 | ||
|
|
31a7cd56bf | ||
|
|
981ba55190 | ||
|
|
03d1221bd8 | ||
|
|
ded93bd0c4 | ||
|
|
4dd601ef37 | ||
|
|
c0f91e15c5 | ||
|
|
3bbdfcd5f7 | ||
|
|
0e50d368cd | ||
|
|
c36ee92005 | ||
|
|
902de51188 | ||
|
|
0fb5c9b678 | ||
|
|
8c1762f8a6 | ||
|
|
434a6d2f8b | ||
|
|
254eb548cc | ||
|
|
b88498636f | ||
|
|
3cbb84471a | ||
|
|
eea0105a54 | ||
|
|
1bde0ccb95 | ||
|
|
01c179093f | ||
|
|
cf53b01cb9 | ||
|
|
a1b9964716 | ||
|
|
5800d12b4e | ||
|
|
14adeb6772 | ||
|
|
d678c5b596 | ||
|
|
b9b20ad8f4 | ||
|
|
20fa663053 | ||
|
|
8f25819df5 | ||
|
|
71d75b40ee | ||
|
|
75800cf6b5 | ||
|
|
b50178ea1a | ||
|
|
0b861519c5 | ||
|
|
259a4bc92a | ||
|
|
27c6981c41 | ||
|
|
856a80b949 | ||
|
|
b0df711c3c | ||
|
|
55a945c985 | ||
|
|
732e64b335 | ||
|
|
2d0b2588f6 | ||
|
|
2a6efe9e10 | ||
|
|
c0f0e7c419 | ||
|
|
4af1a11dcf | ||
|
|
b10f530bdf | ||
|
|
a9733bd0e9 | ||
|
|
f5fddfb7c1 | ||
|
|
c76a57f557 | ||
|
|
1da12c1410 | ||
|
|
96e548223d | ||
|
|
e9e393a494 | ||
|
|
b1b2c88b2c | ||
|
|
b6cfe32b73 | ||
|
|
79a41596f5 | ||
|
|
c75dd8fadc | ||
|
|
86fa22c385 | ||
|
|
93a6cd92d7 | ||
|
|
8be813993f | ||
|
|
eb668be994 | ||
|
|
a44e5df96e | ||
|
|
6ce6f90de8 | ||
|
|
2c6356db6e | ||
|
|
93e72bbde4 | ||
|
|
214fce63a9 | ||
|
|
da8917ffa3 | ||
|
|
fae180790e | ||
|
|
170b1f6755 | ||
|
|
5f7dc72173 | ||
|
|
9f0bec79a2 | ||
|
|
bc2bd03a46 | ||
|
|
6615339560 | ||
|
|
7d5ef3e8ad | ||
|
|
745c40b753 | ||
|
|
f4f0c14939 | ||
|
|
af7d1c4cd4 | ||
|
|
95bd7eac47 | ||
|
|
6bd725cec3 | ||
|
|
4f4902d083 | ||
|
|
fa656be59d | ||
|
|
1ad6816d15 | ||
|
|
0423a2ce6e | ||
|
|
8e0bce9dab | ||
|
|
58cda2617e | ||
|
|
985b323bd4 | ||
|
|
a1b11b8d47 | ||
|
|
548eec3070 | ||
|
|
4ffc0b6acb | ||
|
|
de44d9e363 | ||
|
|
e0e4a816e6 | ||
|
|
46e76fa793 | ||
|
|
46b4f969e3 | ||
|
|
1641a4d208 | ||
|
|
f8428adce3 | ||
|
|
d2b8738012 | ||
|
|
0662a78de6 | ||
|
|
9c36eb7c88 | ||
|
|
6f68d45ef1 | ||
|
|
235d4f439b | ||
|
|
0b8356c806 | ||
|
|
0b43e7cac0 | ||
|
|
96e9cae136 | ||
|
|
beac92a9c4 | ||
|
|
0558c3a8b6 | ||
|
|
853bfa46e2 | ||
|
|
cd56e0f898 | ||
|
|
bf151ed106 | ||
|
|
f140eccaea | ||
|
|
145782f915 | ||
|
|
b9b28ce4cc | ||
|
|
abd99a6d51 | ||
|
|
91e9a5d5c8 | ||
|
|
40df33dff7 | ||
|
|
bdb33e7c98 | ||
|
|
cd48d93298 | ||
|
|
233fa9bee7 | ||
|
|
7b47b79f2d | ||
|
|
90aea941c5 | ||
|
|
4446e5da71 | ||
|
|
f7a982a64e | ||
|
|
f95bf64c53 | ||
|
|
8339217374 | ||
|
|
d380fe5398 | ||
|
|
3489809ca5 | ||
|
|
f38ae770ca | ||
|
|
cbd195409d | ||
|
|
3577791dcc | ||
|
|
ccb31223c4 | ||
|
|
ae8e8d9378 | ||
|
|
004b4c4dff | ||
|
|
a2565505aa | ||
|
|
0e08da8023 | ||
|
|
79d1396cfa | ||
|
|
69ead66b76 | ||
|
|
c12389e885 | ||
|
|
75c3059f54 | ||
|
|
e10dca69da | ||
|
|
696cf9552c | ||
|
|
c7867cff2b | ||
|
|
27af18b852 | ||
|
|
10936f31a7 | ||
|
|
6285924944 | ||
|
|
8dba3d7b9c | ||
|
|
f01cd9be2d | ||
|
|
0c9806bb0e | ||
|
|
1dffdaa262 | ||
|
|
3fb6b6d6fa | ||
|
|
ef77500b28 | ||
|
|
6f92516776 | ||
|
|
c2c03a86b3 | ||
|
|
6787039100 | ||
|
|
3367137ba6 | ||
|
|
48b127f628 | ||
|
|
428a7c5243 | ||
|
|
dc2b6bbce0 | ||
|
|
7d193a28a8 | ||
|
|
fecd6ab559 | ||
|
|
1105b86f61 | ||
|
|
d623d950b6 | ||
|
|
3abbc57d81 | ||
|
|
c107f7063f | ||
|
|
60a15ad439 | ||
|
|
570de0c113 | ||
|
|
9e148522d5 | ||
|
|
df24309b72 | ||
|
|
817acf2cdc | ||
|
|
cd43ca3bf7 | ||
|
|
22d6e96014 | ||
|
|
9863d5aee2 | ||
|
|
2def5e4c85 | ||
|
|
30ccff2212 | ||
|
|
9c9e2c6d7d | ||
|
|
1598893d14 | ||
|
|
1cc1da5133 | ||
|
|
a848e01316 | ||
|
|
af7e17167b | ||
|
|
4201a8fbfe | ||
|
|
042ed7661a | ||
|
|
856f1e9120 | ||
|
|
828e7e2416 | ||
|
|
ddf384fb35 | ||
|
|
1b0e131cc4 | ||
|
|
363046bef9 | ||
|
|
6c526e3bfe | ||
|
|
8dc61483f2 | ||
|
|
5fb2e403a6 | ||
|
|
db81699a13 | ||
|
|
19105560d0 | ||
|
|
b359f8d3b3 | ||
|
|
d9836c44a6 | ||
|
|
ee76c4fa94 | ||
|
|
443e8cdafb | ||
|
|
086c205ca4 | ||
|
|
39c794d2c4 | ||
|
|
fe217cfd57 | ||
|
|
a9f5945de0 | ||
|
|
94838213e6 | ||
|
|
788e645a78 | ||
|
|
494226aaf6 | ||
|
|
0a9ad6a46e | ||
|
|
0e515209b2 | ||
|
|
c880943ce9 | ||
|
|
61346d50fa | ||
|
|
f023ea68dc | ||
|
|
9ebf3291c9 | ||
|
|
5a6c75cc58 | ||
|
|
582afd39e3 | ||
|
|
b487c22c42 | ||
|
|
b566fea225 | ||
|
|
d82141259c | ||
|
|
87cdac5fe9 | ||
|
|
8fd5f783b4 | ||
|
|
c4a18e8ac7 | ||
|
|
e3726385b1 | ||
|
|
f199d39a92 | ||
|
|
9c1ccb04af | ||
|
|
cf6842099c | ||
|
|
bd3565d448 | ||
|
|
5a80587476 | ||
|
|
066329f44b | ||
|
|
041eb636da | ||
|
|
704c6a99fc | ||
|
|
adcfa1a45e | ||
|
|
d190de7e0f | ||
|
|
25a2837cb5 | ||
|
|
3822ac7368 | ||
|
|
d6ff1f2b6b | ||
|
|
2a5e92d415 | ||
|
|
29e9825c93 | ||
|
|
dac4853e69 | ||
|
|
2e802e6a13 | ||
|
|
fc61c3a81a | ||
|
|
6290469518 | ||
|
|
01d1e93b37 | ||
|
|
a75ff7d2e5 | ||
|
|
a1ffba8cdb | ||
|
|
69d06e6ed4 | ||
|
|
089dfcff02 | ||
|
|
7b4e2704e7 | ||
|
|
87ebee5951 | ||
|
|
6d2a73d49f | ||
|
|
b3731e3409 | ||
|
|
e163a5f6ab | ||
|
|
a7673d2f91 | ||
|
|
bea031e44c | ||
|
|
4cd5a378c4 | ||
|
|
4f48c9c555 | ||
|
|
661734d541 | ||
|
|
92f5db9daf | ||
|
|
d2dd85b598 | ||
|
|
1197e992e9 | ||
|
|
0a9e0279b6 | ||
|
|
f6d689ac18 | ||
|
|
6bd7826ce8 | ||
|
|
976eb1cb49 | ||
|
|
8a3162e118 | ||
|
|
4c6f09d4de | ||
|
|
cd5619a2c2 | ||
|
|
228a3ac054 | ||
|
|
c2bb26a754 | ||
|
|
7341054c69 | ||
|
|
2ad37c5958 | ||
|
|
f677f9fbcf | ||
|
|
127792fc31 | ||
|
|
d496a1c715 | ||
|
|
98d4ba5d8a | ||
|
|
b7a12779d5 | ||
|
|
60915ff8aa | ||
|
|
bbd83d97e0 | ||
|
|
9c53e8281a | ||
|
|
2a23b4b176 | ||
|
|
5c204221e1 | ||
|
|
7b9871bfa2 | ||
|
|
52d3f187a5 | ||
|
|
aa12e27206 | ||
|
|
17a2d21791 | ||
|
|
50d88ec142 | ||
|
|
ab2ff6eda4 | ||
|
|
416af90179 | ||
|
|
56f666d330 | ||
|
|
d318a3b7ce | ||
|
|
4c032ef58e | ||
|
|
e87964eadf | ||
|
|
fe1223d360 | ||
|
|
fbf861cbde | ||
|
|
79e4e95e82 | ||
|
|
f4df369454 | ||
|
|
ca0c4ce8fd | ||
|
|
eb3eb77e57 | ||
|
|
972a1f1003 | ||
|
|
2a6e4d4e43 | ||
|
|
fdcd0fb59f | ||
|
|
5b57b18ae8 | ||
|
|
18197d3471 | ||
|
|
ec9ff804e2 | ||
|
|
1b42d70294 | ||
|
|
52b7b7d462 | ||
|
|
58a925fe4c | ||
|
|
3fbec7d04f | ||
|
|
778d231626 | ||
|
|
28366536ba | ||
|
|
9c5100ced3 | ||
|
|
ef857fa7d7 | ||
|
|
41245b50b6 | ||
|
|
327484d503 | ||
|
|
0c86f4cd9c | ||
|
|
69f88cf77c | ||
|
|
2dfcef40cd | ||
|
|
f4cf17d0d7 | ||
|
|
796f5a9f4c | ||
|
|
4168cf3af6 | ||
|
|
32ce1dd47d | ||
|
|
9f13e1ccb0 | ||
|
|
04ec4470e5 | ||
|
|
5218c4001a | ||
|
|
27c239c2d1 | ||
|
|
3dcdd204de | ||
|
|
c70ab22f2f | ||
|
|
4cb7515496 | ||
|
|
7c5468f27f | ||
|
|
181b5fc3e8 | ||
|
|
bdd4bd0d4d | ||
|
|
3f26602c9e | ||
|
|
78e90e5780 | ||
|
|
7a0f481872 | ||
|
|
3fc7f73c8d | ||
|
|
5fd91ff962 | ||
|
|
1a88b7687f | ||
|
|
56e444329e | ||
|
|
69698dff03 | ||
|
|
fa40801d42 | ||
|
|
330cdd5f97 | ||
|
|
0b4b87e36f | ||
|
|
e2c88e83bd | ||
|
|
0fa496eced | ||
|
|
feb6b5e546 | ||
|
|
2f03768888 | ||
|
|
96fd960606 | ||
|
|
1258c22bb0 | ||
|
|
374f8f9da5 | ||
|
|
e012505802 | ||
|
|
29be5ec598 | ||
|
|
3c5f5263e3 | ||
|
|
ca1fa22021 | ||
|
|
e00d3174e5 | ||
|
|
a6493ad0c0 | ||
|
|
0426a9ff06 | ||
|
|
c9300fbde0 | ||
|
|
66f00a70a4 | ||
|
|
18f2cf5cb6 | ||
|
|
f289a72b30 | ||
|
|
5ffd94a3de | ||
|
|
e68e7d3e41 | ||
|
|
8a54bb616b | ||
|
|
3557f90e62 | ||
|
|
e492e8989b | ||
|
|
b7564c7536 | ||
|
|
79b24eacfc | ||
|
|
8a5e38fd6a | ||
|
|
835e13806c | ||
|
|
7885abab9a | ||
|
|
f0d6f33b74 | ||
|
|
d9080af461 | ||
|
|
780999deee | ||
|
|
d2980de247 | ||
|
|
019c82760e | ||
|
|
8935335907 | ||
|
|
215fcf771f | ||
|
|
27d42dfae5 | ||
|
|
752627e424 | ||
|
|
edb9de4efc | ||
|
|
f2bdeee898 | ||
|
|
148f0787ad | ||
|
|
209f3a4504 | ||
|
|
2cfa680366 | ||
|
|
b3e7158c54 | ||
|
|
37bff127f5 | ||
|
|
8de58b40f5 | ||
|
|
d851c3ba6c | ||
|
|
9dd196f146 | ||
|
|
dd0b3ce4a8 | ||
|
|
5f376374db | ||
|
|
98bac0cfc0 | ||
|
|
a8e59673c0 | ||
|
|
a2501c41bd | ||
|
|
f08f9340a7 | ||
|
|
64e96385de | ||
|
|
30675b0c4a | ||
|
|
2d567669cd | ||
|
|
9e9c74f7c0 | ||
|
|
9924714992 | ||
|
|
c16cadef00 | ||
|
|
aaf4e0bda5 | ||
|
|
d55acefa0f | ||
|
|
5e1af503a6 | ||
|
|
1c0b652994 | ||
|
|
5f16ae281c | ||
|
|
07baa2bd02 | ||
|
|
d58e55cc92 | ||
|
|
2245e77948 | ||
|
|
1b6981c062 | ||
|
|
caa9e0c055 | ||
|
|
b694ad6c87 | ||
|
|
83abc3a4e4 | ||
|
|
00b0378cd3 | ||
|
|
16801096c7 | ||
|
|
fdabaa3330 | ||
|
|
7f758bceb0 | ||
|
|
3a6ad02916 | ||
|
|
1e1bcb801c | ||
|
|
6c262bfc93 | ||
|
|
1b86e5a529 | ||
|
|
924ba14474 | ||
|
|
208777ec89 | ||
|
|
12e3697d79 | ||
|
|
b195e33d3f | ||
|
|
97cced22b6 | ||
|
|
b353fb8b5a | ||
|
|
122b938cbf | ||
|
|
8f3811e1b1 | ||
|
|
c7bc8d9d28 | ||
|
|
56b70ea505 | ||
|
|
2f910f3fc7 | ||
|
|
8a6d7d14f6 | ||
|
|
01eb811b40 | ||
|
|
1eaa64a224 | ||
|
|
166931c024 | ||
|
|
dc587a17fa | ||
|
|
032898afc5 | ||
|
|
c30c0a0cbb | ||
|
|
8091a4a0b1 | ||
|
|
b62ec1e874 | ||
|
|
070a4899bf | ||
|
|
261bbe39aa | ||
|
|
37aaef8fe0 | ||
|
|
3b451f709a | ||
|
|
3f35eb23f8 | ||
|
|
b5e8ad2d7e | ||
|
|
73bf21ce05 | ||
|
|
f1e2853e6f | ||
|
|
b198fc89b9 | ||
|
|
32a72c4d54 | ||
|
|
d0ae398d95 | ||
|
|
78b5437aeb | ||
|
|
bdbdbb9f89 | ||
|
|
b256db872d | ||
|
|
a858608a0a | ||
|
|
d7437bc5b1 | ||
|
|
d0a9060af9 | ||
|
|
4ee45f7edd | ||
|
|
40b529efce | ||
|
|
752010a3a7 | ||
|
|
793510b1c1 | ||
|
|
447739d9af | ||
|
|
873503eb36 | ||
|
|
2d9122df16 | ||
|
|
a0064d012a | ||
|
|
313d2cc82c | ||
|
|
923d421509 | ||
|
|
bb206d572c | ||
|
|
e43c4a5a38 | ||
|
|
2041f537e6 | ||
|
|
cdb4e39a13 | ||
|
|
35ef863573 | ||
|
|
fe1ca64d16 | ||
|
|
f361635ae5 | ||
|
|
b8ed65ed62 | ||
|
|
0cd5c3edb2 | ||
|
|
7a86d8e3d3 | ||
|
|
e8630b6e80 | ||
|
|
993baa185a | ||
|
|
ebd7c384e0 | ||
|
|
501e01d388 | ||
|
|
d711cb1a3b | ||
|
|
fa3617e1ce | ||
|
|
0fffc46964 | ||
|
|
64b3c0a961 | ||
|
|
d1aa3ee4d7 | ||
|
|
1294681ee1 | ||
|
|
6669874698 | ||
|
|
f1b33ea578 | ||
|
|
cf451beffa | ||
|
|
299ebc0d7f | ||
|
|
926cfe52cc | ||
|
|
531822d443 | ||
|
|
23971ded14 | ||
|
|
13f5dbc05d | ||
|
|
50f38c5e59 | ||
|
|
8b5ced23dc | ||
|
|
d8e1072732 | ||
|
|
8436735388 | ||
|
|
6ddb6ed83f | ||
|
|
c50c3789fa | ||
|
|
f140118469 | ||
|
|
313cfa6e65 | ||
|
|
c3113b0e3c | ||
|
|
3f043d5cca | ||
|
|
b93a55bbcd | ||
|
|
d45346f76c | ||
|
|
b9be045596 | ||
|
|
37a1f87664 | ||
|
|
0a654a9df9 | ||
|
|
260228e645 | ||
|
|
80b958d8b4 | ||
|
|
d517c77bc0 | ||
|
|
fc7993a9f0 | ||
|
|
2b6b6825ab | ||
|
|
6e009f1851 | ||
|
|
a8fbaf9ecd | ||
|
|
442565636a | ||
|
|
39b9ddf4c8 | ||
|
|
9c9337e3fd | ||
|
|
c9af566e1d | ||
|
|
84335f79c6 | ||
|
|
13f357a946 | ||
|
|
ca4379362b | ||
|
|
6803ed3729 | ||
|
|
9fafbf5a5f | ||
|
|
23cd7c534b | ||
|
|
cb166460d0 | ||
|
|
b134708f2e | ||
|
|
7a2756e7ae | ||
|
|
428715468b | ||
|
|
7dbcf115dd | ||
|
|
742fd2739e | ||
|
|
e70ea8d243 | ||
|
|
2ab2b19d71 | ||
|
|
9e2496e85c | ||
|
|
7637f1b521 | ||
|
|
4b141cbc6a | ||
|
|
e660080290 | ||
|
|
f6f7968df4 | ||
|
|
3d53b71a91 | ||
|
|
367f2125d9 | ||
|
|
f040f990a0 | ||
|
|
2df9af6ae8 | ||
|
|
c827f0450c | ||
|
|
dc7d4bc0a7 | ||
|
|
a3d10354eb | ||
|
|
943aa55852 | ||
|
|
24739917cb | ||
|
|
e46107ca75 | ||
|
|
d364dc74a4 | ||
|
|
607cadc648 | ||
|
|
ec1358b0ca | ||
|
|
adb2280c71 | ||
|
|
98fdd752a4 | ||
|
|
836f7b53cc | ||
|
|
e1ee78dd09 | ||
|
|
9b6cc394cd | ||
|
|
e7037ad072 | ||
|
|
60957dc6cf | ||
|
|
d6dc8a4dfd | ||
|
|
99e21e85c9 | ||
|
|
8b3ced0b9e | ||
|
|
ba711c9cf5 | ||
|
|
9981e28710 | ||
|
|
583eac5e6d | ||
|
|
f21b99b592 | ||
|
|
d6dadadc7e | ||
|
|
ac73359fb1 | ||
|
|
32a3d96939 | ||
|
|
81de0a75cc | ||
|
|
d989ab71f4 | ||
|
|
0631ac2273 | ||
|
|
9f56d7f5ab | ||
|
|
1f4ee5485e | ||
|
|
d238f0663c | ||
|
|
7447d79091 | ||
|
|
0c0e746ce7 | ||
|
|
2b1ee377c3 | ||
|
|
372af0302f | ||
|
|
0dd254246c | ||
|
|
11b12d8f96 | ||
|
|
c3a26ef402 | ||
|
|
b950312318 | ||
|
|
b5938a75af | ||
|
|
f2a745a0bb | ||
|
|
ea9b094c18 | ||
|
|
e7b55928b6 | ||
|
|
970fcd54e0 | ||
|
|
c7ad57374b | ||
|
|
7dcf5b3972 | ||
|
|
6df2bbd6e9 | ||
|
|
0304c9a5fa | ||
|
|
720a985115 | ||
|
|
0b5f34bfa6 | ||
|
|
13cc35de11 | ||
|
|
1c63211301 | ||
|
|
1229fc7886 | ||
|
|
c7b6018bda | ||
|
|
c72fb2f329 | ||
|
|
7e8df66a0e | ||
|
|
018ba9a701 | ||
|
|
6e196a7b66 | ||
|
|
79380c228c | ||
|
|
a9fa9a4a37 | ||
|
|
0eb9e1ac43 | ||
|
|
73fe712356 | ||
|
|
f1bfdda38c | ||
|
|
8953ecfe9d | ||
|
|
c65d5ffe8d | ||
|
|
ac339aa792 | ||
|
|
454b061aa6 | ||
|
|
3605a2dc2d | ||
|
|
fbaf972a66 | ||
|
|
727fa10578 | ||
|
|
1d7ed4519c | ||
|
|
2cd6b67fd9 | ||
|
|
d317830e27 | ||
|
|
3aa5d8b987 | ||
|
|
b0fe33f243 | ||
|
|
bf9465c9cc | ||
|
|
c6a0c6f6e7 | ||
|
|
92fe8775dd | ||
|
|
726af41499 | ||
|
|
c4200837ad | ||
|
|
cd60d38593 | ||
|
|
ae27797c11 | ||
|
|
f2989dab4c | ||
|
|
b85229d0e2 | ||
|
|
e2b412cbf5 | ||
|
|
85608c722a | ||
|
|
74568cf5ca | ||
|
|
831fd1712c | ||
|
|
69929158f5 | ||
|
|
988e907b11 | ||
|
|
980d183790 | ||
|
|
4344cf5391 | ||
|
|
6631ced7a9 | ||
|
|
d11a2b8ba6 | ||
|
|
8a2023b552 | ||
|
|
90b94c00fe | ||
|
|
feab08a0ee | ||
|
|
f0b8da5851 | ||
|
|
7c818eaf88 | ||
|
|
57708e46ad | ||
|
|
1962e806c7 | ||
|
|
c5fa17ae84 | ||
|
|
968552fbc8 | ||
|
|
c23c6b9392 | ||
|
|
70cdaa12b2 | ||
|
|
484b4c47c3 | ||
|
|
362e5d9a10 | ||
|
|
6481c7451f | ||
|
|
ea4dea20fe | ||
|
|
2b8a9569bb | ||
|
|
4261982ea1 | ||
|
|
4297f8cc78 | ||
|
|
ee187da419 | ||
|
|
475ce84ae6 | ||
|
|
8380b1827e | ||
|
|
7f54a6cbeb | ||
|
|
20c6bdda65 | ||
|
|
f02082b568 | ||
|
|
7e7e7c7aef | ||
|
|
c48f37b327 | ||
|
|
8d4ae7e283 | ||
|
|
9d8bed8483 | ||
|
|
a42154c441 | ||
|
|
4e261a5427 | ||
|
|
cb79e86d4b | ||
|
|
a67435cf3b | ||
|
|
4b2c3c5e07 | ||
|
|
eb9ba954a5 | ||
|
|
41bf2001b1 | ||
|
|
0bfb17bf00 | ||
|
|
464e4619f6 | ||
|
|
1e313e76ff | ||
|
|
c44f697040 | ||
|
|
06dc01d40e | ||
|
|
8e184de40a | ||
|
|
433c62542f | ||
|
|
bee6951ac6 | ||
|
|
b2a2c17c44 | ||
|
|
c954ba63a4 | ||
|
|
8340a57349 | ||
|
|
82198aa9c5 | ||
|
|
e66cb6fec6 | ||
|
|
ed32d8e900 | ||
|
|
e3e9bbafce | ||
|
|
b6017c5cd1 | ||
|
|
b6fc679940 | ||
|
|
8fb201dd65 | ||
|
|
af355e20a4 | ||
|
|
ac378bcfb1 | ||
|
|
e622c634d5 | ||
|
|
740769d37f | ||
|
|
8f0879c89e | ||
|
|
934d532544 | ||
|
|
19077b27d0 | ||
|
|
b4bae33f23 | ||
|
|
a5030f853b | ||
|
|
202a3d4a6f | ||
|
|
59f29fa02f | ||
|
|
7c6a99f05c | ||
|
|
bcba07c53e | ||
|
|
cff7516ca7 | ||
|
|
d8dfc1fb3f | ||
|
|
5a8bbe317b | ||
|
|
f331bba32c | ||
|
|
4982e15623 | ||
|
|
da9a26d9a5 | ||
|
|
87be7927dd | ||
|
|
c635149be5 | ||
|
|
19924061d1 | ||
|
|
a233b8a08d | ||
|
|
c1c885892f | ||
|
|
ba7d08029b | ||
|
|
fd50c1ae9b | ||
|
|
acfc6ce5ba | ||
|
|
dd7dcb5b07 | ||
|
|
711f06f2ea | ||
|
|
862f7431b2 | ||
|
|
bce180dd5c | ||
|
|
728e308764 | ||
|
|
dee9447656 | ||
|
|
50a758f887 | ||
|
|
bbe565bdaf | ||
|
|
069b52529e | ||
|
|
95715a553e | ||
|
|
eb6bf807d2 | ||
|
|
43f78b295c | ||
|
|
56ea611bfa | ||
|
|
ae18c5f41c | ||
|
|
8449affc4a | ||
|
|
4bc4e5417e | ||
|
|
62ff7f238d | ||
|
|
0174dfec78 | ||
|
|
a1613da80e | ||
|
|
4f0e4f389a | ||
|
|
a429d0c4b3 | ||
|
|
5fb8eefacd |
28
COPYING
28
COPYING
@@ -4,18 +4,13 @@ HDF5 (Hierarchical Data Format 5) Software Library and Utilities
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
HDF5 (Hierarchical Data Format 5) Software Library and Utilities
|
||||
Copyright 2006-2008 by The HDF Group (THG).
|
||||
Copyright 2006-2009 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.
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Contributors: National Center for Supercomputing Applications (NCSA) at
|
||||
the University of Illinois, Fortner Software, Unidata Program Center (netCDF),
|
||||
The Independent JPEG Group (JPEG), Jean-loup Gailly and Mark Adler (gzip),
|
||||
and Digital Equipment Corporation (DEC).
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted for any purpose (including commercial purposes)
|
||||
provided that the following conditions are met:
|
||||
@@ -39,17 +34,26 @@ provided that the following conditions are met:
|
||||
|
||||
5. Neither the name of The HDF Group, the name of the University, nor the
|
||||
name of any Contributor may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission from the
|
||||
University, THG, or the Contributor, respectively.
|
||||
from this software without specific prior written permission from
|
||||
The HDF Group, the University, or the Contributor, respectively.
|
||||
|
||||
DISCLAIMER:
|
||||
THIS SOFTWARE IS PROVIDED BY THE HDF GROUP (THG) AND THE CONTRIBUTORS
|
||||
THIS SOFTWARE IS PROVIDED BY THE HDF GROUP AND THE CONTRIBUTORS
|
||||
"AS IS" WITH NO WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED. In no
|
||||
event shall THG or the Contributors be liable for any damages suffered by
|
||||
the users arising out of the use of this software, even if advised of the
|
||||
possibility of such damage.
|
||||
event shall The HDF Group or the Contributors be liable for any damages
|
||||
suffered by the users arising out of the use of this software, even if
|
||||
advised of the possibility of such damage.
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
Contributors: National Center for Supercomputing Applications (NCSA) at
|
||||
the University of Illinois, Fortner Software, Unidata Program Center (netCDF),
|
||||
The Independent JPEG Group (JPEG), Jean-loup Gailly and Mark Adler (gzip),
|
||||
and Digital Equipment Corporation (DEC).
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
Portions of HDF5 were developed with support from the University of
|
||||
California, Lawrence Livermore National Laboratory (UC LLNL).
|
||||
The following statement applies to those portions of the product and must
|
||||
|
||||
23
Makefile.am
23
Makefile.am
@@ -73,12 +73,15 @@ else
|
||||
endif
|
||||
|
||||
SUBDIRS = src test $(TESTPARALLEL_DIR) tools . $(CXX_DIR) $(FORTRAN_DIR) \
|
||||
$(HDF5_HL_DIR)
|
||||
$(HDF5_HL_DIR) perform
|
||||
DIST_SUBDIRS = src test testpar tools . c++ fortran hl perform examples
|
||||
|
||||
# Some files generated during configure that should be cleaned
|
||||
DISTCLEANFILES=config/stamp1 config/stamp2
|
||||
|
||||
# Some files/directories generated during check that should be cleaned
|
||||
CHECK_CLEANFILES+=*-tmp
|
||||
|
||||
# Define rules for lib, progs, check, and tests.
|
||||
# These simply involve recursing into subdirectories.
|
||||
test _test: check
|
||||
@@ -113,6 +116,7 @@ check-clean:
|
||||
(cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
|
||||
fi; \
|
||||
done
|
||||
$(RM) -rf prefix-tmp destdir-tmp
|
||||
|
||||
# Some C++ compilers/linkers will create a directory named ii_files in
|
||||
# the root directory, which should be cleaned.
|
||||
@@ -150,6 +154,23 @@ installcheck-local:
|
||||
# check-install is just a synonym for installcheck
|
||||
check-install: installcheck
|
||||
|
||||
# check-all-install tests all installation methods.
|
||||
# Install via different mechanism and then compare against the default.
|
||||
# Fine if only libXXX.a files are different since they may have been ranlib'ed.
|
||||
check-all-install:
|
||||
@echo Installing to default location
|
||||
$(MAKE) install
|
||||
@echo Installing to different prefix location
|
||||
$(MAKE) prefix=${ROOT}/prefix-tmp install
|
||||
@echo Compare against the default installation.
|
||||
@echo Fine if only libXXX.a files are different.
|
||||
-diff -r prefix-tmp ${prefix}
|
||||
@echo Installing to different $$\DESTDIR location
|
||||
env DESTDIR=${ROOT}/destdir-tmp $(MAKE) install
|
||||
@echo Compare against the default installation.
|
||||
@echo Fine if only libXXX.a files are different.
|
||||
-diff -r destdir-tmp${prefix} ${prefix}
|
||||
|
||||
# Only source files in the src directory include tracing information,
|
||||
# so 'make trace' only needs to recurse into that directory.
|
||||
trace:
|
||||
|
||||
305
Makefile.in
305
Makefile.in
@@ -1,8 +1,9 @@
|
||||
# Makefile.in generated by automake 1.10 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.11 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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,8 +49,9 @@
|
||||
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
@@ -79,6 +81,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/src/H5config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
@@ -90,15 +93,43 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
ps-recursive uninstall-recursive
|
||||
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
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
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); }; }
|
||||
{ test ! -d "$(distdir)" \
|
||||
|| { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -fr "$(distdir)"; }; }
|
||||
am__relativize = \
|
||||
dir0=`pwd`; \
|
||||
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
|
||||
sed_rest='s,^[^/]*/*,,'; \
|
||||
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
|
||||
sed_butlast='s,/*[^/]*$$,,'; \
|
||||
while test -n "$$dir1"; do \
|
||||
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
|
||||
if test "$$first" != "."; then \
|
||||
if test "$$first" = ".."; then \
|
||||
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
|
||||
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
|
||||
else \
|
||||
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
|
||||
if test "$$first2" = "$$first"; then \
|
||||
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
|
||||
else \
|
||||
dir2="../$$dir2"; \
|
||||
fi; \
|
||||
dir0="$$dir0"/"$$first"; \
|
||||
fi; \
|
||||
fi; \
|
||||
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
|
||||
done; \
|
||||
reldir="$$dir2"
|
||||
DIST_ARCHIVES = $(distdir).tar.gz
|
||||
GZIP_ENV = --best
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
@@ -106,6 +137,16 @@ 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
|
||||
ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@
|
||||
AMTAR = @AMTAR@
|
||||
|
||||
# H5_CFLAGS holds flags that should be used when building hdf5,
|
||||
# but which should not be exported to h5cc for building other programs.
|
||||
# AM_CFLAGS is an automake construct which should be used by Makefiles
|
||||
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
|
||||
AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
|
||||
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@
|
||||
AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
|
||||
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
|
||||
AM_LDFLAGS = @AM_LDFLAGS@
|
||||
AM_MAKEFLAGS = @AM_MAKEFLAGS@
|
||||
AR = @AR@
|
||||
|
||||
@@ -119,46 +160,47 @@ BYTESEX = @BYTESEX@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CC_VERSION = @CC_VERSION@
|
||||
|
||||
# H5_CFLAGS holds flags that should be used as CFLAGS when building hdf5,
|
||||
# but which shouldn't be exported to h5cc for building other programs.
|
||||
CFLAGS = @CFLAGS@ @H5_CFLAGS@
|
||||
CFLAGS = @CFLAGS@
|
||||
CLEARFILEBUF = @CLEARFILEBUF@
|
||||
CODESTACK = @CODESTACK@
|
||||
CONFIG_DATE = @CONFIG_DATE@
|
||||
CONFIG_MODE = @CONFIG_MODE@
|
||||
CONFIG_USER = @CONFIG_USER@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@ @H5_CPPFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@ @H5_CXXFLAGS@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEBUG_PKG = @DEBUG_PKG@
|
||||
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
|
||||
DIRECT_VFD = @DIRECT_VFD@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
DYNAMIC_DIRS = @DYNAMIC_DIRS@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
EXTERNAL_FILTERS = @EXTERNAL_FILTERS@
|
||||
|
||||
# Make sure that these variables are exported to the Makefiles
|
||||
F9XMODEXT = @F9XMODEXT@
|
||||
F9XMODFLAG = @F9XMODFLAG@
|
||||
F9XSUFFIXFLAG = @F9XSUFFIXFLAG@
|
||||
FC = @FC@
|
||||
FCFLAGS = @FCFLAGS@ @H5_FCFLAGS@
|
||||
FCFLAGS = @FCFLAGS@
|
||||
FCFLAGS_f90 = @FCFLAGS_f90@
|
||||
FCLIBS = @FCLIBS@
|
||||
FFLAGS = @FFLAGS@
|
||||
FGREP = @FGREP@
|
||||
FILTERS = @FILTERS@
|
||||
FSEARCH_DIRS = @FSEARCH_DIRS@
|
||||
GPFS = @GPFS@
|
||||
GREP = @GREP@
|
||||
H5_CFLAGS = @H5_CFLAGS@
|
||||
H5_CPPFLAGS = @H5_CPPFLAGS@
|
||||
@@ -167,11 +209,14 @@ H5_FCFLAGS = @H5_FCFLAGS@
|
||||
H5_LONE_COLON = @H5_LONE_COLON@
|
||||
H5_VERSION = @H5_VERSION@
|
||||
HADDR_T = @HADDR_T@
|
||||
HAVE_DMALLOC = @HAVE_DMALLOC@
|
||||
HDF5_HL = @HDF5_HL@
|
||||
HDF5_INTERFACES = @HDF5_INTERFACES@
|
||||
HDF_CXX = @HDF_CXX@
|
||||
HDF_FORTRAN = @HDF_FORTRAN@
|
||||
HID_T = @HID_T@
|
||||
HL = @HL@
|
||||
HL_FOR = @HL_FOR@
|
||||
HSIZET = @HSIZET@
|
||||
HSIZE_T = @HSIZE_T@
|
||||
HSSIZE_T = @HSSIZE_T@
|
||||
INSTALL = @INSTALL@
|
||||
@@ -179,11 +224,16 @@ INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INSTRUMENT = @INSTRUMENT@
|
||||
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LINUX_LFS = @LINUX_LFS@
|
||||
LIPO = @LIPO@
|
||||
LL_PATH = @LL_PATH@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_STATIC_EXEC = @LT_STATIC_EXEC@
|
||||
@@ -192,13 +242,19 @@ MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MPE = @MPE@
|
||||
MPI_GET_SIZE = @MPI_GET_SIZE@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PARALLEL = @PARALLEL@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
@@ -211,22 +267,21 @@ RUNSERIAL = @RUNSERIAL@
|
||||
R_INTEGER = @R_INTEGER@
|
||||
R_LARGE = @R_LARGE@
|
||||
SEARCH = @SEARCH@
|
||||
SED = @SED@
|
||||
SETX = @SETX@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
|
||||
# Hardcode SHELL to be /bin/sh. Most machines have this shell, and
|
||||
# on at least one machine configure fails to detect its existence (janus).
|
||||
# Also, when HDF5 is configured on one machine but run on another,
|
||||
# configure's automatic SHELL detection may not work on the build machine.
|
||||
SHELL = /bin/sh
|
||||
SHELL = @SHELL@
|
||||
SIZE_T = @SIZE_T@
|
||||
STATIC_EXEC = @STATIC_EXEC@
|
||||
STATIC_SHARED = @STATIC_SHARED@
|
||||
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
|
||||
STRIP = @STRIP@
|
||||
TESTPARALLEL = @TESTPARALLEL@
|
||||
THREADSAFE = @THREADSAFE@
|
||||
TIME = @TIME@
|
||||
TR = @TR@
|
||||
TRACE_API = @TRACE_API@
|
||||
UNAME_INFO = @UNAME_INFO@
|
||||
USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@
|
||||
USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@
|
||||
USE_FILTER_NBIT = @USE_FILTER_NBIT@
|
||||
@@ -235,13 +290,14 @@ USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@
|
||||
USE_FILTER_SZIP = @USE_FILTER_SZIP@
|
||||
USINGMEMCHECKER = @USINGMEMCHECKER@
|
||||
VERSION = @VERSION@
|
||||
WORDS_BIGENDIAN = @WORDS_BIGENDIAN@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
ac_ct_FC = @ac_ct_FC@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
@@ -257,8 +313,12 @@ build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
|
||||
# Install directories that automake doesn't know about
|
||||
docdir = $(exec_prefix)/doc
|
||||
dvidir = @dvidir@
|
||||
enable_shared = @enable_shared@
|
||||
enable_static = @enable_static@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
@@ -266,15 +326,14 @@ host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
|
||||
# Install directories that automake doesn't know about
|
||||
includedir = $(exec_prefix)/include
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
lt_ECHO = @lt_ECHO@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
@@ -287,6 +346,7 @@ sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
@@ -330,7 +390,9 @@ TRACE = perl $(top_srcdir)/bin/trace
|
||||
# .chkexe files are used to mark tests that have run successfully.
|
||||
# .chklog files are output from those tests.
|
||||
# *.clog are from the MPE option.
|
||||
CHECK_CLEANFILES = *.chkexe *.chklog *.clog
|
||||
|
||||
# Some files/directories generated during check that should be cleaned
|
||||
CHECK_CLEANFILES = *.chkexe *.chklog *.clog *-tmp
|
||||
@BUILD_PARALLEL_CONDITIONAL_FALSE@TESTPARALLEL_DIR =
|
||||
|
||||
# Define subdirectories to build.
|
||||
@@ -351,7 +413,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog
|
||||
@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)
|
||||
$(HDF5_HL_DIR) perform
|
||||
|
||||
DIST_SUBDIRS = src test testpar tools . c++ fortran hl perform examples
|
||||
|
||||
@@ -366,15 +428,15 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
|
||||
cd $(srcdir) && $(AUTOMAKE) --foreign \
|
||||
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
|
||||
$(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign Makefile
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
@@ -387,9 +449,10 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
esac;
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
$(am__cd) $(srcdir) && $(AUTOCONF)
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
@@ -398,7 +461,7 @@ clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f 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.
|
||||
@@ -424,7 +487,7 @@ $(RECURSIVE_TARGETS):
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
@@ -458,16 +521,16 @@ $(RECURSIVE_CLEAN_TARGETS):
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
($(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" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
@@ -475,14 +538,14 @@ ID: $(HEADERS) $(SOURCES) $(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; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
$(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=; \
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
@@ -494,46 +557,50 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
|
||||
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; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
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; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
test -d $(distdir) || mkdir $(distdir)
|
||||
test -d "$(distdir)" || mkdir "$(distdir)"
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
@@ -549,38 +616,54 @@ distdir: $(DISTFILES)
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
distdir=`$(am__cd) $(distdir) && pwd`; \
|
||||
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
|
||||
(cd $$subdir && \
|
||||
fi; \
|
||||
done
|
||||
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
|
||||
$(am__relativize); \
|
||||
new_distdir=$$reldir; \
|
||||
dir1=$$subdir; dir2="$(top_distdir)"; \
|
||||
$(am__relativize); \
|
||||
new_top_distdir=$$reldir; \
|
||||
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
|
||||
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
|
||||
($(am__cd) $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$top_distdir" \
|
||||
distdir="$$distdir/$$subdir" \
|
||||
top_distdir="$$new_top_distdir" \
|
||||
distdir="$$new_distdir" \
|
||||
am__remove_distdir=: \
|
||||
am__skip_length_check=: \
|
||||
am__skip_mode_fix=: \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
|
||||
-test -n "$(am__skip_mode_fix)" \
|
||||
|| find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
|
||||
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|
||||
|| chmod -R a+r $(distdir)
|
||||
|| chmod -R a+r "$(distdir)"
|
||||
dist-gzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
@@ -589,6 +672,14 @@ dist-bzip2: distdir
|
||||
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-lzma: distdir
|
||||
tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-xz: distdir
|
||||
tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-tarZ: distdir
|
||||
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||
$(am__remove_distdir)
|
||||
@@ -615,6 +706,10 @@ distcheck: dist
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
|
||||
*.tar.bz2*) \
|
||||
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.lzma*) \
|
||||
unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
|
||||
*.tar.xz*) \
|
||||
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
|
||||
*.tar.Z*) \
|
||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||
*.shar.gz*) \
|
||||
@@ -626,9 +721,11 @@ distcheck: dist
|
||||
mkdir $(distdir)/_build
|
||||
mkdir $(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-$$$$/" \
|
||||
&& cd $(distdir)/_build \
|
||||
&& am__cwd=`pwd` \
|
||||
&& $(am__cd) $(distdir)/_build \
|
||||
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
@@ -650,13 +747,15 @@ distcheck: dist
|
||||
&& rm -rf "$$dc_destdir" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
||||
&& rm -rf $(DIST_ARCHIVES) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
|
||||
&& cd "$$am__cwd" \
|
||||
|| exit 1
|
||||
$(am__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:
|
||||
@cd $(distuninstallcheck_dir) \
|
||||
@$(am__cd) '$(distuninstallcheck_dir)' \
|
||||
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|
||||
|| { echo "ERROR: files left after uninstall:" ; \
|
||||
if test -n "$(DESTDIR)"; then \
|
||||
@@ -698,6 +797,7 @@ clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@@ -719,6 +819,8 @@ dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
@@ -727,18 +829,28 @@ install-data-am:
|
||||
|
||||
install-dvi: install-dvi-recursive
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am: install-exec-local
|
||||
|
||||
install-html: install-html-recursive
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-recursive
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-recursive
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am: installcheck-local
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
@@ -762,22 +874,22 @@ ps-am:
|
||||
|
||||
uninstall-am: uninstall-local
|
||||
|
||||
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
|
||||
install-strip
|
||||
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
|
||||
install-am install-strip tags-recursive
|
||||
|
||||
.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-shar dist-tarZ 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 \
|
||||
dist-all dist-bzip2 dist-gzip dist-lzma 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 \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic \
|
||||
mostlyclean-libtool mostlyclean-local pdf pdf-am ps ps-am tags \
|
||||
tags-recursive uninstall uninstall-am uninstall-local
|
||||
@@ -828,6 +940,7 @@ check-clean:
|
||||
(cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
|
||||
fi; \
|
||||
done
|
||||
$(RM) -rf prefix-tmp destdir-tmp
|
||||
|
||||
# Some C++ compilers/linkers will create a directory named ii_files in
|
||||
# the root directory, which should be cleaned.
|
||||
@@ -865,6 +978,23 @@ installcheck-local:
|
||||
# check-install is just a synonym for installcheck
|
||||
check-install: installcheck
|
||||
|
||||
# check-all-install tests all installation methods.
|
||||
# Install via different mechanism and then compare against the default.
|
||||
# Fine if only libXXX.a files are different since they may have been ranlib'ed.
|
||||
check-all-install:
|
||||
@echo Installing to default location
|
||||
$(MAKE) install
|
||||
@echo Installing to different prefix location
|
||||
$(MAKE) prefix=${ROOT}/prefix-tmp install
|
||||
@echo Compare against the default installation.
|
||||
@echo Fine if only libXXX.a files are different.
|
||||
-diff -r prefix-tmp ${prefix}
|
||||
@echo Installing to different $$\DESTDIR location
|
||||
env DESTDIR=${ROOT}/destdir-tmp $(MAKE) install
|
||||
@echo Compare against the default installation.
|
||||
@echo Fine if only libXXX.a files are different.
|
||||
-diff -r destdir-tmp${prefix} ${prefix}
|
||||
|
||||
# Only source files in the src directory include tracing information,
|
||||
# so 'make trace' only needs to recurse into that directory.
|
||||
trace:
|
||||
@@ -890,6 +1020,7 @@ $(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.
|
||||
|
||||
# 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.
|
||||
.NOEXPORT:
|
||||
|
||||
43
README.txt
43
README.txt
@@ -1,39 +1,40 @@
|
||||
HDF5 version 1.8.0 currently under development
|
||||
HDF5 version 1.8.4 released on Tue Jan 5 17:15:13 CST 2010
|
||||
Please refer to the release_docs/INSTALL file for installation instructions.
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
This release is almost fully functional for the entire API defined in the
|
||||
documentation, see the RELEASE.txt file in the release_docs directory for information
|
||||
specific to this release of the library. The INSTALL file contains
|
||||
instructions on compiling and installing the library. The INSTALL_parallel
|
||||
file contains instructions on installing the parallel version of the
|
||||
library. The INSTALL* files can be found in the release_docs/ directory.
|
||||
This release is fully functional for the API described in the documentation.
|
||||
See the RELEASE.txt file in the release_docs/ directory for information
|
||||
specific to this release of the library. Several INSTALL* files can also be
|
||||
found in the release_docs/ directory: INSTALL contains instructions for
|
||||
compiling and installing the library; INSTALL_parallel contains instructions
|
||||
for installing the parallel version of the library; similarly-named files
|
||||
contain instructions for VMS and several environments on MS Windows systems.
|
||||
|
||||
Documentation for this release can be found at the following URL:
|
||||
http://www.hdfgroup.uiuc.edu/HDF5/release/beta/obtain518.html
|
||||
http://www.hdfgroup.org/HDF5/doc/.
|
||||
|
||||
Four mailing lists are currently set up for use with the HDF5
|
||||
library.
|
||||
The following mailing lists are currently set up for HDF5 Library users:
|
||||
|
||||
news - For announcements of HDF5 related developments,
|
||||
not a discussion list.
|
||||
news - For announcements of HDF5 related developments,
|
||||
not a discussion list.
|
||||
|
||||
hdf-forum - For general discussion of the HDF5 library with
|
||||
other 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.
|
||||
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".
|
||||
where <list> is the name of the list.
|
||||
E.g., mail hdf5-subscribe@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
|
||||
|
||||
Messages to be sent to the list should be sent to "<list>@hdfgroup.org".
|
||||
Messages sent to the list should be addressed to "<list>@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/
|
||||
|
||||
|
||||
9409
aclocal.m4
vendored
9409
aclocal.m4
vendored
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
|
||||
Copyright by The HDF Group (THG) and
|
||||
Copyright by The HDF Group and
|
||||
The Board of Trustees of the University of Illinois.
|
||||
All rights reserved.
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
# variable initialization
|
||||
nerrors=0
|
||||
AUTOCONFVERSION=2.61
|
||||
AUTOCONFVERSION=2.64
|
||||
AUTOCONFVERSIONLEAD='Generated by GNU Autoconf'
|
||||
CONFIGUREFILES="configure"
|
||||
|
||||
|
||||
@@ -107,6 +107,21 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check for duplicate entries. This can be done at any time, but it may as
|
||||
# well be sooner so that if something else fails the presence of duplicates
|
||||
# will already be known.
|
||||
errcode=0
|
||||
DUPLICATES=`perl -ne 's/#.*//; next if /^\s*$/; if ($uniq{$_}++) { print $_; }' MANIFEST`
|
||||
if [ "$DUPLICATES" ]; then
|
||||
cat 1>&2 <<EOF
|
||||
These entries appear more than once in the MANIFEST:
|
||||
$DUPLICATES
|
||||
Please remove the duplicate lines and try again.
|
||||
|
||||
EOF
|
||||
errcode=1
|
||||
fi
|
||||
|
||||
# Copy the manifest file to get a list of file names.
|
||||
grep '^\.' MANIFEST | expand | cut -f1 -d' ' >$MANIFEST
|
||||
|
||||
@@ -117,6 +132,7 @@ for file in `cat $MANIFEST`; do
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
# Inspect the .svn/entries to figure out what version of svn file entry is
|
||||
# used.
|
||||
# The following algorithm is formed via reverse engineering.
|
||||
@@ -130,7 +146,7 @@ if head -1 $svn_entry_file | grep 'xml version="1.0"' > /dev/null 2>&1;then
|
||||
elif grep '^file$' $svn_entry_file > /dev/null 2>&1; then
|
||||
getsvnentries=GETSVNENTRIES_14
|
||||
else
|
||||
echo "Unknow svn entries format. Aborted"
|
||||
echo "Unknown svn entries format. Aborted"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -155,5 +171,9 @@ EOF
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $errcode -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
test "$verbose" && echo " The MANIFEST is up to date." 1>&2
|
||||
exit 0
|
||||
|
||||
@@ -17,36 +17,37 @@
|
||||
# Configures, builds, and runs tests in-place; the output files will be placed
|
||||
# in a directory called gcov_logs.
|
||||
# Must be invoked from the root hdf5 directory.
|
||||
# This script has only been tested on heping.
|
||||
# This script has been tested on kagiso.
|
||||
|
||||
CFLAGS="$CFLAGS -ftest-coverage -fprofile-arcs"
|
||||
export CFLAGS
|
||||
./configure --enable-debug=all
|
||||
LDFLAGS="$LDFLAGS -lgcov"
|
||||
export LDFLAGS
|
||||
CC=gcc
|
||||
export CC
|
||||
./configure
|
||||
make
|
||||
make check
|
||||
mkdir gcov_logs
|
||||
cd src
|
||||
for j in *.c
|
||||
for j in *.h *.c
|
||||
do
|
||||
ln -s ../$j .libs/$j
|
||||
done
|
||||
cd .libs
|
||||
for j in *.gcda
|
||||
do
|
||||
gcov -b $j >> gcov.log 2>&1
|
||||
done
|
||||
for j in *.gcov
|
||||
do
|
||||
mv $j ../../gcov_logs
|
||||
done
|
||||
mv gcov.log ../../gcov_logs
|
||||
for j in *.c *.h
|
||||
do
|
||||
mv $j ../gcov_logs
|
||||
rm $j
|
||||
done
|
||||
mv gcov.log ../gcov_logs
|
||||
cd ..
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
cd ../..
|
||||
|
||||
|
||||
|
||||
63
bin/h5vers
63
bin/h5vers
@@ -73,6 +73,8 @@ use strict;
|
||||
# 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
|
||||
# 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.
|
||||
#
|
||||
# Whenever the version changes, this script will increment the revision
|
||||
# field in HDF5's libtool shared library version in config/lt_vers.am,
|
||||
@@ -157,9 +159,11 @@ 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, and config/lt_vers.am. The
|
||||
# README.txt, release_docs/RELEASE.txt, configure.in, and
|
||||
# config/lt_vers.am files are always in the directory above H5public.h
|
||||
# release_docs/RELEASE.txt, configure.in, windows/src/H5pubconf.h,
|
||||
# vms/src/h5pubconf.h and config/lt_vers.am.
|
||||
# The README.txt, release_docs/RELEASE.txt, configure.in,
|
||||
# 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) {
|
||||
($file=$_,last) if -f $_;
|
||||
@@ -183,6 +187,14 @@ die "unable to read file: $RELEASE\n" unless -r $file;
|
||||
my $CONFIGURE = $file;
|
||||
$CONFIGURE =~ s/[^\/]*$/..\/configure.in/;
|
||||
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/;
|
||||
die "unable to read file: $H5VMSPUBCONF\n" unless -r $file;
|
||||
|
||||
# Get the current version number.
|
||||
open FILE, $file or die "unable to open $file: $!\n";
|
||||
@@ -230,6 +242,8 @@ if ($set) {
|
||||
$README = "";
|
||||
$RELEASE = "";
|
||||
$CONFIGURE = "";
|
||||
$H5PUBCONF = "";
|
||||
$H5VMSPUBCONF = "";
|
||||
$LT_VERS = "";
|
||||
@newver = @curver;
|
||||
}
|
||||
@@ -341,6 +355,49 @@ sub gen_configure {
|
||||
# Update the configure.in files and regenerate them
|
||||
gen_configure("HDF5", $CONFIGURE) if $CONFIGURE;
|
||||
|
||||
sub gen_h5pubconf {
|
||||
my ($name, $pubconf, @vers) = @_;
|
||||
|
||||
my $namelc = lc($name);
|
||||
my $nameuc = uc($name);
|
||||
|
||||
open FILE, $pubconf or die "$pubconf: $!\n";
|
||||
my @contents = <FILE>;
|
||||
close FILE;
|
||||
|
||||
for (my $i = 0; $i < $#contents; ++$i) {
|
||||
if ($contents[$i] =~ /\#\s*define\s+H5_PACKAGE\s+/) {
|
||||
$contents[$i] = "\#define H5_PACKAGE \"$namelc\"\n";
|
||||
} elsif ($contents[$i] =~ /\#\s*define\s+H5_PACKAGE_NAME\s+/) {
|
||||
$contents[$i] = "\#define H5_PACKAGE_NAME \"$nameuc\"\n";
|
||||
} elsif ($contents[$i] =~ /\#\s*define\s+H5_PACKAGE_STRING\s+/) {
|
||||
$contents[$i] = sprintf("\#define H5_PACKAGE_STRING \"$nameuc %d.%d.%d%s\"\n",
|
||||
@vers[0,1,2],
|
||||
$newver[3] eq "" ? "" : "-".$newver[3]);
|
||||
} elsif ($contents[$i] =~ /\#\s*define\s+H5_PACKAGE_TARNAME\s+/) {
|
||||
$contents[$i] = "\#define H5_PACKAGE_TARNAME \"$namelc\"\n";
|
||||
} elsif ($contents[$i] =~ /\#\s*define\s+H5_PACKAGE_VERSION\s+/) {
|
||||
$contents[$i] = sprintf("\#define H5_PACKAGE_VERSION \"%d.%d.%d%s\"\n",
|
||||
@vers[0,1,2],
|
||||
$newver[3] eq "" ? "" : "-".$newver[3]);
|
||||
} elsif ($contents[$i] =~ /\#\s*define\s+H5_VERSION\s+/) {
|
||||
$contents[$i] = sprintf("\#define H5_VERSION \"%d.%d.%d%s\"\n",
|
||||
@vers[0,1,2],
|
||||
$newver[3] eq "" ? "" : "-".$newver[3]);
|
||||
}
|
||||
}
|
||||
|
||||
open FILE, ">$pubconf" or die "$pubconf: $!\n";
|
||||
print FILE @contents;
|
||||
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;
|
||||
|
||||
# Print the new version number
|
||||
if ($verbose) {
|
||||
printf("version %d.%d release %d%s\n", @newver[0,1,2],
|
||||
|
||||
669
bin/install-sh
669
bin/install-sh
@@ -1,251 +1,520 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# install - install a program, script, or datafile
|
||||
# This comes from X11R5 (mit/util/scripts/install.sh).
|
||||
|
||||
scriptversion=2009-04-28.21; # UTC
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
# following copyright and license.
|
||||
#
|
||||
# Copyright 1991 by the Massachusetts Institute of Technology
|
||||
# Copyright (C) 1994 X Consortium
|
||||
#
|
||||
# Permission to use, copy, modify, distribute, and sell this software and its
|
||||
# documentation for any purpose is hereby granted without fee, provided that
|
||||
# the above copyright notice appear in all copies and that both that
|
||||
# copyright notice and this permission notice appear in supporting
|
||||
# documentation, and that the name of M.I.T. not be used in advertising or
|
||||
# publicity pertaining to distribution of the software without specific,
|
||||
# written prior permission. M.I.T. makes no representations about the
|
||||
# suitability of this software for any purpose. It is provided "as is"
|
||||
# without express or implied warranty.
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the X Consortium shall not
|
||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
# ings in this Software without prior written authorization from the X Consor-
|
||||
# tium.
|
||||
#
|
||||
#
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch. It can only install one file at a time, a restriction
|
||||
# shared with many OS's install programs.
|
||||
# from scratch.
|
||||
|
||||
nl='
|
||||
'
|
||||
IFS=" "" $nl"
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit="${DOITPROG-}"
|
||||
doit=${DOITPROG-}
|
||||
if test -z "$doit"; then
|
||||
doit_exec=exec
|
||||
else
|
||||
doit_exec=$doit
|
||||
fi
|
||||
|
||||
# Put in absolute file names if you don't have them in your path;
|
||||
# or use environment vars.
|
||||
|
||||
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||
chgrpprog=${CHGRPPROG-chgrp}
|
||||
chmodprog=${CHMODPROG-chmod}
|
||||
chownprog=${CHOWNPROG-chown}
|
||||
cmpprog=${CMPPROG-cmp}
|
||||
cpprog=${CPPROG-cp}
|
||||
mkdirprog=${MKDIRPROG-mkdir}
|
||||
mvprog=${MVPROG-mv}
|
||||
rmprog=${RMPROG-rm}
|
||||
stripprog=${STRIPPROG-strip}
|
||||
|
||||
mvprog="${MVPROG-mv}"
|
||||
cpprog="${CPPROG-cp}"
|
||||
chmodprog="${CHMODPROG-chmod}"
|
||||
chownprog="${CHOWNPROG-chown}"
|
||||
chgrpprog="${CHGRPPROG-chgrp}"
|
||||
stripprog="${STRIPPROG-strip}"
|
||||
rmprog="${RMPROG-rm}"
|
||||
mkdirprog="${MKDIRPROG-mkdir}"
|
||||
posix_glob='?'
|
||||
initialize_posix_glob='
|
||||
test "$posix_glob" != "?" || {
|
||||
if (set -f) 2>/dev/null; then
|
||||
posix_glob=
|
||||
else
|
||||
posix_glob=:
|
||||
fi
|
||||
}
|
||||
'
|
||||
|
||||
transformbasename=""
|
||||
transform_arg=""
|
||||
instcmd="$mvprog"
|
||||
chmodcmd="$chmodprog 0755"
|
||||
chowncmd=""
|
||||
chgrpcmd=""
|
||||
stripcmd=""
|
||||
posix_mkdir=
|
||||
|
||||
# Desired mode of installed file.
|
||||
mode=0755
|
||||
|
||||
chgrpcmd=
|
||||
chmodcmd=$chmodprog
|
||||
chowncmd=
|
||||
mvcmd=$mvprog
|
||||
rmcmd="$rmprog -f"
|
||||
mvcmd="$mvprog"
|
||||
src=""
|
||||
dst=""
|
||||
dir_arg=""
|
||||
stripcmd=
|
||||
|
||||
while [ x"$1" != x ]; do
|
||||
case $1 in
|
||||
-c) instcmd="$cpprog"
|
||||
shift
|
||||
continue;;
|
||||
src=
|
||||
dst=
|
||||
dir_arg=
|
||||
dst_arg=
|
||||
|
||||
-d) dir_arg=true
|
||||
shift
|
||||
continue;;
|
||||
copy_on_change=false
|
||||
no_target_directory=
|
||||
|
||||
-m) chmodcmd="$chmodprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
usage="\
|
||||
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||
or: $0 [OPTION]... -d DIRECTORIES...
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
In the 1st form, copy SRCFILE to DSTFILE.
|
||||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||
In the 4th, create DIRECTORIES.
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
Options:
|
||||
--help display this help and exit.
|
||||
--version display version info and exit.
|
||||
|
||||
-s) stripcmd="$stripprog"
|
||||
shift
|
||||
continue;;
|
||||
-c (ignored)
|
||||
-C install only if different (preserve the last data modification time)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-s $stripprog installed files.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
|
||||
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
|
||||
shift
|
||||
continue;;
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||
RMPROG STRIPPROG
|
||||
"
|
||||
|
||||
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
|
||||
shift
|
||||
continue;;
|
||||
while test $# -ne 0; do
|
||||
case $1 in
|
||||
-c) ;;
|
||||
|
||||
*) if [ x"$src" = x ]
|
||||
then
|
||||
src=$1
|
||||
else
|
||||
# this colon is to work around a 386BSD /bin/sh bug
|
||||
:
|
||||
dst=$1
|
||||
fi
|
||||
shift
|
||||
continue;;
|
||||
-C) copy_on_change=true;;
|
||||
|
||||
-d) dir_arg=true;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift;;
|
||||
|
||||
--help) echo "$usage"; exit $?;;
|
||||
|
||||
-m) mode=$2
|
||||
case $mode in
|
||||
*' '* | *' '* | *'
|
||||
'* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-t) dst_arg=$2
|
||||
shift;;
|
||||
|
||||
-T) no_target_directory=true;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
--) shift
|
||||
break;;
|
||||
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||
# When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||
for arg
|
||||
do
|
||||
if test -n "$dst_arg"; then
|
||||
# $@ is not empty: it contains at least $arg.
|
||||
set fnord "$@" "$dst_arg"
|
||||
shift # fnord
|
||||
fi
|
||||
shift # arg
|
||||
dst_arg=$arg
|
||||
done
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
if test -z "$dir_arg"; then
|
||||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
# It's OK to call `install-sh -d' without argument.
|
||||
# This can happen when creating conditional directories.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
trap '(exit $?); exit' 1 2 13 15
|
||||
|
||||
# Set umask so as not to create temps with too-generous modes.
|
||||
# However, 'strip' requires both read and write access to temps.
|
||||
case $mode in
|
||||
# Optimize common cases.
|
||||
*644) cp_umask=133;;
|
||||
*755) cp_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw='% 200'
|
||||
fi
|
||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||
*)
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw=,u+rw
|
||||
fi
|
||||
cp_umask=$mode$u_plus_rw;;
|
||||
esac
|
||||
fi
|
||||
|
||||
for src
|
||||
do
|
||||
# Protect names starting with `-'.
|
||||
case $src in
|
||||
-*) src=./$src;;
|
||||
esac
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
dst=$src
|
||||
dstdir=$dst
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
if test ! -f "$src" && test ! -d "$src"; then
|
||||
echo "$0: $src does not exist." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$dst_arg"; then
|
||||
echo "$0: no destination specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
dst=$dst_arg
|
||||
# Protect names starting with `-'.
|
||||
case $dst in
|
||||
-*) dst=./$dst;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ x"$src" = x ]
|
||||
then
|
||||
echo "install: no input file specified"
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
if test -d "$dst"; then
|
||||
if test -n "$no_target_directory"; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
fi
|
||||
fi
|
||||
dstdir=$dst
|
||||
dst=$dstdir/`basename "$src"`
|
||||
dstdir_status=0
|
||||
else
|
||||
# Prefer dirname, but fall back on a substitute if dirname fails.
|
||||
dstdir=`
|
||||
(dirname "$dst") 2>/dev/null ||
|
||||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||
X"$dst" : 'X\(//\)[^/]' \| \
|
||||
X"$dst" : 'X\(//\)$' \| \
|
||||
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
|
||||
echo X"$dst" |
|
||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)[^/].*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\).*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
s/.*/./; q'
|
||||
`
|
||||
|
||||
if [ x"$dir_arg" != x ]; then
|
||||
dst=$src
|
||||
src=""
|
||||
|
||||
if [ -d $dst ]; then
|
||||
instcmd=:
|
||||
chmodcmd=""
|
||||
else
|
||||
instcmd=$mkdirprog
|
||||
fi
|
||||
else
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
obsolete_mkdir_used=false
|
||||
|
||||
if [ -f $src -o -d $src ]
|
||||
then
|
||||
true
|
||||
if test $dstdir_status != 0; then
|
||||
case $posix_mkdir in
|
||||
'')
|
||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||
umask=`umask`
|
||||
case $stripcmd.$umask in
|
||||
# Optimize common cases.
|
||||
*[2367][2367]) mkdir_umask=$umask;;
|
||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
mkdir_umask=`expr $umask + 22 \
|
||||
- $umask % 100 % 40 + $umask % 20 \
|
||||
- $umask % 10 % 4 + $umask % 2
|
||||
`;;
|
||||
*) mkdir_umask=$umask,go-w;;
|
||||
esac
|
||||
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
mkdir_mode=-m$mode
|
||||
else
|
||||
echo "install: $src does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ x"$dst" = x ]
|
||||
then
|
||||
echo "install: no destination specified"
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
mkdir_mode=
|
||||
fi
|
||||
|
||||
# If destination is a directory, append the input filename; if your system
|
||||
# does not like double slashes in filenames, you may need to add some logic
|
||||
posix_mkdir=false
|
||||
case $umask in
|
||||
*[123567][0-7][0-7])
|
||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
|
||||
if [ -d $dst ]
|
||||
then
|
||||
dst="$dst"/`basename $src`
|
||||
if (umask $mkdir_umask &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writeable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/d" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
if
|
||||
$posix_mkdir && (
|
||||
umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||
)
|
||||
then :
|
||||
else
|
||||
|
||||
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||
# or it failed possibly due to a race condition. Create the
|
||||
# directory the slow way, step by step, checking for races as we go.
|
||||
|
||||
case $dstdir in
|
||||
/*) prefix='/';;
|
||||
-*) prefix='./';;
|
||||
*) prefix='';;
|
||||
esac
|
||||
|
||||
eval "$initialize_posix_glob"
|
||||
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
$posix_glob set -f
|
||||
set fnord $dstdir
|
||||
shift
|
||||
$posix_glob set +f
|
||||
IFS=$oIFS
|
||||
|
||||
prefixes=
|
||||
|
||||
for d
|
||||
do
|
||||
test -z "$d" && continue
|
||||
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
prefixes=
|
||||
else
|
||||
true
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
else
|
||||
case $prefix in
|
||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||
*) qprefix=$prefix;;
|
||||
esac
|
||||
prefixes="$prefixes '$qprefix'"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
prefix=$prefix/
|
||||
done
|
||||
|
||||
## this sed command emulates the dirname command
|
||||
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
||||
if test -n "$prefixes"; then
|
||||
# Don't fail if two instances are running concurrently.
|
||||
(umask $mkdir_umask &&
|
||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||
test -d "$dstdir" || exit 1
|
||||
obsolete_mkdir_used=true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Make sure that the destination directory exists.
|
||||
# this part is taken from Noah Friedman's mkinstalldirs script
|
||||
if test -n "$dir_arg"; then
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
||||
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
||||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
||||
else
|
||||
|
||||
# Skip lots of stat calls in the usual case.
|
||||
if [ ! -d "$dstdir" ]; then
|
||||
defaultIFS='
|
||||
'
|
||||
IFS="${IFS-${defaultIFS}}"
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
|
||||
oIFS="${IFS}"
|
||||
# Some sh's can't handle IFS=/ for some reason.
|
||||
IFS='%'
|
||||
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||
IFS="${oIFS}"
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
|
||||
pathcomp=''
|
||||
# Copy the file name to the temp name.
|
||||
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
|
||||
while [ $# -ne 0 ] ; do
|
||||
pathcomp="${pathcomp}${1}"
|
||||
shift
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
||||
#
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
|
||||
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
|
||||
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
||||
|
||||
if [ ! -d "${pathcomp}" ] ;
|
||||
then
|
||||
$mkdirprog "${pathcomp}"
|
||||
else
|
||||
true
|
||||
fi
|
||||
# If -C, don't bother to copy if it wouldn't change the file.
|
||||
if $copy_on_change &&
|
||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||
|
||||
pathcomp="${pathcomp}/"
|
||||
eval "$initialize_posix_glob" &&
|
||||
$posix_glob set -f &&
|
||||
set X $old && old=:$2:$4:$5:$6 &&
|
||||
set X $new && new=:$2:$4:$5:$6 &&
|
||||
$posix_glob set +f &&
|
||||
|
||||
test "$old" = "$new" &&
|
||||
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||
then
|
||||
rm -f "$dsttmp"
|
||||
else
|
||||
# Rename the file to the real destination.
|
||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||
|
||||
# The rename failed, perhaps because mv can't rename something else
|
||||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
{
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dst"
|
||||
}
|
||||
fi || exit 1
|
||||
|
||||
trap '' 0
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]
|
||||
then
|
||||
$doit $instcmd $dst &&
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
|
||||
else
|
||||
|
||||
# If we're going to rename the final executable, determine the name now.
|
||||
|
||||
if [ x"$transformarg" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
dstfile=`basename $dst $transformbasename |
|
||||
sed $transformarg`$transformbasename
|
||||
fi
|
||||
|
||||
# don't allow the sed command to completely eliminate the filename
|
||||
|
||||
if [ x"$dstfile" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
# Make a temp file name in the proper directory.
|
||||
|
||||
dsttmp=$dstdir/#inst.$$#
|
||||
|
||||
# Move or copy the file name to the temp name
|
||||
|
||||
$doit $instcmd $src $dsttmp &&
|
||||
|
||||
trap "rm -f ${dsttmp}" 0 &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits
|
||||
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $instcmd $src $dsttmp" command.
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
|
||||
$doit $rmcmd -f $dstdir/$dstfile &&
|
||||
$doit $mvcmd $dsttmp $dstdir/$dstfile
|
||||
|
||||
fi &&
|
||||
|
||||
|
||||
exit 0
|
||||
# Local variables:
|
||||
# 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:
|
||||
|
||||
8505
bin/ltmain.sh
8505
bin/ltmain.sh
File diff suppressed because it is too large
Load Diff
@@ -239,7 +239,7 @@ sub create_init ($) {
|
||||
print HEADER " "x(0*$indent),"assert(${name}_g==(-1));\n";
|
||||
print HEADER " "x(0*$indent),"if((msg = H5E_create_msg(cls, H5E_MAJOR, \"${major{$name}}\"))==NULL)\n";
|
||||
print HEADER " "x(1*$indent),"HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, \"error message initialization failed\")\n";
|
||||
print HEADER " "x(0*$indent),"if((${name}_g = H5I_register(H5I_ERROR_MSG, msg))<0)\n";
|
||||
print HEADER " "x(0*$indent),"if((${name}_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)\n";
|
||||
print HEADER " "x(1*$indent),"HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, \"can't register error message\")\n";
|
||||
}
|
||||
|
||||
@@ -255,7 +255,7 @@ sub create_init ($) {
|
||||
print HEADER " "x(0*$indent),"assert(${name}_g==(-1));\n";
|
||||
print HEADER " "x(0*$indent),"if((msg = H5E_create_msg(cls, H5E_MINOR, \"${minor{$name}}\"))==NULL)\n";
|
||||
print HEADER " "x(1*$indent),"HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, \"error message initialization failed\")\n";
|
||||
print HEADER " "x(0*$indent),"if((${name}_g = H5I_register(H5I_ERROR_MSG, msg))<0)\n";
|
||||
print HEADER " "x(0*$indent),"if((${name}_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)\n";
|
||||
print HEADER " "x(1*$indent),"HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, \"can't register error message\")\n";
|
||||
}
|
||||
}
|
||||
|
||||
219
bin/make_overflow
Executable file
219
bin/make_overflow
Executable file
@@ -0,0 +1,219 @@
|
||||
#!/usr/bin/perl -w
|
||||
require 5.003;
|
||||
use strict;
|
||||
|
||||
# Global settings
|
||||
|
||||
# List of supported C types to generate overflow assignment code for
|
||||
my @ctypes = ( () );
|
||||
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# Create assignment overflow #ifdefs
|
||||
#
|
||||
# Programmer: Quincey Koziol
|
||||
# Creation Date: 2009/04/09
|
||||
|
||||
##############################################################################
|
||||
# Parse a meaningful line (not a comment or blank line) into the appropriate
|
||||
# data structure
|
||||
#
|
||||
sub parse_line ($) {
|
||||
my $line = shift; # Get the line to parse
|
||||
|
||||
# Parse get the type name and whether it's signed or unsigned
|
||||
#print "line=$line\n";
|
||||
if($line =~ /.*SIGNED\s*;\s*$/ || $line =~ /.*UNSIGNED\s*;\s*$/) {
|
||||
my $name; # The name of the type
|
||||
my $signed; # Whether the type is signed or not
|
||||
|
||||
# Get the type's name & signed status
|
||||
($name, $signed) = ($line =~ /^\s*(\w*)\s*,\s*(\w*)\s*;\s*$/);
|
||||
#print "name = '$name', signed = '$signed'\n";
|
||||
|
||||
# Append the type to the list of C types already parsed
|
||||
push @ctypes, [$name, $signed];
|
||||
|
||||
}
|
||||
# Unknown keyword
|
||||
else {
|
||||
die "unknown keyword: $line";
|
||||
}
|
||||
}
|
||||
|
||||
##############################################################################
|
||||
# Print the copyright into an open file
|
||||
#
|
||||
sub print_copyright ($) {
|
||||
my $fh = shift;
|
||||
|
||||
print $fh "/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n";
|
||||
print $fh " * Copyright by The HDF Group. *\n";
|
||||
print $fh " * Copyright by the Board of Trustees of the University of Illinois. *\n";
|
||||
print $fh " * All rights reserved. *\n";
|
||||
print $fh " * *\n";
|
||||
print $fh " * This file is part of HDF5. The full HDF5 copyright notice, including *\n";
|
||||
print $fh " * terms governing use, modification, and redistribution, is contained in *\n";
|
||||
print $fh " * the files COPYING and Copyright.html. COPYING can be found at the root *\n";
|
||||
print $fh " * of the source code distribution tree; Copyright.html can be found at the *\n";
|
||||
print $fh " * root level of an installed copy of the electronic HDF5 document set and *\n";
|
||||
print $fh " * is linked from the top-level documents page. It can also be found at *\n";
|
||||
print $fh " * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *\n";
|
||||
print $fh " * access to either file, you may request a copy from help\@hdfgroup.org. *\n";
|
||||
print $fh " * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */\n";
|
||||
}
|
||||
|
||||
##############################################################################
|
||||
# Print the "do not change this file" warning
|
||||
#
|
||||
sub print_warning ($) {
|
||||
my $fh = shift;
|
||||
|
||||
print $fh "\n/* Generated automatically by bin/make_overflow -- do not edit */\n";
|
||||
print $fh "/* Add new types to H5overflow.txt file */\n\n";
|
||||
}
|
||||
|
||||
##############################################################################
|
||||
# Print start of ifdef's to prevent a file from being re-included
|
||||
#
|
||||
sub print_startprotect ($$) {
|
||||
my ($fh, $file) = @_;
|
||||
|
||||
# Clip off the ".h" part of the name
|
||||
$file =~ s/(\w*)\.h/$1/;
|
||||
|
||||
# Print the ifdef info
|
||||
print $fh "\n#ifndef _${file}_H\n";
|
||||
print $fh "#define _${file}_H\n";
|
||||
}
|
||||
|
||||
##############################################################################
|
||||
# Print assignment overflow macros for each type
|
||||
#
|
||||
sub print_typemacros ($) {
|
||||
my $fh = shift; # File handle for output file
|
||||
my ($src_aref, $dst_aref); # References for each type's information
|
||||
|
||||
# Print the descriptive comment
|
||||
print $fh "\n\n/* Each type in this file is tested for assignment to the other types,\n";
|
||||
print $fh " * and range checks are defined for bad assignments at run-time.\n";
|
||||
print $fh " */\n";
|
||||
|
||||
for $src_aref (@ctypes) {
|
||||
# Print a descriptive comment
|
||||
print $fh "\n/* Assignment checks for @$src_aref[0] */\n\n";
|
||||
|
||||
for $dst_aref (@ctypes) {
|
||||
if (@$src_aref[0] ne @$dst_aref[0]) {
|
||||
# Print a descriptive comment
|
||||
print $fh "/* src: @$src_aref[0], dst: @$dst_aref[0] */\n";
|
||||
|
||||
# Print actual type size checks & macro definitions
|
||||
print $fh "#if H5_SIZEOF_", uc @$src_aref[0], " < H5_SIZEOF_", uc @$dst_aref[0], "\n";
|
||||
print $fh " #define ASSIGN_", @$src_aref[0], "_TO_", @$dst_aref[0], "(dst, dsttype, src, srctype) \\\n";
|
||||
if ( @$src_aref[1] eq @$dst_aref[1]) {
|
||||
print $fh " ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)\n";
|
||||
} elsif ( @$src_aref[1] eq "SIGNED") {
|
||||
print $fh " ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)\n";
|
||||
} else {
|
||||
print $fh " ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)\n";
|
||||
}
|
||||
print $fh "#elif H5_SIZEOF_", uc @$src_aref[0], " > H5_SIZEOF_", uc @$dst_aref[0], "\n";
|
||||
print $fh " #define ASSIGN_", @$src_aref[0], "_TO_", @$dst_aref[0], "(dst, dsttype, src, srctype) \\\n";
|
||||
print $fh " ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)\n";
|
||||
print $fh "#else /* H5_SIZEOF_", uc @$src_aref[0], " == H5_SIZEOF_", uc @$dst_aref[0], " */\n";
|
||||
print $fh " #define ASSIGN_", @$src_aref[0], "_TO_", @$dst_aref[0], "(dst, dsttype, src, srctype) \\\n";
|
||||
if ( @$src_aref[1] eq @$dst_aref[1]) {
|
||||
print $fh " ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)\n";
|
||||
} elsif ( @$src_aref[1] eq "SIGNED") {
|
||||
print $fh " ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)\n";
|
||||
} else {
|
||||
print $fh " ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)\n";
|
||||
}
|
||||
print $fh "#endif /* src: @$src_aref[0] dst: @$dst_aref[0] */\n\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
##############################################################################
|
||||
# Print end of ifdef's to prevent a file from being re-included
|
||||
#
|
||||
sub print_endprotect ($$) {
|
||||
my ($fh, $file) = @_;
|
||||
|
||||
# Clip off the ".h" part of the name
|
||||
$file =~ s/(\w*)\.h/$1/;
|
||||
|
||||
# Print the endif info
|
||||
print $fh "#endif /* ${file}_H */\n\n";
|
||||
}
|
||||
|
||||
##############################################################################
|
||||
# Create the generated portion of the public header file
|
||||
#
|
||||
sub create_public ($) {
|
||||
my $prefix = shift; # Get the prefix for the generated file
|
||||
my $file = "H5overflow.h"; # Name of file to generate
|
||||
my $name; # Name of function
|
||||
|
||||
# Rename previous file
|
||||
# rename "${prefix}${file}", "${prefix}${file}~" or die "unable to make backup";
|
||||
|
||||
# Open new header file
|
||||
open HEADER, ">${prefix}${file}" or die "unable to modify source";
|
||||
|
||||
# Create file contents
|
||||
print_copyright(*HEADER);
|
||||
print_warning(*HEADER);
|
||||
print_startprotect(*HEADER, $file);
|
||||
print_typemacros(*HEADER);
|
||||
print_endprotect(*HEADER, $file);
|
||||
|
||||
# Close header file
|
||||
close HEADER;
|
||||
}
|
||||
|
||||
##############################################################################
|
||||
# Read symbol version file (given as command-line argument) in and process it
|
||||
# into internal data structures, then create header files.
|
||||
#
|
||||
my $file; # Filename of input file
|
||||
|
||||
for $file (@ARGV) {
|
||||
my $prefix; # Local prefix for generated files
|
||||
my $line; # Line from input file
|
||||
|
||||
#print "file = '$file'\n";
|
||||
($prefix) = ($file =~ /(^.*\/)/);
|
||||
#print "prefix = '$prefix'\n";
|
||||
# Read in the entire file
|
||||
open SOURCE, $file or die "$file: $!\n";
|
||||
while ( defined ($line=<SOURCE>) ) {
|
||||
# Skip blank lines and those lines whose first character is a '#'
|
||||
if(!($line =~ /(^\s*#.*$)|(^\s*$)/)) {
|
||||
# Construct data structures for later printing
|
||||
parse_line($line);
|
||||
}
|
||||
}
|
||||
close SOURCE;
|
||||
|
||||
# Create header files
|
||||
print "Generating 'H5overflow.h'\n";
|
||||
create_public($prefix);
|
||||
}
|
||||
|
||||
@@ -106,6 +106,15 @@ sub print_globalapivers ($) {
|
||||
print $fh " * API symbol, the individual API version macro takes priority.\n";
|
||||
print $fh " */\n";
|
||||
|
||||
for $curr_idx ($min_sup_idx .. ($max_idx - 1)) {
|
||||
# Print API version ifdef
|
||||
print $fh "#if defined(H5_USE_1", ($curr_idx * 2), "_API_DEFAULT) && !defined(H5_USE_1", ($curr_idx * 2), "_API)\n";
|
||||
# Print API version definition
|
||||
print $fh "#define H5_USE_1", ($curr_idx * 2), "_API 1\n";
|
||||
# Print API version endif
|
||||
print $fh "#endif /* H5_USE_1", ($curr_idx * 2), "_API_DEFAULT && !H5_USE_1", ($curr_idx * 2), "_API */\n\n";
|
||||
}
|
||||
|
||||
# Loop over supported older library APIs and define the appropriate macros
|
||||
for $curr_idx ($min_sup_idx .. ($max_idx - 1)) {
|
||||
# Print API version ifdef
|
||||
|
||||
@@ -28,11 +28,11 @@
|
||||
# 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.61"
|
||||
AUTOMAKE_VERSION="automake (GNU automake) 1.10"
|
||||
AUTOHEADER_VERSION="autoheader (GNU Autoconf) 2.61"
|
||||
ACLOCAL_VERSION="aclocal (GNU automake) 1.10"
|
||||
LIBTOOL_VERSION="(GNU libtool) 1.5.22"
|
||||
AUTOCONF_VERSION="autoconf (GNU Autoconf) 2.64"
|
||||
AUTOMAKE_VERSION="automake (GNU automake) 1.11"
|
||||
AUTOHEADER_VERSION="autoheader (GNU Autoconf) 2.64"
|
||||
ACLOCAL_VERSION="aclocal (GNU automake) 1.11"
|
||||
LIBTOOL_VERSION="(GNU libtool) 2.2.6"
|
||||
#
|
||||
# When upgrading automake's version, don't forget to also update its
|
||||
# helper utilities, especially depcomp.
|
||||
@@ -41,19 +41,19 @@ LIBTOOL_VERSION="(GNU libtool) 1.5.22"
|
||||
# If paths to autotools are not specified by the user, assume tools are
|
||||
# running on kagiso and set paths accordingly.
|
||||
if test -z ${AUTOCONF}; then
|
||||
AUTOCONF=/home1/packages/autoconf/autoconf-2.61/bin/autoconf
|
||||
AUTOCONF=/mnt/hdf/packages/autoconf/autoconf-2.64/bin/autoconf
|
||||
fi
|
||||
if test -z ${AUTOMAKE}; then
|
||||
AUTOMAKE=/home1/packages/automake/automake-1.10.0/bin/automake-1.10
|
||||
AUTOMAKE=/mnt/hdf/packages/automake/automake-1.11/bin/automake-1.11
|
||||
fi
|
||||
if test -z ${AUTOHEADER}; then
|
||||
AUTOHEADER=/home1/packages/autoconf/autoconf-2.61/bin/autoheader
|
||||
AUTOHEADER=/mnt/hdf/packages/autoconf/autoconf-2.64/bin/autoheader
|
||||
fi
|
||||
if test -z ${ACLOCAL}; then
|
||||
ACLOCAL=/home1/packages/automake/automake-1.10.0/bin/aclocal-1.10
|
||||
ACLOCAL=/mnt/hdf/packages/automake/automake-1.11/bin/aclocal-1.11
|
||||
fi
|
||||
if test -z ${LIBTOOL}; then
|
||||
LIBTOOL=/home1/packages/libtool/libtool-1.5.22/bin/libtool
|
||||
LIBTOOL=/mnt/hdf/packages/libtool/libtool-2.2.6a/bin/libtool
|
||||
fi
|
||||
|
||||
# Check version numbers of all autotools against the "correct" versions
|
||||
@@ -84,7 +84,7 @@ if test -z "${LT_VERS}"; then
|
||||
fi
|
||||
|
||||
# Use the latest version of M4
|
||||
PATH=/home1/packages/m4/m4-1.4.7/bin:/home1/packages/m4/m4-1.4.7/share:$PATH
|
||||
PATH=/mnt/hdf/packages/m4/m4-1.4.7/bin:/mnt/hdf/packages/m4/m4-1.4.7/share:$PATH
|
||||
|
||||
# Make sure that the tools are in the path.
|
||||
AUTOCONF_DIR=`dirname ${AUTOCONF}`
|
||||
|
||||
79
bin/release
79
bin/release
@@ -14,42 +14,10 @@
|
||||
# access to either file, you may request a copy from help@hdfgroup.org.
|
||||
#
|
||||
|
||||
# Make a release of hdf5. The command-line switches are:
|
||||
# Make a release of hdf5.
|
||||
#
|
||||
# -d DIR The name of the directory where the releas(es) should be
|
||||
# placed. By default, the directory is ./releases
|
||||
#
|
||||
# --nocheck Ignore errors in MANIFEST file.
|
||||
#
|
||||
# --private Make a private release with today's date in version information.
|
||||
#
|
||||
# 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.
|
||||
# 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
|
||||
#
|
||||
# $ release gzip
|
||||
# releases/hdf5-1.0.38.tar.gz
|
||||
#
|
||||
# $ release -d /tmp tar compress gzip bzip2 md5 doc
|
||||
# /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
|
||||
# /tmp/hdf5-1.0.38_doc.tar
|
||||
# Programmer: Robb Matzke
|
||||
# Creation date: on or before 1998-01-29.
|
||||
#
|
||||
# Modifications
|
||||
# Robb Matzke, 1999-07-16
|
||||
@@ -59,6 +27,12 @@
|
||||
# Albert Cheng, 1999-10-26
|
||||
# Moved the MANIFEST checking to a separate command file so that
|
||||
# it can be invoked individually.
|
||||
#
|
||||
# Albert Cheng, 2004-08-14
|
||||
# Added the --private option.
|
||||
#
|
||||
# James Laird, 2005-09-07
|
||||
# Added the md5 method.
|
||||
|
||||
# Function definitions
|
||||
#
|
||||
@@ -70,6 +44,10 @@ Usage: $0 [--nocheck] [-d <dir>] [-h] <methods> ...
|
||||
-d DIR The name of the directory where the releas(es) should be
|
||||
placed. By default, the directory is ./releases
|
||||
|
||||
--docver BRANCHNAME This is added for 1.8 and beyond to get the correct
|
||||
version of documentation files from the hdf5docs
|
||||
repository. BRANCHNAME for v1.8 should be hdf5_1_8.
|
||||
|
||||
--nocheck Ignore errors in MANIFEST file.
|
||||
|
||||
--private Make a private release with today's date in version information.
|
||||
@@ -157,6 +135,10 @@ while [ -n "$1" ]; do
|
||||
--private)
|
||||
pmode=yes
|
||||
;;
|
||||
--docver)
|
||||
DOCVERSION=$1
|
||||
shift
|
||||
;;
|
||||
-*)
|
||||
echo "Unknown switch: $arg" 1>&2
|
||||
USAGE
|
||||
@@ -222,18 +204,25 @@ grep '^\.' MANIFEST | grep -v _DO_NOT_DISTRIBUTE_ >$MANIFEST
|
||||
|
||||
# Prepare the source tree for a release.
|
||||
ln -s `pwd` $tmpdir/$HDF5_VERS || exit 1
|
||||
mv Makefile $tmpdir/Makefile.x 2>/dev/null #might fail
|
||||
# Save a backup copy of Makefile if exists.
|
||||
test -f Makefile && mv Makefile $tmpdir/Makefile.x
|
||||
cp -p Makefile.dist Makefile
|
||||
|
||||
# Update README.txt and release_docs/RELEASE.txt with release information.
|
||||
# Update README.txt and release_docs/RELEASE.txt with release information in
|
||||
# line 1.
|
||||
for f in README.txt release_docs/RELEASE.txt; do
|
||||
echo "HDF5 version $VERS released on `date`" >$f.x
|
||||
tail +2l $f >>$f.x
|
||||
sed -e 1d $f >>$f.x
|
||||
mv $f.x $f
|
||||
# Make sure new files are of the right access mode
|
||||
chmod 644 $f
|
||||
done
|
||||
|
||||
# trunk is different than branches.
|
||||
if [ "${DOCVERSION}" ]; then
|
||||
DOC_URL=http://svn.hdfgroup.uiuc.edu/hdf5doc/branches/${DOCVERSION}
|
||||
fi
|
||||
|
||||
# Create the tar file
|
||||
test "$verbose" && echo " Running tar..." 1>&2
|
||||
( \
|
||||
@@ -265,16 +254,19 @@ for comp in $methods; do
|
||||
(cd $tmpdir; md5sum $HDF5_VERS.tar ) > $DEST/$HDF5_VERS.tar.md5
|
||||
;;
|
||||
doc)
|
||||
if [ "${DOCVERSION}" = "" ]; then
|
||||
DOCVERSION=trunk
|
||||
fi
|
||||
test "$verbose" && echo " Creating docs..." 1>&2
|
||||
# Check out docs from svn repo
|
||||
(cd $tmpdir; svn co $DOC_URL > /dev/null) || exit 1
|
||||
# Create doxygen C++ RM
|
||||
(cd c++/src && doxygen cpp_doc_config > /dev/null ) || exit 1
|
||||
# Replace version of C++ RM with just-created version
|
||||
rm -rf $tmpdir/trunk/html/$CPPLUS_RM_NAME
|
||||
mv c++/src/$CPPLUS_RM_NAME $tmpdir/trunk/html/$CPPLUS_RM_NAME
|
||||
# Compress the docs and move them to the release area
|
||||
mv $tmpdir/trunk $tmpdir/${HDF5_VERS}_docs
|
||||
rm -rf $tmpdir/${DOCVERSION}/html/$CPPLUS_RM_NAME
|
||||
mv c++/src/$CPPLUS_RM_NAME $tmpdir/${DOCVERSION}/html/$CPPLUS_RM_NAME
|
||||
# Compress the docs and move them to the release area
|
||||
mv $tmpdir/$DOCVERSION $tmpdir/${HDF5_VERS}_docs
|
||||
(cd $tmpdir && tar cf ${HDF5_VERS}_docs.tar ${HDF5_VERS}_docs)
|
||||
mv $tmpdir/${HDF5_VERS}_docs.tar $DEST
|
||||
;;
|
||||
@@ -284,7 +276,8 @@ done
|
||||
# Copy the RELEASE.txt to the release area.
|
||||
cp release_docs/RELEASE.txt $DEST/$HDF5_VERS-RELEASE.txt
|
||||
|
||||
# Restore previous Makefile if existed.
|
||||
# Remove distributed Makefile and restore previous Makefile if existed.
|
||||
rm -f Makefile
|
||||
test -f $tmpdir/Makefile.x && mv $tmpdir/Makefile.x Makefile
|
||||
|
||||
# Restore OLD version information, then no need for trap.
|
||||
|
||||
@@ -412,7 +412,7 @@ if [ "$cmd" = "all" -o -n "$cmdtest" -o -n "$cmddiff" ]; then
|
||||
TIMESTAMP "check-install" && \
|
||||
${MAKE} check-install && DISKUSAGE \
|
||||
TIMESTAMP "uninstall" && \
|
||||
${MAKE} uninstall-all) && DISKUSAGE ; then
|
||||
${MAKE} uninstall-all && DISKUSAGE); then
|
||||
:
|
||||
else
|
||||
errcode=$?
|
||||
|
||||
@@ -18,4 +18,6 @@
|
||||
# latest revision of that branch. If set to "hdf5", it uses the main
|
||||
# version.
|
||||
# H5VER tells runtest which version to run
|
||||
H5VERSION=hdf5
|
||||
H5VERSION=hdf5_1_8
|
||||
H5VER="-r1.8"
|
||||
|
||||
|
||||
@@ -104,7 +104,9 @@ $Source = "";
|
||||
"H5FD_stream_fapl_t" => "x",
|
||||
"H5G_iterate_t" => "x",
|
||||
"H5G_info_t" => "x",
|
||||
"H5I_free_t" => "x",
|
||||
"H5L_class_t" => "x",
|
||||
"H5L_elink_traverse_t" => "x",
|
||||
"H5L_iterate_t" => "x",
|
||||
"H5MM_allocate_t" => "x",
|
||||
"H5MM_free_t" => "x",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
Copyright by The HDF Group (THG) and
|
||||
Copyright by The HDF Group and
|
||||
The Board of Trustees of the University of Illinois.
|
||||
All rights reserved.
|
||||
|
||||
|
||||
230
c++/Makefile.in
230
c++/Makefile.in
@@ -1,8 +1,9 @@
|
||||
# Makefile.in generated by automake 1.10 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.11 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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,8 +33,9 @@
|
||||
#
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
@@ -60,6 +62,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/src/H5config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
@@ -71,12 +74,52 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
ps-recursive uninstall-recursive
|
||||
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
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
am__tty_colors = \
|
||||
red=; grn=; lgn=; blu=; std=
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
am__relativize = \
|
||||
dir0=`pwd`; \
|
||||
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
|
||||
sed_rest='s,^[^/]*/*,,'; \
|
||||
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
|
||||
sed_butlast='s,/*[^/]*$$,,'; \
|
||||
while test -n "$$dir1"; do \
|
||||
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
|
||||
if test "$$first" != "."; then \
|
||||
if test "$$first" = ".."; then \
|
||||
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
|
||||
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
|
||||
else \
|
||||
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
|
||||
if test "$$first2" = "$$first"; then \
|
||||
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
|
||||
else \
|
||||
dir2="../$$dir2"; \
|
||||
fi; \
|
||||
dir0="$$dir0"/"$$first"; \
|
||||
fi; \
|
||||
fi; \
|
||||
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
|
||||
ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@
|
||||
AMTAR = @AMTAR@
|
||||
|
||||
# H5_CFLAGS holds flags that should be used when building hdf5,
|
||||
# but which should not be exported to h5cc for building other programs.
|
||||
# AM_CFLAGS is an automake construct which should be used by Makefiles
|
||||
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
|
||||
AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
|
||||
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@
|
||||
AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
|
||||
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
|
||||
AM_LDFLAGS = @AM_LDFLAGS@
|
||||
AM_MAKEFLAGS = @AM_MAKEFLAGS@
|
||||
AR = @AR@
|
||||
|
||||
@@ -90,46 +133,47 @@ BYTESEX = @BYTESEX@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CC_VERSION = @CC_VERSION@
|
||||
|
||||
# H5_CFLAGS holds flags that should be used as CFLAGS when building hdf5,
|
||||
# but which shouldn't be exported to h5cc for building other programs.
|
||||
CFLAGS = @CFLAGS@ @H5_CFLAGS@
|
||||
CFLAGS = @CFLAGS@
|
||||
CLEARFILEBUF = @CLEARFILEBUF@
|
||||
CODESTACK = @CODESTACK@
|
||||
CONFIG_DATE = @CONFIG_DATE@
|
||||
CONFIG_MODE = @CONFIG_MODE@
|
||||
CONFIG_USER = @CONFIG_USER@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@ @H5_CPPFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@ @H5_CXXFLAGS@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEBUG_PKG = @DEBUG_PKG@
|
||||
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
|
||||
DIRECT_VFD = @DIRECT_VFD@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
DYNAMIC_DIRS = @DYNAMIC_DIRS@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
EXTERNAL_FILTERS = @EXTERNAL_FILTERS@
|
||||
|
||||
# Make sure that these variables are exported to the Makefiles
|
||||
F9XMODEXT = @F9XMODEXT@
|
||||
F9XMODFLAG = @F9XMODFLAG@
|
||||
F9XSUFFIXFLAG = @F9XSUFFIXFLAG@
|
||||
FC = @FC@
|
||||
FCFLAGS = @FCFLAGS@ @H5_FCFLAGS@
|
||||
FCFLAGS = @FCFLAGS@
|
||||
FCFLAGS_f90 = @FCFLAGS_f90@
|
||||
FCLIBS = @FCLIBS@
|
||||
FFLAGS = @FFLAGS@
|
||||
FGREP = @FGREP@
|
||||
FILTERS = @FILTERS@
|
||||
FSEARCH_DIRS = @FSEARCH_DIRS@
|
||||
GPFS = @GPFS@
|
||||
GREP = @GREP@
|
||||
H5_CFLAGS = @H5_CFLAGS@
|
||||
H5_CPPFLAGS = @H5_CPPFLAGS@
|
||||
@@ -138,11 +182,14 @@ H5_FCFLAGS = @H5_FCFLAGS@
|
||||
H5_LONE_COLON = @H5_LONE_COLON@
|
||||
H5_VERSION = @H5_VERSION@
|
||||
HADDR_T = @HADDR_T@
|
||||
HAVE_DMALLOC = @HAVE_DMALLOC@
|
||||
HDF5_HL = @HDF5_HL@
|
||||
HDF5_INTERFACES = @HDF5_INTERFACES@
|
||||
HDF_CXX = @HDF_CXX@
|
||||
HDF_FORTRAN = @HDF_FORTRAN@
|
||||
HID_T = @HID_T@
|
||||
HL = @HL@
|
||||
HL_FOR = @HL_FOR@
|
||||
HSIZET = @HSIZET@
|
||||
HSIZE_T = @HSIZE_T@
|
||||
HSSIZE_T = @HSSIZE_T@
|
||||
INSTALL = @INSTALL@
|
||||
@@ -150,11 +197,16 @@ INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INSTRUMENT = @INSTRUMENT@
|
||||
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LINUX_LFS = @LINUX_LFS@
|
||||
LIPO = @LIPO@
|
||||
LL_PATH = @LL_PATH@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_STATIC_EXEC = @LT_STATIC_EXEC@
|
||||
@@ -163,13 +215,19 @@ MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MPE = @MPE@
|
||||
MPI_GET_SIZE = @MPI_GET_SIZE@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PARALLEL = @PARALLEL@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
@@ -182,22 +240,21 @@ RUNSERIAL = @RUNSERIAL@
|
||||
R_INTEGER = @R_INTEGER@
|
||||
R_LARGE = @R_LARGE@
|
||||
SEARCH = @SEARCH@
|
||||
SED = @SED@
|
||||
SETX = @SETX@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
|
||||
# Hardcode SHELL to be /bin/sh. Most machines have this shell, and
|
||||
# on at least one machine configure fails to detect its existence (janus).
|
||||
# Also, when HDF5 is configured on one machine but run on another,
|
||||
# configure's automatic SHELL detection may not work on the build machine.
|
||||
SHELL = /bin/sh
|
||||
SHELL = @SHELL@
|
||||
SIZE_T = @SIZE_T@
|
||||
STATIC_EXEC = @STATIC_EXEC@
|
||||
STATIC_SHARED = @STATIC_SHARED@
|
||||
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
|
||||
STRIP = @STRIP@
|
||||
TESTPARALLEL = @TESTPARALLEL@
|
||||
THREADSAFE = @THREADSAFE@
|
||||
TIME = @TIME@
|
||||
TR = @TR@
|
||||
TRACE_API = @TRACE_API@
|
||||
UNAME_INFO = @UNAME_INFO@
|
||||
USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@
|
||||
USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@
|
||||
USE_FILTER_NBIT = @USE_FILTER_NBIT@
|
||||
@@ -206,13 +263,14 @@ USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@
|
||||
USE_FILTER_SZIP = @USE_FILTER_SZIP@
|
||||
USINGMEMCHECKER = @USINGMEMCHECKER@
|
||||
VERSION = @VERSION@
|
||||
WORDS_BIGENDIAN = @WORDS_BIGENDIAN@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
ac_ct_FC = @ac_ct_FC@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
@@ -228,8 +286,12 @@ build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
|
||||
# Install directories that automake doesn't know about
|
||||
docdir = $(exec_prefix)/doc
|
||||
dvidir = @dvidir@
|
||||
enable_shared = @enable_shared@
|
||||
enable_static = @enable_static@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
@@ -237,15 +299,14 @@ host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
|
||||
# Install directories that automake doesn't know about
|
||||
includedir = $(exec_prefix)/include
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
lt_ECHO = @lt_ECHO@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
@@ -258,6 +319,7 @@ sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
@@ -327,14 +389,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign c++/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign c++/Makefile
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign c++/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign c++/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
@@ -352,6 +414,7 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
@@ -383,7 +446,7 @@ $(RECURSIVE_TARGETS):
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
@@ -417,16 +480,16 @@ $(RECURSIVE_CLEAN_TARGETS):
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
($(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" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
@@ -434,14 +497,14 @@ ID: $(HEADERS) $(SOURCES) $(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; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
$(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=; \
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
@@ -453,39 +516,43 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
|
||||
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; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
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; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
@@ -506,29 +573,44 @@ distdir: $(DISTFILES)
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
distdir=`$(am__cd) $(distdir) && pwd`; \
|
||||
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
|
||||
(cd $$subdir && \
|
||||
fi; \
|
||||
done
|
||||
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
|
||||
$(am__relativize); \
|
||||
new_distdir=$$reldir; \
|
||||
dir1=$$subdir; dir2="$(top_distdir)"; \
|
||||
$(am__relativize); \
|
||||
new_top_distdir=$$reldir; \
|
||||
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
|
||||
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
|
||||
($(am__cd) $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$top_distdir" \
|
||||
distdir="$$distdir/$$subdir" \
|
||||
top_distdir="$$new_top_distdir" \
|
||||
distdir="$$new_distdir" \
|
||||
am__remove_distdir=: \
|
||||
am__skip_length_check=: \
|
||||
am__skip_mode_fix=: \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
@@ -559,6 +641,7 @@ clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@@ -577,6 +660,8 @@ dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
@@ -585,18 +670,28 @@ install-data-am:
|
||||
|
||||
install-dvi: install-dvi-recursive
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-recursive
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-recursive
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-recursive
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am: installcheck-local
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
@@ -618,8 +713,8 @@ ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
|
||||
install-strip
|
||||
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) check-am \
|
||||
ctags-recursive install-am install-strip tags-recursive
|
||||
|
||||
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
|
||||
all all-am all-local check check-TESTS check-am clean \
|
||||
@@ -752,10 +847,10 @@ $(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
|
||||
echo "No need to test $${tname} again."; \
|
||||
else \
|
||||
echo "============================" > $${log}; \
|
||||
if test "X$(HDF_FORTRAN)" = "Xyes"; then \
|
||||
if test "X$(FORTRAN_API)" = "Xyes"; then \
|
||||
echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
|
||||
echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
|
||||
elif test "X$(HDF_CXX)" = "Xyes"; then \
|
||||
elif test "X$(CXX_API)" = "Xyes"; then \
|
||||
echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
|
||||
echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\
|
||||
else \
|
||||
@@ -791,10 +886,10 @@ $(TEST_SCRIPT_CHKSH) $(TEST_SCRIPT_PARA_CHKSH) dummysh.chkexe_:
|
||||
echo "No need to test $${tname} again."; \
|
||||
else \
|
||||
echo "============================" > $${log}; \
|
||||
if test "X$(HDF_FORTRAN)" = "Xyes"; then \
|
||||
if test "X$(FORTRAN_API)" = "Xyes"; then \
|
||||
echo "Fortran API: Testing $${tname} $(TEST_FLAGS)"; \
|
||||
echo "Fortran API: $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
|
||||
elif test "X$(HDF_CXX)" = "Xyes"; then \
|
||||
elif test "X$(CXX_API)" = "Xyes"; then \
|
||||
echo "C++ API: Testing $${tname} $(TEST_FLAGS)"; \
|
||||
echo "C++ API: $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
|
||||
else \
|
||||
@@ -858,6 +953,7 @@ check-vfd: $(LIB) $(PROGS) $(TESTS)
|
||||
HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
# 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.
|
||||
.NOEXPORT:
|
||||
|
||||
@@ -35,7 +35,7 @@ readdata.chkexe_: create.chkexe_
|
||||
chunks.chkexe_: extend_ds.chkexe_
|
||||
|
||||
# Tell conclude.am that these are C++ tests.
|
||||
HDF_CXX=yes
|
||||
CXX_API=yes
|
||||
|
||||
# Where to install examples
|
||||
EXAMPLEDIR=$(docdir)/hdf5/examples/c++
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
# Makefile.in generated by automake 1.10 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.11 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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,8 +37,9 @@
|
||||
# This creates some extra work for us.
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
@@ -65,12 +67,25 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/src/H5config.h
|
||||
CONFIG_CLEAN_FILES = testh5c++.sh
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__tty_colors = \
|
||||
red=; grn=; lgn=; blu=; std=
|
||||
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
|
||||
ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@
|
||||
AMTAR = @AMTAR@
|
||||
|
||||
# H5_CFLAGS holds flags that should be used when building hdf5,
|
||||
# but which should not be exported to h5cc for building other programs.
|
||||
# AM_CFLAGS is an automake construct which should be used by Makefiles
|
||||
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
|
||||
AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
|
||||
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@
|
||||
AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
|
||||
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
|
||||
AM_LDFLAGS = @AM_LDFLAGS@
|
||||
AM_MAKEFLAGS = @AM_MAKEFLAGS@
|
||||
AR = @AR@
|
||||
|
||||
@@ -84,46 +99,47 @@ BYTESEX = @BYTESEX@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CC_VERSION = @CC_VERSION@
|
||||
|
||||
# H5_CFLAGS holds flags that should be used as CFLAGS when building hdf5,
|
||||
# but which shouldn't be exported to h5cc for building other programs.
|
||||
CFLAGS = @CFLAGS@ @H5_CFLAGS@
|
||||
CFLAGS = @CFLAGS@
|
||||
CLEARFILEBUF = @CLEARFILEBUF@
|
||||
CODESTACK = @CODESTACK@
|
||||
CONFIG_DATE = @CONFIG_DATE@
|
||||
CONFIG_MODE = @CONFIG_MODE@
|
||||
CONFIG_USER = @CONFIG_USER@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@ @H5_CPPFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@ @H5_CXXFLAGS@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEBUG_PKG = @DEBUG_PKG@
|
||||
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
|
||||
DIRECT_VFD = @DIRECT_VFD@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
DYNAMIC_DIRS = @DYNAMIC_DIRS@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
EXTERNAL_FILTERS = @EXTERNAL_FILTERS@
|
||||
|
||||
# Make sure that these variables are exported to the Makefiles
|
||||
F9XMODEXT = @F9XMODEXT@
|
||||
F9XMODFLAG = @F9XMODFLAG@
|
||||
F9XSUFFIXFLAG = @F9XSUFFIXFLAG@
|
||||
FC = @FC@
|
||||
FCFLAGS = @FCFLAGS@ @H5_FCFLAGS@
|
||||
FCFLAGS = @FCFLAGS@
|
||||
FCFLAGS_f90 = @FCFLAGS_f90@
|
||||
FCLIBS = @FCLIBS@
|
||||
FFLAGS = @FFLAGS@
|
||||
FGREP = @FGREP@
|
||||
FILTERS = @FILTERS@
|
||||
FSEARCH_DIRS = @FSEARCH_DIRS@
|
||||
GPFS = @GPFS@
|
||||
GREP = @GREP@
|
||||
H5_CFLAGS = @H5_CFLAGS@
|
||||
H5_CPPFLAGS = @H5_CPPFLAGS@
|
||||
@@ -132,11 +148,14 @@ H5_FCFLAGS = @H5_FCFLAGS@
|
||||
H5_LONE_COLON = @H5_LONE_COLON@
|
||||
H5_VERSION = @H5_VERSION@
|
||||
HADDR_T = @HADDR_T@
|
||||
HAVE_DMALLOC = @HAVE_DMALLOC@
|
||||
HDF5_HL = @HDF5_HL@
|
||||
HDF5_INTERFACES = @HDF5_INTERFACES@
|
||||
HDF_CXX = @HDF_CXX@
|
||||
HDF_FORTRAN = @HDF_FORTRAN@
|
||||
HID_T = @HID_T@
|
||||
HL = @HL@
|
||||
HL_FOR = @HL_FOR@
|
||||
HSIZET = @HSIZET@
|
||||
HSIZE_T = @HSIZE_T@
|
||||
HSSIZE_T = @HSSIZE_T@
|
||||
INSTALL = @INSTALL@
|
||||
@@ -144,11 +163,16 @@ INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INSTRUMENT = @INSTRUMENT@
|
||||
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LINUX_LFS = @LINUX_LFS@
|
||||
LIPO = @LIPO@
|
||||
LL_PATH = @LL_PATH@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_STATIC_EXEC = @LT_STATIC_EXEC@
|
||||
@@ -157,13 +181,19 @@ MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MPE = @MPE@
|
||||
MPI_GET_SIZE = @MPI_GET_SIZE@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PARALLEL = @PARALLEL@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
@@ -176,22 +206,21 @@ RUNSERIAL = @RUNSERIAL@
|
||||
R_INTEGER = @R_INTEGER@
|
||||
R_LARGE = @R_LARGE@
|
||||
SEARCH = @SEARCH@
|
||||
SED = @SED@
|
||||
SETX = @SETX@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
|
||||
# Hardcode SHELL to be /bin/sh. Most machines have this shell, and
|
||||
# on at least one machine configure fails to detect its existence (janus).
|
||||
# Also, when HDF5 is configured on one machine but run on another,
|
||||
# configure's automatic SHELL detection may not work on the build machine.
|
||||
SHELL = /bin/sh
|
||||
SHELL = @SHELL@
|
||||
SIZE_T = @SIZE_T@
|
||||
STATIC_EXEC = @STATIC_EXEC@
|
||||
STATIC_SHARED = @STATIC_SHARED@
|
||||
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
|
||||
STRIP = @STRIP@
|
||||
TESTPARALLEL = @TESTPARALLEL@
|
||||
THREADSAFE = @THREADSAFE@
|
||||
TIME = @TIME@
|
||||
TR = @TR@
|
||||
TRACE_API = @TRACE_API@
|
||||
UNAME_INFO = @UNAME_INFO@
|
||||
USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@
|
||||
USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@
|
||||
USE_FILTER_NBIT = @USE_FILTER_NBIT@
|
||||
@@ -200,13 +229,14 @@ USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@
|
||||
USE_FILTER_SZIP = @USE_FILTER_SZIP@
|
||||
USINGMEMCHECKER = @USINGMEMCHECKER@
|
||||
VERSION = @VERSION@
|
||||
WORDS_BIGENDIAN = @WORDS_BIGENDIAN@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
ac_ct_FC = @ac_ct_FC@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
@@ -222,8 +252,12 @@ build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
|
||||
# Install directories that automake doesn't know about
|
||||
docdir = $(exec_prefix)/doc
|
||||
dvidir = @dvidir@
|
||||
enable_shared = @enable_shared@
|
||||
enable_static = @enable_static@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
@@ -231,15 +265,14 @@ host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
|
||||
# Install directories that automake doesn't know about
|
||||
includedir = $(exec_prefix)/include
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
lt_ECHO = @lt_ECHO@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
@@ -252,6 +285,7 @@ sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
@@ -308,7 +342,7 @@ INSTALL_FILES = create.cpp readdata.cpp writedata.cpp compound.cpp \
|
||||
|
||||
|
||||
# Tell conclude.am that these are C++ tests.
|
||||
HDF_CXX = yes
|
||||
CXX_API = yes
|
||||
|
||||
# Where to install examples
|
||||
EXAMPLEDIR = $(docdir)/hdf5/examples/c++
|
||||
@@ -344,14 +378,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign c++/examples/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign c++/examples/Makefile
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign c++/examples/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign c++/examples/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
@@ -369,6 +403,7 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
testh5c++.sh: $(top_builddir)/config.status $(srcdir)/testh5c++.sh.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
|
||||
|
||||
@@ -400,13 +435,17 @@ distdir: $(DISTFILES)
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
@@ -437,6 +476,7 @@ clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@@ -455,6 +495,8 @@ dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
@@ -463,18 +505,28 @@ install-data-am: install-data-local
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am: installcheck-local
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
@@ -496,7 +548,7 @@ ps-am:
|
||||
|
||||
uninstall-am: uninstall-local
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
.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 \
|
||||
@@ -665,10 +717,10 @@ $(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
|
||||
echo "No need to test $${tname} again."; \
|
||||
else \
|
||||
echo "============================" > $${log}; \
|
||||
if test "X$(HDF_FORTRAN)" = "Xyes"; then \
|
||||
if test "X$(FORTRAN_API)" = "Xyes"; then \
|
||||
echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
|
||||
echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
|
||||
elif test "X$(HDF_CXX)" = "Xyes"; then \
|
||||
elif test "X$(CXX_API)" = "Xyes"; then \
|
||||
echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
|
||||
echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\
|
||||
else \
|
||||
@@ -704,10 +756,10 @@ $(TEST_SCRIPT_CHKSH) $(TEST_SCRIPT_PARA_CHKSH) dummysh.chkexe_:
|
||||
echo "No need to test $${tname} again."; \
|
||||
else \
|
||||
echo "============================" > $${log}; \
|
||||
if test "X$(HDF_FORTRAN)" = "Xyes"; then \
|
||||
if test "X$(FORTRAN_API)" = "Xyes"; then \
|
||||
echo "Fortran API: Testing $${tname} $(TEST_FLAGS)"; \
|
||||
echo "Fortran API: $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
|
||||
elif test "X$(HDF_CXX)" = "Xyes"; then \
|
||||
elif test "X$(CXX_API)" = "Xyes"; then \
|
||||
echo "C++ API: Testing $${tname} $(TEST_FLAGS)"; \
|
||||
echo "C++ API: $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
|
||||
else \
|
||||
@@ -771,6 +823,7 @@ check-vfd: $(LIB) $(PROGS) $(TESTS)
|
||||
HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
# 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.
|
||||
.NOEXPORT:
|
||||
|
||||
@@ -80,7 +80,7 @@ int main (void)
|
||||
hsize_t dims[2]; // dataset dimensions
|
||||
rank = filespace.getSimpleExtentDims( dims );
|
||||
cout << "dataset rank = " << rank << ", dimensions "
|
||||
<< (unsigned long)(dims[0]) << " x "
|
||||
<< (unsigned long)(dims[0]) << " x "
|
||||
<< (unsigned long)(dims[1]) << endl;
|
||||
|
||||
/*
|
||||
|
||||
@@ -94,7 +94,7 @@ int main(void)
|
||||
* Create the first dataset.
|
||||
*/
|
||||
DataSet* dataset = new DataSet(file->createDataSet(
|
||||
"/Data/Compressed_Data", PredType::NATIVE_INT,
|
||||
"/Data/Compressed_Data", PredType::NATIVE_INT,
|
||||
*dataspace, ds_creatplist ));
|
||||
|
||||
/*
|
||||
@@ -109,7 +109,7 @@ int main(void)
|
||||
dims[0] = 500;
|
||||
dims[1] = 20;
|
||||
dataspace = new DataSpace(RANK, dims); // create second dspace
|
||||
dataset = new DataSet(file->createDataSet("/Data/Float_Data",
|
||||
dataset = new DataSet(file->createDataSet("/Data/Float_Data",
|
||||
PredType::NATIVE_FLOAT, *dataspace));
|
||||
|
||||
delete dataset;
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# 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.
|
||||
|
||||
CMP='cmp -s'
|
||||
DIFF='diff -c'
|
||||
|
||||
nerrors=0
|
||||
verbose=yes
|
||||
|
||||
# The build (current) directory might be different than the source directory.
|
||||
if test -z "$srcdir"; then
|
||||
srcdir=.
|
||||
fi
|
||||
|
||||
actual=sample.out
|
||||
expect=$srcdir/expected.out
|
||||
|
||||
# Print a line-line message left justified in a field of 70 characters
|
||||
# beginning with the word "Testing".
|
||||
TESTING()
|
||||
{
|
||||
SPACES=" "
|
||||
echo "Testing $* $SPACES" |cut -c1-70 |tr -d '\012'
|
||||
}
|
||||
|
||||
TESTING C++ Examples
|
||||
|
||||
(
|
||||
./create
|
||||
./readdata
|
||||
./writedata
|
||||
./compound
|
||||
./extend_ds
|
||||
./chunks
|
||||
./h5group
|
||||
) > $actual
|
||||
|
||||
if $CMP $expect $actual; then
|
||||
echo " PASSED"
|
||||
else
|
||||
echo "*FAILED*"
|
||||
echo " Expected result differs from actual result"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
test yes = "$verbose" && $DIFF $expect $actual | sed 's/^/ /'
|
||||
fi
|
||||
|
||||
# Clean up output file
|
||||
if test -z "$HDF5_NOCLEANUP"; then
|
||||
rm -f $actual
|
||||
fi
|
||||
|
||||
if test $nerrors -eq 0 ; then
|
||||
echo "All tests passed."
|
||||
fi
|
||||
|
||||
exit $nerrors
|
||||
@@ -22,8 +22,8 @@
|
||||
# Initializations
|
||||
# Where the tool is installed.
|
||||
prefix="${prefix:-@prefix@}"
|
||||
AR=@AR@
|
||||
RANLIB=@RANLIB@
|
||||
AR="@AR@"
|
||||
RANLIB="@RANLIB@"
|
||||
H5TOOL="h5c++" # The tool name
|
||||
H5TOOL_BIN="${prefix}/bin/${H5TOOL}" # The path of the tool binary
|
||||
|
||||
|
||||
@@ -25,6 +25,11 @@
|
||||
#include "H5CommonFG.h"
|
||||
#include "H5Alltypes.h"
|
||||
|
||||
#include <iostream> // remove when done
|
||||
|
||||
using std::cerr;
|
||||
using std::endl;
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
#endif
|
||||
@@ -34,21 +39,21 @@ namespace H5 {
|
||||
///\brief Default constructor
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
AbstractDs::AbstractDs() : H5Object() {}
|
||||
AbstractDs::AbstractDs(){}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: AbstractDs default constructor
|
||||
///\brief Creates an AbstractDs instance using an existing id.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
AbstractDs::AbstractDs( const hid_t ds_id ) : H5Object( ds_id ) {}
|
||||
AbstractDs::AbstractDs(const hid_t ds_id){}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: AbstractDs copy constructor
|
||||
///\brief Copy constructor: makes a copy of the original AbstractDs object.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
AbstractDs::AbstractDs( const AbstractDs& original ) : H5Object( original ) {}
|
||||
AbstractDs::AbstractDs(const AbstractDs& original){}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: AbstractDs::getTypeClass
|
||||
@@ -80,8 +85,10 @@ H5T_class_t AbstractDs::getTypeClass() const
|
||||
return( type_class );
|
||||
else
|
||||
{
|
||||
throw DataTypeIException(inMemFunc("getTypeClass"),
|
||||
"H5Tget_class returns H5T_NO_CLASS");
|
||||
if (fromClass() == "DataSet")
|
||||
throw DataTypeIException("DataSet::getTypeClass", "H5Tget_class returns H5T_NO_CLASS");
|
||||
else if (fromClass() == "Attribute")
|
||||
throw DataTypeIException("Attribute::getTypeClass", "H5Tget_class returns H5T_NO_CLASS");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ class FloatType;
|
||||
class IntType;
|
||||
class StrType;
|
||||
class VarLenType;
|
||||
class H5_DLLCPP AbstractDs : public H5Object {
|
||||
class H5_DLLCPP AbstractDs {
|
||||
public:
|
||||
// Gets a copy the datatype of that this abstract dataset uses.
|
||||
// Note that this datatype is a generic one and can only be accessed
|
||||
@@ -51,6 +51,9 @@ class H5_DLLCPP AbstractDs : public H5Object {
|
||||
StrType getStrType() const;
|
||||
VarLenType getVarLenType() const;
|
||||
|
||||
// Gets the size in memory of this abstract dataset.
|
||||
virtual size_t getInMemDataSize() const = 0;
|
||||
|
||||
// Gets the dataspace of this abstract dataset - pure virtual.
|
||||
virtual DataSpace getSpace() const = 0;
|
||||
|
||||
@@ -62,6 +65,9 @@ class H5_DLLCPP AbstractDs : public H5Object {
|
||||
// dataset - pure virtual.
|
||||
virtual hsize_t getStorageSize() const = 0;
|
||||
|
||||
// Returns this class name
|
||||
virtual H5std_string fromClass() const = 0;
|
||||
|
||||
// Copy constructor
|
||||
AbstractDs( const AbstractDs& original );
|
||||
|
||||
|
||||
@@ -36,7 +36,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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -57,7 +57,7 @@ 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"); }
|
||||
|
||||
// Copy constructor - makes copy of the original object
|
||||
|
||||
@@ -26,12 +26,15 @@
|
||||
#include "H5PropList.h"
|
||||
#include "H5Object.h"
|
||||
#include "H5AbstractDs.h"
|
||||
#include "H5Attribute.h"
|
||||
#include "H5FaccProp.h"
|
||||
#include "H5FcreatProp.h"
|
||||
#include "H5DcreatProp.h"
|
||||
#include "H5CommonFG.h"
|
||||
#include "H5DataType.h"
|
||||
#include "H5DataSpace.h"
|
||||
#include "H5private.h"
|
||||
#include "H5File.h"
|
||||
#include "H5Attribute.h"
|
||||
#include "H5private.h" // for HDfree
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
@@ -46,7 +49,7 @@ namespace H5 {
|
||||
///\brief Default constructor: Creates a stub attribute
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
Attribute::Attribute() : AbstractDs() {}
|
||||
Attribute::Attribute() : AbstractDs(), IdComponent(), id(0) {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Attribute copy constructor
|
||||
@@ -54,7 +57,11 @@ Attribute::Attribute() : AbstractDs() {}
|
||||
///\param original - IN: Original Attribute object to copy
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
Attribute::Attribute( const Attribute& original ) : AbstractDs( original ) {}
|
||||
Attribute::Attribute(const Attribute& original) : AbstractDs(), IdComponent()
|
||||
{
|
||||
id = original.getId();
|
||||
incRefCount(); // increment number of references to this id
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Attribute overloaded constructor
|
||||
@@ -64,7 +71,10 @@ Attribute::Attribute( const Attribute& original ) : AbstractDs( original ) {}
|
||||
///\exception H5::AttributeIException
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
Attribute::Attribute(const hid_t existing_id) : AbstractDs(existing_id) {}
|
||||
Attribute::Attribute(const hid_t existing_id) : AbstractDs(), IdComponent()
|
||||
{
|
||||
id = existing_id;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Attribute::write
|
||||
@@ -86,23 +96,40 @@ void Attribute::write( const DataType& mem_type, const void *buf ) const
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Attribute::write
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It writes a \a std::string to this attribute.
|
||||
/// It writes a \a H5std_string to this attribute.
|
||||
///\param mem_type - IN: Attribute datatype (in memory)
|
||||
///\param strg - IN: Data to be written
|
||||
///\exception H5::AttributeIException
|
||||
// Programmer Binh-Minh Ribler - Apr, 2003
|
||||
//--------------------------------------------------------------------------
|
||||
void Attribute::write( const DataType& mem_type, const H5std_string& strg ) const
|
||||
void Attribute::write(const DataType& mem_type, const H5std_string& strg) const
|
||||
{
|
||||
// Convert string to C-string
|
||||
const char* strg_C;
|
||||
strg_C = strg.c_str(); // strg_C refers to the contents of strg as a C-str
|
||||
// Check if this attribute has variable-len string or fixed-len string and
|
||||
// proceed appropriately.
|
||||
htri_t is_variable_len = H5Tis_variable_str(mem_type.getId());
|
||||
if (is_variable_len < 0)
|
||||
{
|
||||
throw AttributeIException("Attribute::write", "H5Tis_variable_str failed");
|
||||
}
|
||||
// Convert string to C-string
|
||||
const char* strg_C;
|
||||
strg_C = strg.c_str(); // strg_C refers to the contents of strg as a C-str
|
||||
herr_t ret_value = 0;
|
||||
|
||||
herr_t ret_value = H5Awrite( id, mem_type.getId(), &strg_C );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw AttributeIException("Attribute::write", "H5Awrite failed");
|
||||
}
|
||||
// Pass string in differently depends on variable or fixed length
|
||||
if (!is_variable_len)
|
||||
{
|
||||
ret_value = H5Awrite(id, mem_type.getId(), strg_C);
|
||||
}
|
||||
else
|
||||
{
|
||||
// passing third argument by address
|
||||
ret_value = H5Awrite(id, mem_type.getId(), &strg_C);
|
||||
}
|
||||
if (ret_value < 0)
|
||||
{
|
||||
throw AttributeIException("Attribute::write", "H5Awrite failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -118,35 +145,95 @@ void Attribute::read( const DataType& mem_type, void *buf ) const
|
||||
herr_t ret_value = H5Aread( id, mem_type.getId(), buf );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw AttributeIException("Attribute::read", "H5Aread failed");
|
||||
throw AttributeIException("Attribute::read", "H5Aread failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Attribute::read
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It reads a \a std::string from this attribute.
|
||||
/// It reads a \a H5std_string from this attribute.
|
||||
///\param mem_type - IN: Attribute datatype (in memory)
|
||||
///\param strg - IN: Buffer for read string
|
||||
///\exception H5::AttributeIException
|
||||
// Programmer Binh-Minh Ribler - Apr, 2003
|
||||
// Modification
|
||||
// 2006/12/9 - H5Aread allocates memory for character string
|
||||
// buffer with malloc, therefore, no allocation here,
|
||||
// but HDfree is needed. - BMR
|
||||
// Mar 2008
|
||||
// Corrected a misunderstanding that H5Aread would allocate
|
||||
// space for the buffer. Obtained the attribute size and
|
||||
// allocated memory properly. - BMR
|
||||
// Apr 2009
|
||||
// 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.
|
||||
//--------------------------------------------------------------------------
|
||||
void Attribute::read( const DataType& mem_type, H5std_string& strg ) const
|
||||
void Attribute::read(const DataType& mem_type, H5std_string& strg) const
|
||||
{
|
||||
char* strg_C; // temporary C-string for C API
|
||||
// Check if this attribute has variable-len string or fixed-len string and
|
||||
// proceed appropriately.
|
||||
htri_t is_variable_len = H5Tis_variable_str(mem_type.getId());
|
||||
if (is_variable_len < 0)
|
||||
{
|
||||
throw AttributeIException("Attribute::read", "H5Tis_variable_str failed");
|
||||
}
|
||||
|
||||
// call C API to get the attribute string of chars
|
||||
herr_t ret_value = H5Aread( id, mem_type.getId(), &strg_C);
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw AttributeIException("Attribute::read", "H5Aread failed");
|
||||
}
|
||||
strg = strg_C; // get 'string' from the C char*
|
||||
HDfree(strg_C);
|
||||
if (!is_variable_len) // string is fixed length
|
||||
{
|
||||
p_read_fixed_len(mem_type, strg);
|
||||
}
|
||||
else
|
||||
{
|
||||
p_read_variable_len(mem_type, strg);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Attribute::getInMemDataSize
|
||||
///\brief Gets the size in memory of the attribute's data.
|
||||
///\return Size of data (in memory)
|
||||
///\exception H5::AttributeIException
|
||||
// Programmer Binh-Minh Ribler - Apr 2009
|
||||
//--------------------------------------------------------------------------
|
||||
size_t Attribute::getInMemDataSize() const
|
||||
{
|
||||
char *func = "Attribute::getInMemDataSize";
|
||||
|
||||
// Get the data type of this attribute
|
||||
hid_t mem_type_id = H5Aget_type(id);
|
||||
if( mem_type_id < 0 )
|
||||
{
|
||||
throw AttributeIException(func, "H5Aget_type failed");
|
||||
}
|
||||
|
||||
// Get the data type's size
|
||||
hid_t native_type = H5Tget_native_type(mem_type_id, H5T_DIR_DEFAULT);
|
||||
if (native_type < 0)
|
||||
{
|
||||
throw AttributeIException(func, "H5Tget_native_type failed");
|
||||
}
|
||||
size_t type_size = H5Tget_size(native_type);
|
||||
if (type_size == 0)
|
||||
{
|
||||
throw AttributeIException(func, "H5Tget_size failed");
|
||||
}
|
||||
|
||||
// Get number of elements of the attribute
|
||||
hid_t space_id = H5Aget_space(id);
|
||||
if (space_id < 0)
|
||||
{
|
||||
throw AttributeIException(func, "H5Aget_space failed");
|
||||
}
|
||||
hssize_t num_elements = H5Sget_simple_extent_npoints(space_id);
|
||||
if (num_elements < 0)
|
||||
{
|
||||
throw AttributeIException(func, "H5Sget_simple_extent_npoints failed");
|
||||
}
|
||||
|
||||
// Calculate and return the size of the data
|
||||
size_t data_size = type_size * num_elements;
|
||||
return(data_size);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -174,22 +261,19 @@ DataSpace Attribute::getSpace() const
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Attribute::p_get_type (private)
|
||||
// Purpose Gets the datatype of this attribute.
|
||||
// Return Id of the datatype
|
||||
// Exception H5::AttributeIException
|
||||
// Description
|
||||
// This private function is used in AbstractDs.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
// Function: Attribute::getFileName
|
||||
///\brief Gets the name of the file, in which this attribute belongs.
|
||||
///\return File name
|
||||
///\exception H5::IdComponentException
|
||||
// Programmer Binh-Minh Ribler - Jul, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
hid_t Attribute::p_get_type() const
|
||||
H5std_string Attribute::getFileName() const
|
||||
{
|
||||
hid_t type_id = H5Aget_type( id );
|
||||
if( type_id > 0 )
|
||||
return( type_id );
|
||||
else
|
||||
{
|
||||
throw AttributeIException("", "H5Aget_type failed");
|
||||
try {
|
||||
return(p_get_file_name());
|
||||
}
|
||||
catch (IdComponentException E) {
|
||||
throw FileIException("Attribute::getFileName", E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -282,6 +366,135 @@ hsize_t Attribute::getStorageSize() const
|
||||
return (storage_size);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Attribute::getId
|
||||
// Purpose: Get the id of this attribute
|
||||
// Description:
|
||||
// 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 Attribute::getId() const
|
||||
{
|
||||
return(id);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Attribute::p_get_type (private)
|
||||
// Purpose Gets the datatype of this attribute.
|
||||
// Return Id of the datatype
|
||||
// Exception H5::AttributeIException
|
||||
// Description
|
||||
// This private function is used in AbstractDs.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
hid_t Attribute::p_get_type() const
|
||||
{
|
||||
hid_t type_id = H5Aget_type( id );
|
||||
if( type_id > 0 )
|
||||
return( type_id );
|
||||
else
|
||||
{
|
||||
throw AttributeIException("", "H5Aget_type failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Attribute::p_read_fixed_len (private)
|
||||
// brief Reads a fixed length \a H5std_string from an attribute.
|
||||
// param mem_type - IN: Attribute datatype (in memory)
|
||||
// param strg - IN: Buffer for read string
|
||||
// exception H5::AttributeIException
|
||||
// Programmer Binh-Minh Ribler - Jul, 2009
|
||||
// Modification
|
||||
// Jul 2009
|
||||
// Separated the fixed length case from the original
|
||||
// Attribute::read
|
||||
//--------------------------------------------------------------------------
|
||||
void Attribute::p_read_fixed_len(const DataType& mem_type, H5std_string& strg) const
|
||||
{
|
||||
// Only allocate for fixed-len string.
|
||||
|
||||
// Get the size of the attribute's data
|
||||
size_t attr_size = getInMemDataSize();
|
||||
|
||||
// If there is data, allocate buffer and read it.
|
||||
if (attr_size > 0)
|
||||
{
|
||||
char *strg_C = NULL;
|
||||
|
||||
strg_C = new char [(size_t)attr_size+1];
|
||||
herr_t ret_value = H5Aread(id, mem_type.getId(), strg_C);
|
||||
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
delete []strg_C; // de-allocate for fixed-len string
|
||||
throw AttributeIException("Attribute::read", "H5Aread failed");
|
||||
}
|
||||
|
||||
// Get string from the C char* and release resource allocated locally
|
||||
strg = strg_C;
|
||||
delete []strg_C;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Attribute::p_read_variable_len (private)
|
||||
// brief Reads a variable length \a H5std_string from an attribute.
|
||||
// param mem_type - IN: Attribute datatype (in memory)
|
||||
// param strg - IN: Buffer for read string
|
||||
// exception H5::AttributeIException
|
||||
// Programmer Binh-Minh Ribler - Jul, 2009
|
||||
// Modification
|
||||
// Jul 2009
|
||||
// Separated the variable length case from the original
|
||||
// Attribute::read
|
||||
//--------------------------------------------------------------------------
|
||||
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;
|
||||
|
||||
// Read attribute, no allocation for variable-len string; C library will
|
||||
herr_t ret_value = H5Aread(id, mem_type.getId(), &strg_C);
|
||||
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw AttributeIException("Attribute::read", "H5Aread failed");
|
||||
}
|
||||
|
||||
// Get string from the C char* and release resource allocated by C API
|
||||
strg = strg_C;
|
||||
HDfree(strg_C);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Attribute::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
|
||||
// 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.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void Attribute::p_setId(const hid_t new_id)
|
||||
{
|
||||
// handling references to this old id
|
||||
try {
|
||||
close();
|
||||
}
|
||||
catch (Exception close_error) {
|
||||
throw AttributeIException("Attribute::p_setId", close_error.getDetailMsg());
|
||||
}
|
||||
// reset object's id to the given id
|
||||
id = new_id;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Attribute::close
|
||||
///\brief Closes this attribute.
|
||||
@@ -298,8 +511,10 @@ void Attribute::close()
|
||||
{
|
||||
throw AttributeIException("Attribute::close", "H5Aclose failed");
|
||||
}
|
||||
// reset the id because the attribute that it represents is now closed
|
||||
id = 0;
|
||||
// reset the id when the attribute that it represents is no longer
|
||||
// referenced
|
||||
if (getCounter() == 0)
|
||||
id = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,11 +21,14 @@
|
||||
namespace H5 {
|
||||
#endif
|
||||
|
||||
class H5_DLLCPP Attribute : public AbstractDs {
|
||||
class H5_DLLCPP Attribute : public AbstractDs, public IdComponent {
|
||||
public:
|
||||
// Closes this attribute.
|
||||
virtual void close();
|
||||
|
||||
// Gets the name of the file, in which this attribute belongs.
|
||||
H5std_string getFileName() const;
|
||||
|
||||
// Gets the name of this attribute.
|
||||
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
|
||||
@@ -35,7 +38,10 @@ class H5_DLLCPP Attribute : public AbstractDs {
|
||||
virtual DataSpace getSpace() const;
|
||||
|
||||
// Returns the amount of storage size required for this attribute.
|
||||
hsize_t getStorageSize() const;
|
||||
virtual hsize_t getStorageSize() const;
|
||||
|
||||
// Returns the in memory size of this attribute's data.
|
||||
virtual size_t getInMemDataSize() const;
|
||||
|
||||
// Reads data from this attribute.
|
||||
void read( const DataType& mem_type, void *buf ) const;
|
||||
@@ -45,11 +51,11 @@ class H5_DLLCPP Attribute : public AbstractDs {
|
||||
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
|
||||
///\brief Returns this class name
|
||||
virtual H5std_string fromClass () const { return("Attribute"); }
|
||||
|
||||
// Creates a copy of an existing attribute using the attribute id
|
||||
Attribute( const hid_t attr_id );
|
||||
// Creates a copy of an existing attribute using the attribute id
|
||||
Attribute( const hid_t attr_id );
|
||||
|
||||
// Copy constructor: makes a copy of an existing Attribute object.
|
||||
Attribute( const Attribute& original );
|
||||
@@ -57,16 +63,29 @@ class H5_DLLCPP Attribute : public AbstractDs {
|
||||
// Default constructor
|
||||
Attribute();
|
||||
|
||||
// Gets the attribute id.
|
||||
virtual hid_t getId() const;
|
||||
|
||||
// Destructor: properly terminates access to this attribute.
|
||||
virtual ~Attribute();
|
||||
|
||||
protected:
|
||||
// Sets the attribute id.
|
||||
virtual void p_setId(const hid_t new_id);
|
||||
|
||||
private:
|
||||
hid_t id; // HDF5 attribute id
|
||||
|
||||
// This function contains the common code that is used by
|
||||
// getTypeClass and various API functions getXxxType
|
||||
// defined in AbstractDs for generic datatype and specific
|
||||
// sub-types
|
||||
virtual hid_t p_get_type() const;
|
||||
|
||||
// Reads variable or fixed len strings from this attribute.
|
||||
void p_read_variable_len(const DataType& mem_type, H5std_string& strg) const;
|
||||
void p_read_fixed_len(const DataType& mem_type, H5std_string& strg) const;
|
||||
|
||||
// do not inherit H5Object::iterateAttrs
|
||||
int iterateAttrs() { return 0; }
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
namespace H5 {
|
||||
#endif
|
||||
class Exception;
|
||||
class ReferenceCounter;
|
||||
class IdComponent;
|
||||
class H5Object;
|
||||
class PropList;
|
||||
|
||||
@@ -100,7 +100,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
|
||||
@@ -138,7 +138,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
|
||||
@@ -182,7 +182,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
|
||||
@@ -217,7 +217,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
|
||||
@@ -239,7 +239,13 @@ DataSet CommonFG::openDataSet( const H5std_string& name ) const
|
||||
///\par Description
|
||||
/// Note that both names are interpreted relative to the
|
||||
/// specified location.
|
||||
/// For information on creating hard link and soft link, please
|
||||
/// refer to the C layer Reference Manual at:
|
||||
/// http://hdfgroup.org/HDF5/doc/RM/RM_H5L.html#Link-CreateHard and
|
||||
/// http://hdfgroup.org/HDF5/doc/RM/RM_H5L.html#Link-CreateSoft
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
// Modification
|
||||
// 2007: QAK modified to use H5L APIs - BMR
|
||||
//--------------------------------------------------------------------------
|
||||
void CommonFG::link( H5L_type_t link_type, const char* curr_name, const char* new_name ) const
|
||||
{
|
||||
@@ -269,7 +275,7 @@ void CommonFG::link( H5L_type_t link_type, const char* curr_name, const char* ne
|
||||
// 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
|
||||
@@ -283,6 +289,8 @@ void CommonFG::link( H5L_type_t link_type, const H5std_string& curr_name, const
|
||||
///\param name - IN: Name of the object to be removed
|
||||
///\exception H5::FileIException or H5::GroupIException
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
// Modification
|
||||
// 2007: QAK modified to use H5L APIs - BMR
|
||||
//--------------------------------------------------------------------------
|
||||
void CommonFG::unlink( const char* name ) const
|
||||
{
|
||||
@@ -297,7 +305,7 @@ void CommonFG::unlink( const char* name ) const
|
||||
// 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
|
||||
@@ -315,8 +323,10 @@ void CommonFG::unlink( const H5std_string& name ) const
|
||||
/// 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
|
||||
/// http://www.hdfgroup.org/HDF5/doc/UG/UG_frame09Groups.html
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
// Modification
|
||||
// 2007: QAK modified to use H5L APIs - BMR
|
||||
//--------------------------------------------------------------------------
|
||||
void CommonFG::move( const char* src, const char* dst ) const
|
||||
{
|
||||
@@ -331,7 +341,7 @@ void CommonFG::move( const char* src, const char* dst ) const
|
||||
// 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
|
||||
@@ -350,7 +360,7 @@ 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
|
||||
@@ -366,7 +376,7 @@ void CommonFG::getObjinfo( const char* name, hbool_t follow_link, H5G_stat_t& st
|
||||
// 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
|
||||
@@ -380,6 +390,7 @@ void CommonFG::getObjinfo( const H5std_string& name, hbool_t follow_link, H5G_st
|
||||
/// It differs from the above functions in that it doesn't have
|
||||
/// the paramemter \a follow_link.
|
||||
// Programmer Binh-Minh Ribler - Nov, 2005
|
||||
// Note: need to modify to use H5Oget_info and H5Lget_info - BMR
|
||||
//--------------------------------------------------------------------------
|
||||
void CommonFG::getObjinfo( const char* name, H5G_stat_t& statbuf ) const
|
||||
{
|
||||
@@ -394,7 +405,7 @@ void CommonFG::getObjinfo( const char* name, H5G_stat_t& statbuf ) const
|
||||
// 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
|
||||
@@ -414,23 +425,44 @@ void CommonFG::getObjinfo( const H5std_string& name, H5G_stat_t& statbuf ) const
|
||||
//--------------------------------------------------------------------------
|
||||
H5std_string CommonFG::getLinkval( const char* name, size_t size ) const
|
||||
{
|
||||
char* value_C = new char[size+1]; // temporary C-string for C API
|
||||
H5L_info_t linkinfo;
|
||||
char *value_C; // value in C string
|
||||
size_t val_size = size;
|
||||
H5std_string value = "";
|
||||
herr_t ret_value;
|
||||
|
||||
herr_t ret_value = H5Lget_val( getLocId(), name, value_C, size, H5P_DEFAULT );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throwException("getLinkval", "H5Lget_val failed");
|
||||
}
|
||||
H5std_string value = H5std_string( value_C );
|
||||
delete []value_C;
|
||||
return( value );
|
||||
// if user doesn't provide buffer size, determine it
|
||||
if (size == 0)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
// if link has value, retrieve the value, otherwise, return null string
|
||||
if (val_size > 0)
|
||||
{
|
||||
value_C = new char[val_size+1]; // temporary C-string for C API
|
||||
|
||||
ret_value = H5Lget_val(getLocId(), name, value_C, val_size, H5P_DEFAULT);
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throwException("getLinkval", "H5Lget_val failed");
|
||||
}
|
||||
value = H5std_string(value_C);
|
||||
delete []value_C;
|
||||
}
|
||||
return(value);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// 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
|
||||
@@ -452,6 +484,11 @@ H5std_string CommonFG::getLinkval( const H5std_string& name, size_t size ) const
|
||||
/// 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
|
||||
{
|
||||
@@ -466,7 +503,7 @@ void CommonFG::setComment( const char* name, const char* comment ) const
|
||||
// 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.
|
||||
/// \c H5std_string for \a name and \a comment.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void CommonFG::setComment( const H5std_string& name, const H5std_string& comment ) const
|
||||
@@ -480,6 +517,10 @@ void CommonFG::setComment( const H5std_string& name, const H5std_string& comment
|
||||
///\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
|
||||
{
|
||||
@@ -494,7 +535,7 @@ void CommonFG::removeComment(const char* name) const
|
||||
// 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.
|
||||
/// \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - May 2005
|
||||
//--------------------------------------------------------------------------
|
||||
void CommonFG::removeComment(const H5std_string& name) const
|
||||
@@ -504,29 +545,38 @@ void CommonFG::removeComment(const H5std_string& name) const
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: CommonFG::getComment
|
||||
///\brief Retrieves comment for the specified object.
|
||||
///\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 - May 2005
|
||||
// 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 H5std_string& name) const
|
||||
H5std_string CommonFG::getComment( const char* name, size_t bufsize ) const
|
||||
{
|
||||
size_t bufsize = 256; // anticipating the comment's length
|
||||
// bufsize is default to 256
|
||||
// temporary variable
|
||||
hid_t loc_id = getLocId(); // temporary variable
|
||||
|
||||
// temporary C-string for the object's comment
|
||||
char* comment_C = new char[bufsize+1];
|
||||
herr_t ret_value = H5Oget_comment_by_name(loc_id, name.c_str(), comment_C, bufsize, H5P_DEFAULT);
|
||||
// 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 the anticipated
|
||||
// value, then call H5Oget_comment_by_name again with the correct value
|
||||
if (ret_value > bufsize)
|
||||
// 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 ((size_t)ret_value > bufsize && bufsize == 256)
|
||||
{
|
||||
bufsize = ret_value;
|
||||
size_t new_size = ret_value;
|
||||
delete []comment_C;
|
||||
comment_C = new char[bufsize+1];
|
||||
ret_value = H5Oget_comment_by_name(loc_id, name.c_str(), comment_C, bufsize, H5P_DEFAULT);
|
||||
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,
|
||||
@@ -540,38 +590,11 @@ H5std_string CommonFG::getComment (const H5std_string& name) const
|
||||
return (comment);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// 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
|
||||
//--------------------------------------------------------------------------
|
||||
H5std_string CommonFG::getComment( const char* name, size_t bufsize ) const
|
||||
{
|
||||
// temporary C-string for the object's comment
|
||||
char* comment_C = new char[bufsize+1];
|
||||
|
||||
herr_t ret_value = H5Oget_comment_by_name( getLocId(), name, comment_C, bufsize, H5P_DEFAULT );
|
||||
|
||||
// if H5Oget_comment_by_name returns SUCCEED, return the string comment
|
||||
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.
|
||||
/// \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
H5std_string CommonFG::getComment( const H5std_string& name, size_t bufsize ) const
|
||||
@@ -608,7 +631,7 @@ void CommonFG::mount( const char* name, H5File& child, PropList& plist ) const
|
||||
// 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.
|
||||
/// \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void CommonFG::mount( const H5std_string& name, H5File& child, PropList& plist ) const
|
||||
@@ -639,7 +662,7 @@ void CommonFG::unmount( const char* name ) const
|
||||
// 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
|
||||
@@ -674,7 +697,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
|
||||
@@ -709,7 +732,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
|
||||
@@ -744,7 +767,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
|
||||
@@ -779,7 +802,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
|
||||
@@ -814,7 +837,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
|
||||
@@ -849,7 +872,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
|
||||
@@ -884,7 +907,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
|
||||
@@ -919,7 +942,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
|
||||
@@ -955,7 +978,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 )
|
||||
|
||||
@@ -50,9 +50,8 @@ class H5_DLLCPP CommonFG {
|
||||
DataSet openDataSet(const H5std_string& name) const;
|
||||
|
||||
// Retrieves comment for the HDF5 object specified by its name.
|
||||
H5std_string getComment(const H5std_string& name) const;
|
||||
H5std_string getComment(const char* name, size_t bufsize) const;
|
||||
H5std_string getComment(const H5std_string& name, size_t bufsize) const;
|
||||
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;
|
||||
@@ -62,9 +61,9 @@ class H5_DLLCPP CommonFG {
|
||||
void setComment(const char* name, const char* comment) const;
|
||||
void setComment(const H5std_string& name, const H5std_string& comment) const;
|
||||
|
||||
// Returns the name of the HDF5 object that the symbolic link points to.
|
||||
H5std_string getLinkval(const char* name, size_t size) const;
|
||||
H5std_string getLinkval(const H5std_string& name, size_t size) 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;
|
||||
|
||||
// Returns the number of objects in this group.
|
||||
hsize_t getNumObjs() const;
|
||||
|
||||
@@ -88,7 +88,7 @@ class H5_DLLCPP CompType : public DataType {
|
||||
// Recursively removes padding from within this compound datatype.
|
||||
void pack() const;
|
||||
|
||||
// Returns this class name
|
||||
///\brief Returns this class name
|
||||
virtual H5std_string fromClass () const { return("CompType"); }
|
||||
|
||||
// Default constructor
|
||||
|
||||
@@ -44,9 +44,9 @@
|
||||
#include "H5Group.h"
|
||||
#include "H5File.h"
|
||||
#include "H5Library.h"
|
||||
|
||||
|
||||
/* Some C++ compilers do not have offsetof macro; define to bypass the problem
|
||||
- BMR- -EIP- 2007/08/01
|
||||
- BMR- -EIP- 2007/08/01
|
||||
*/
|
||||
#ifndef H5_CXX_HAVE_OFFSETOF
|
||||
#ifdef HOFFSET
|
||||
|
||||
@@ -28,11 +28,16 @@
|
||||
#include "H5PropList.h"
|
||||
#include "H5DxferProp.h"
|
||||
#include "H5DcreatProp.h"
|
||||
#include "H5FaccProp.h"
|
||||
#include "H5FcreatProp.h"
|
||||
#include "H5CommonFG.h"
|
||||
#include "H5DataType.h"
|
||||
#include "H5DataSpace.h"
|
||||
#include "H5AbstractDs.h"
|
||||
#include "H5File.h"
|
||||
#include "H5Attribute.h"
|
||||
#include "H5DataSet.h"
|
||||
#include "H5private.h" // for HDfree
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
@@ -47,7 +52,7 @@ namespace H5 {
|
||||
///\brief Default constructor: creates a stub DataSet.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
DataSet::DataSet() : AbstractDs() {}
|
||||
DataSet::DataSet() : AbstractDs(), H5Object(), id(0) {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet overloaded constructor
|
||||
@@ -55,7 +60,10 @@ DataSet::DataSet() : AbstractDs() {}
|
||||
///\param existing_id - IN: Id of an existing dataset
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
DataSet::DataSet(const hid_t existing_id) : AbstractDs(existing_id) {}
|
||||
DataSet::DataSet(const hid_t existing_id) : AbstractDs(), H5Object()
|
||||
{
|
||||
id = existing_id;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet copy constructor
|
||||
@@ -63,23 +71,83 @@ DataSet::DataSet(const hid_t existing_id) : AbstractDs(existing_id) {}
|
||||
///\param original - IN: DataSet instance to copy
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
DataSet::DataSet( const DataSet& original ) : AbstractDs( original ) {}
|
||||
DataSet::DataSet(const DataSet& original) : AbstractDs(original), H5Object(original)
|
||||
{
|
||||
id = original.getId();
|
||||
incRefCount(); // increment number of references to this id
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet overload constructor - dereference
|
||||
///\brief Given a reference to some object, returns that dataset
|
||||
/// obj - IN: Dataset reference object is in or location of
|
||||
/// object that the dataset is located within.
|
||||
///\brief Given a reference, ref, to an hdf5 dataset, creates a
|
||||
/// DataSet object
|
||||
///\param obj - 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
|
||||
///\exception H5::DataSetIException
|
||||
///\parDescription
|
||||
///\par Description
|
||||
/// \c obj 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(IdComponent& obj, void* ref) : AbstractDs()
|
||||
DataSet::DataSet(H5Object& obj, const void* ref, H5R_type_t ref_type) : AbstractDs(), H5Object()
|
||||
{
|
||||
IdComponent::dereference(obj, ref);
|
||||
try {
|
||||
id = p_dereference(obj.getId(), ref, ref_type);
|
||||
} catch (ReferenceException deref_error) {
|
||||
throw ReferenceException("DataSet constructor - located by object",
|
||||
deref_error.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// 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
|
||||
/// 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
|
||||
///\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()
|
||||
{
|
||||
try {
|
||||
id = p_dereference(attr.getId(), ref, ref_type);
|
||||
} catch (ReferenceException deref_error) {
|
||||
throw ReferenceException("DataSet constructor - located by attribute",
|
||||
deref_error.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -152,6 +220,53 @@ hsize_t DataSet::getStorageSize() const
|
||||
return(storage_size);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet::getInMemDataSize
|
||||
///\brief Gets the size in memory of the dataset's data.
|
||||
///\return Size of data (in memory)
|
||||
///\exception H5::DataSetIException
|
||||
// Programmer Binh-Minh Ribler - Apr 2009
|
||||
//--------------------------------------------------------------------------
|
||||
size_t DataSet::getInMemDataSize() const
|
||||
{
|
||||
char *func = "DataSet::getInMemDataSize";
|
||||
|
||||
// Get the data type of this dataset
|
||||
hid_t mem_type_id = H5Dget_type(id);
|
||||
if( mem_type_id < 0 )
|
||||
{
|
||||
throw DataSetIException(func, "H5Dget_type failed");
|
||||
}
|
||||
|
||||
// Get the data type's size
|
||||
hid_t native_type = H5Tget_native_type(mem_type_id, H5T_DIR_DEFAULT);
|
||||
if (native_type < 0)
|
||||
{
|
||||
throw DataSetIException(func, "H5Tget_native_type failed");
|
||||
}
|
||||
size_t type_size = H5Tget_size(native_type);
|
||||
if (type_size == 0)
|
||||
{
|
||||
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
|
||||
if (space_id < 0)
|
||||
{
|
||||
throw DataSetIException(func, "H5Dget_space failed");
|
||||
}
|
||||
hssize_t num_elements = H5Sget_simple_extent_npoints(space_id);
|
||||
if (num_elements < 0)
|
||||
{
|
||||
throw DataSetIException(func, "H5Sget_simple_extent_npoints failed");
|
||||
}
|
||||
|
||||
// Calculate and return the size of the data
|
||||
size_t data_size = type_size * num_elements;
|
||||
return(data_size);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet::getOffset
|
||||
///\brief Returns the address of this dataset in the file.
|
||||
@@ -296,21 +411,46 @@ 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.
|
||||
/// It takes a reference to a \c H5std_string for the buffer.
|
||||
///\param buf - IN: Buffer for read data
|
||||
///\param mem_type - IN: Memory datatype
|
||||
///\param mem_space - IN: Memory dataspace
|
||||
///\param file_space - IN: Dataset's dataspace in the file
|
||||
///\param xfer_plist - IN: Transfer property list for this I/O operation
|
||||
///\exception H5::DataSetIException
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
// Modification
|
||||
// Jul 2009
|
||||
// Follow the change to Attribute::read and use the following
|
||||
// private functions to read datasets with fixed- and
|
||||
// variable-length string:
|
||||
// DataSet::p_read_fixed_len and
|
||||
// DataSet::p_read_variable_len
|
||||
//--------------------------------------------------------------------------
|
||||
void DataSet::read( H5std_string& strg, const DataType& mem_type, const DataSpace& mem_space, const DataSpace& file_space, const DSetMemXferPropList& xfer_plist ) const
|
||||
void DataSet::read(H5std_string& strg, const DataType& mem_type, const DataSpace& mem_space, const DataSpace& file_space, const DSetMemXferPropList& xfer_plist) const
|
||||
{
|
||||
// Allocate C character string for reading
|
||||
size_t size = mem_type.getSize();
|
||||
char* strg_C = new char[size+1]; // temporary C-string for C API
|
||||
// Check if this dataset has variable-len string or fixed-len string and
|
||||
// proceed appropriately.
|
||||
htri_t is_variable_len = H5Tis_variable_str(mem_type.getId());
|
||||
if (is_variable_len < 0)
|
||||
{
|
||||
throw DataSetIException("DataSet::read", "H5Tis_variable_str failed");
|
||||
}
|
||||
|
||||
// Use the overloaded member to read
|
||||
read(strg_C, mem_type, mem_space, file_space, xfer_plist);
|
||||
// Obtain identifiers for C API
|
||||
hid_t mem_type_id = mem_type.getId();
|
||||
hid_t mem_space_id = mem_space.getId();
|
||||
hid_t file_space_id = file_space.getId();
|
||||
hid_t xfer_plist_id = xfer_plist.getId();
|
||||
|
||||
// Get the String and clean up
|
||||
strg = strg_C;
|
||||
delete []strg_C;
|
||||
if (!is_variable_len) // only allocate for fixed-len string
|
||||
{
|
||||
p_read_fixed_len(mem_type_id, mem_space_id, file_space_id, xfer_plist_id, strg);
|
||||
}
|
||||
else
|
||||
{
|
||||
p_read_variable_len(mem_type_id, mem_space_id, file_space_id, xfer_plist_id, strg);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -347,17 +487,48 @@ 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
|
||||
// Modified to pass the buffer into H5Dwrite properly depending
|
||||
// whether the dataset has variable- or fixed-length string.
|
||||
//--------------------------------------------------------------------------
|
||||
void DataSet::write( const H5std_string& strg, const DataType& mem_type, const DataSpace& mem_space, const DataSpace& file_space, const DSetMemXferPropList& xfer_plist ) const
|
||||
{
|
||||
// Convert string to C-string
|
||||
const char* strg_C;
|
||||
strg_C = strg.c_str(); // strg_C refers to the contents of strg as a C-str
|
||||
// Check if this attribute has variable-len string or fixed-len string and
|
||||
// proceed appropriately.
|
||||
htri_t is_variable_len = H5Tis_variable_str(mem_type.getId());
|
||||
if (is_variable_len < 0)
|
||||
{
|
||||
throw DataSetIException("DataSet::write", "H5Tis_variable_str failed");
|
||||
}
|
||||
|
||||
// Use the overloaded member
|
||||
write(strg_C, mem_type, mem_space, file_space, xfer_plist);
|
||||
// Obtain identifiers for C API
|
||||
hid_t mem_type_id = mem_type.getId();
|
||||
hid_t mem_space_id = mem_space.getId();
|
||||
hid_t file_space_id = file_space.getId();
|
||||
hid_t xfer_plist_id = xfer_plist.getId();
|
||||
|
||||
// Convert string to C-string
|
||||
const char* strg_C;
|
||||
strg_C = strg.c_str(); // strg_C refers to the contents of strg as a C-str
|
||||
herr_t ret_value = 0;
|
||||
|
||||
// Pass string in differently depends on variable or fixed length
|
||||
if (!is_variable_len)
|
||||
{
|
||||
ret_value = H5Dwrite( id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, strg_C );
|
||||
}
|
||||
else
|
||||
{
|
||||
// passing string argument by address
|
||||
ret_value = H5Dwrite( id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, &strg_C );
|
||||
}
|
||||
if (ret_value < 0)
|
||||
{
|
||||
throw DataSetIException("DataSet::write", "H5Dwrite failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -400,7 +571,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
|
||||
@@ -455,65 +626,19 @@ void DataSet::fillMemBuf(void *buf, DataType& buf_type, DataSpace& space)
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet::Reference
|
||||
///\brief Important!!! - This functions may not work correctly, it
|
||||
/// will be removed in the near future. Please use
|
||||
/// DataSet::reference instead!
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void* DataSet::Reference(const char* name, DataSpace& dataspace, H5R_type_t ref_type) const
|
||||
{
|
||||
try {
|
||||
return(p_reference(name, dataspace.getId(), ref_type));
|
||||
}
|
||||
catch (IdComponentException E) {
|
||||
throw DataSetIException("DataSet::Reference", E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet::Reference
|
||||
///\brief Important!!! - This functions may not work correctly, it
|
||||
/// will be removed in the near future. Please use similar
|
||||
/// DataSet::reference instead!
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void* DataSet::Reference(const char* name) const
|
||||
{
|
||||
try {
|
||||
return(p_reference(name, -1, H5R_OBJECT));
|
||||
}
|
||||
catch (IdComponentException E) {
|
||||
throw DataSetIException("DataSet::Reference", E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet::Reference
|
||||
///\brief Important!!! - This functions may not work correctly, it
|
||||
/// will be removed in the near future. Please use similar
|
||||
/// DataSet::reference instead!
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void* DataSet::Reference(const H5std_string& name) const
|
||||
{
|
||||
return(Reference(name.c_str()));
|
||||
}
|
||||
|
||||
#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.
|
||||
/// \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_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
|
||||
/// \li \c H5G_LINK (0) - Object is a symbolic link.
|
||||
/// \li \c H5G_GROUP (1) - Object is a group.
|
||||
/// \li \c H5G_DATASET (2) - Object is a dataset.
|
||||
/// \li \c H5G_TYPE (3) - Object is a named datatype
|
||||
///\exception H5::DataSetIException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -531,9 +656,9 @@ H5G_obj_t DataSet::getObjType(void *ref, H5R_type_t ref_type) const
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet::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
|
||||
///\param ref - IN: Reference to get region of
|
||||
///\return DataSpace instance
|
||||
///\exception H5::DataSetIException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
@@ -549,6 +674,116 @@ DataSpace DataSet::getRegion(void *ref, H5R_type_t ref_type) const
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet::getId
|
||||
///\brief Get the id of this dataset.
|
||||
// Description:
|
||||
// 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 DataSet::getId() const
|
||||
{
|
||||
return(id);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet::p_read_fixed_len (private)
|
||||
// brief Reads a fixed length \a H5std_string from an dataset.
|
||||
// param mem_type - IN: DataSet datatype (in memory)
|
||||
// param strg - IN: Buffer for read string
|
||||
// exception H5::DataSetIException
|
||||
// Programmer Binh-Minh Ribler - Jul, 2009
|
||||
// Modification
|
||||
// Jul 2009
|
||||
// Added in follow to the change in Attribute::read
|
||||
//--------------------------------------------------------------------------
|
||||
void DataSet::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
|
||||
{
|
||||
// Only allocate for fixed-len string.
|
||||
|
||||
// Get the size of the dataset's data
|
||||
size_t attr_size = getInMemDataSize();
|
||||
|
||||
// If there is data, allocate buffer and read it.
|
||||
if (attr_size > 0)
|
||||
{
|
||||
char *strg_C = NULL;
|
||||
|
||||
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 )
|
||||
{
|
||||
delete []strg_C; // de-allocate for fixed-len string
|
||||
throw DataSetIException("DataSet::read", "H5Dread failed for fixed length string");
|
||||
}
|
||||
|
||||
// Get string from the C char* and release resource allocated locally
|
||||
strg = strg_C;
|
||||
delete []strg_C;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet::p_read_variable_len (private)
|
||||
// brief Reads a variable length \a H5std_string from an dataset.
|
||||
// param mem_type - IN: DataSet datatype (in memory)
|
||||
// param strg - IN: Buffer for read string
|
||||
// exception H5::DataSetIException
|
||||
// Programmer Binh-Minh Ribler - Jul, 2009
|
||||
// Modification
|
||||
// Jul 2009
|
||||
// Added in follow to the change in Attribute::read
|
||||
//--------------------------------------------------------------------------
|
||||
void DataSet::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
|
||||
{
|
||||
// Prepare and call C API to read dataset.
|
||||
char *strg_C;
|
||||
|
||||
// Read dataset, no allocation for variable-len string; C library will
|
||||
herr_t ret_value = H5Dread(id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, &strg_C);
|
||||
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw DataSetIException("DataSet::read", "H5Dread failed for variable length string");
|
||||
}
|
||||
|
||||
// Get string from the C char* and release resource allocated by C API
|
||||
strg = strg_C;
|
||||
HDfree(strg_C);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet::p_setId (private)
|
||||
///\brief Sets the identifier of this dataset to a new value.
|
||||
///
|
||||
///\exception H5::IdComponentException when the attempt to close the HDF5
|
||||
/// 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.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void DataSet::p_setId(const hid_t new_id)
|
||||
{
|
||||
// handling references to this old id
|
||||
try {
|
||||
close();
|
||||
}
|
||||
catch (Exception close_error) {
|
||||
throw DataSetIException(inMemFunc("p_setId"), close_error.getDetailMsg());
|
||||
}
|
||||
// reset object's id to the given id
|
||||
id = new_id;
|
||||
|
||||
// increment the reference counter of the new id
|
||||
//incRefCount();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet::close
|
||||
///\brief Closes this dataset.
|
||||
@@ -565,8 +800,10 @@ void DataSet::close()
|
||||
{
|
||||
throw DataSetIException("DataSet::close", "H5Dclose failed");
|
||||
}
|
||||
// reset the id because the dataset that it represents is now closed
|
||||
id = 0;
|
||||
// reset the id when the dataset that it represents is no longer
|
||||
// referenced
|
||||
if (getCounter() == 0)
|
||||
id = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
namespace H5 {
|
||||
#endif
|
||||
|
||||
class H5_DLLCPP DataSet : public AbstractDs {
|
||||
class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
|
||||
public:
|
||||
// Close this dataset.
|
||||
virtual void close();
|
||||
@@ -49,7 +49,10 @@ class H5_DLLCPP DataSet : public AbstractDs {
|
||||
void getSpaceStatus(H5D_space_status_t& status) const;
|
||||
|
||||
// Returns the amount of storage size required for this dataset.
|
||||
hsize_t getStorageSize() const;
|
||||
virtual hsize_t getStorageSize() const;
|
||||
|
||||
// Returns the in memory size of this attribute's data.
|
||||
virtual size_t getInMemDataSize() const;
|
||||
|
||||
// Returns the number of bytes required to store VL data.
|
||||
hsize_t getVlenBufSize( DataType& type, DataSpace& space ) const;
|
||||
@@ -81,19 +84,13 @@ class H5_DLLCPP DataSet : public AbstractDs {
|
||||
// Retrieves a dataspace with the region pointed to selected.
|
||||
DataSpace getRegion(void *ref, H5R_type_t ref_type = H5R_DATASET_REGION) const;
|
||||
|
||||
// Creates a reference to a named Hdf5 object or to a dataset region
|
||||
// in this object.
|
||||
void* Reference(const char* name, DataSpace& dataspace, H5R_type_t ref_type = H5R_DATASET_REGION) const;
|
||||
|
||||
// Creates a reference to a named Hdf5 object in this object.
|
||||
void* Reference(const char* name) const; // will be obsolete
|
||||
void* Reference(const H5std_string& name) const; // will be obsolete
|
||||
|
||||
// Returns this class name
|
||||
///\brief Returns this class name
|
||||
virtual H5std_string fromClass () const { return("DataSet"); }
|
||||
|
||||
// Creates a dataset by way of dereference.
|
||||
DataSet(IdComponent& obj, void* ref);
|
||||
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);
|
||||
|
||||
// Default constructor.
|
||||
DataSet();
|
||||
@@ -104,15 +101,30 @@ class H5_DLLCPP DataSet : public AbstractDs {
|
||||
// Creates a copy of an existing DataSet using its id.
|
||||
DataSet(const hid_t existing_id);
|
||||
|
||||
// Gets the dataset id.
|
||||
virtual hid_t getId() const;
|
||||
|
||||
// Destructor: properly terminates access to this dataset.
|
||||
virtual ~DataSet();
|
||||
|
||||
private:
|
||||
hid_t id; // HDF5 dataset id
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
// This function contains the common code that is used by
|
||||
// getTypeClass and various API functions getXxxType
|
||||
// defined in AbstractDs for generic datatype and specific
|
||||
// sub-types
|
||||
virtual hid_t p_get_type() const;
|
||||
|
||||
// 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);
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
};
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ const DataSpace DataSpace::ALL( H5S_ALL );
|
||||
///\exception H5::DataSpaceIException
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
DataSpace::DataSpace( H5S_class_t type ) : IdComponent(0)
|
||||
DataSpace::DataSpace(H5S_class_t type) : IdComponent()
|
||||
{
|
||||
id = H5Screate( type );
|
||||
if( id < 0 )
|
||||
@@ -65,7 +65,7 @@ DataSpace::DataSpace( H5S_class_t type ) : IdComponent(0)
|
||||
///\exception H5::DataSpaceIException
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
DataSpace::DataSpace( int rank, const hsize_t * dims, const hsize_t * maxdims) : IdComponent(0)
|
||||
DataSpace::DataSpace( int rank, const hsize_t * dims, const hsize_t * maxdims) : IdComponent()
|
||||
{
|
||||
id = H5Screate_simple( rank, dims, maxdims );
|
||||
if( id < 0 )
|
||||
@@ -82,7 +82,10 @@ DataSpace::DataSpace( int rank, const hsize_t * dims, const hsize_t * maxdims) :
|
||||
///\exception H5::DataSpaceIException
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
DataSpace::DataSpace(const hid_t existing_id) : IdComponent(existing_id) {}
|
||||
DataSpace::DataSpace(const hid_t existing_id) : IdComponent()
|
||||
{
|
||||
id = existing_id;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSpace copy constructor
|
||||
@@ -90,7 +93,11 @@ DataSpace::DataSpace(const hid_t existing_id) : IdComponent(existing_id) {}
|
||||
///\param original - IN: DataSpace object to copy
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
DataSpace::DataSpace( const DataSpace& original ) : IdComponent( original ) {}
|
||||
DataSpace::DataSpace(const DataSpace& original) : IdComponent(original)
|
||||
{
|
||||
id = original.getId();
|
||||
incRefCount(); // increment number of references to this id
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSpace::copy
|
||||
@@ -401,7 +408,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
|
||||
@@ -425,7 +432,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
|
||||
@@ -451,7 +458,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
|
||||
@@ -533,7 +540,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
|
||||
@@ -547,6 +554,47 @@ void DataSpace::selectHyperslab( H5S_seloper_t op, const hsize_t *count, const h
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSpace::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
|
||||
//--------------------------------------------------------------------------
|
||||
hid_t DataSpace::getId() const
|
||||
{
|
||||
return(id);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSpace::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
|
||||
// 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.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void DataSpace::p_setId(const hid_t new_id)
|
||||
{
|
||||
// handling references to this old id
|
||||
try {
|
||||
close();
|
||||
}
|
||||
catch (Exception close_error) {
|
||||
throw DataSpaceIException(inMemFunc("p_setId"), close_error.getDetailMsg());
|
||||
}
|
||||
// reset object's id to the given id
|
||||
id = new_id;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSpace::close
|
||||
///\brief Closes this dataspace.
|
||||
@@ -564,8 +612,10 @@ void DataSpace::close()
|
||||
{
|
||||
throw DataSpaceIException("DataSpace::close", "H5Sclose failed");
|
||||
}
|
||||
// reset the id because the dataspace that it represents is now closed
|
||||
id = 0;
|
||||
// reset the id when the dataspace that it represents is no longer
|
||||
// referenced
|
||||
if (getCounter() == 0)
|
||||
id = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -583,8 +633,7 @@ DataSpace::~DataSpace()
|
||||
{
|
||||
try {
|
||||
close();
|
||||
}
|
||||
catch (Exception close_error) {
|
||||
} catch (Exception close_error) {
|
||||
cerr << "DataSpace::~DataSpace - " << close_error.getDetailMsg() << endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ 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.
|
||||
@@ -112,8 +112,18 @@ class H5_DLLCPP DataSpace : public IdComponent {
|
||||
// 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:
|
||||
// Sets the dataspace id.
|
||||
virtual void p_setId(const hid_t new_id);
|
||||
};
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "H5AbstractDs.h"
|
||||
#include "H5DataSet.h"
|
||||
#include "H5File.h"
|
||||
#include "H5Attribute.h"
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
@@ -51,8 +52,6 @@ namespace H5 {
|
||||
// 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;
|
||||
@@ -62,7 +61,10 @@ namespace H5 {
|
||||
// - BMR 5/2004
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
DataType::DataType(const hid_t existing_id) : H5Object(existing_id) {}
|
||||
DataType::DataType(const hid_t existing_id) : H5Object()
|
||||
{
|
||||
id = existing_id;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataType overloaded constructor
|
||||
@@ -84,17 +86,74 @@ DataType::DataType( const H5T_class_t type_class, size_t size ) : H5Object()
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataType overload constructor - dereference
|
||||
///\brief Given a reference to some object, returns that datatype
|
||||
///\param obj - IN: Location reference object is in
|
||||
///\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
|
||||
///\parDescription
|
||||
/// \c obj can be DataSet, Group, H5File, or named DataType, that
|
||||
///\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(IdComponent& obj, void* ref) : H5Object()
|
||||
DataType::DataType(H5Object& obj, const void* ref, H5R_type_t ref_type) : H5Object()
|
||||
{
|
||||
IdComponent::dereference(obj, ref);
|
||||
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 ref - IN: Reference pointer
|
||||
///\param ref_type - IN: Reference type - default to H5R_OBJECT
|
||||
///\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()
|
||||
{
|
||||
try {
|
||||
id = p_dereference(h5file.getId(), ref, ref_type);
|
||||
} catch (ReferenceException deref_error) {
|
||||
throw ReferenceException("DataType constructor - located by an H5File",
|
||||
deref_error.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataType overload constructor - dereference
|
||||
///\brief Given a reference, ref, to an hdf5 group, creates a
|
||||
/// DataType 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
|
||||
///\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()
|
||||
{
|
||||
try {
|
||||
id = p_dereference(attr.getId(), ref, ref_type);
|
||||
} catch (ReferenceException deref_error) {
|
||||
throw ReferenceException("DataType constructor - located by an Attribute",
|
||||
deref_error.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -102,14 +161,18 @@ DataType::DataType(IdComponent& obj, void* ref) : H5Object()
|
||||
///\brief Default constructor: Creates a stub datatype
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
DataType::DataType() : H5Object() {}
|
||||
DataType::DataType() : H5Object(), id(0) {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataType copy constructor
|
||||
///\brief Copy constructor: makes a copy of the original DataType object.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
DataType::DataType(const DataType& original) : H5Object(original) {}
|
||||
DataType::DataType(const DataType& original) : H5Object(original)
|
||||
{
|
||||
id = original.getId();
|
||||
incRefCount(); // increment number of references to this id
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataType::copy
|
||||
@@ -142,10 +205,10 @@ void DataType::copy( const DataType& like_type )
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataType::copy
|
||||
///\brief Copies the datatype of the given dataset to this datatype object
|
||||
///\param dset - IN: Dataset
|
||||
///\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)
|
||||
@@ -210,7 +273,7 @@ bool DataType::operator==(const DataType& compared_type ) const
|
||||
// Function: DataType::p_commit (private)
|
||||
//\brief Commits a transient datatype to a file, creating a new
|
||||
// named datatype
|
||||
//\param loc_id - IN: The id of either a file, group, dataset, named
|
||||
//\param loc_id - IN: The id of either a file, group, dataset, named
|
||||
// datatype, or attribute.
|
||||
//\param name - IN: Name of the datatype
|
||||
//\exception H5::DataTypeIException
|
||||
@@ -452,7 +515,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
|
||||
@@ -616,52 +679,6 @@ bool DataType::isVariableStr() const
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataType::Reference
|
||||
///\brief Important!!! - This functions may not work correctly, it
|
||||
/// will be removed in the near future. Please use similar
|
||||
/// DataType::reference instead!
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void* DataType::Reference(const char* name, DataSpace& dataspace, H5R_type_t ref_type) const
|
||||
{
|
||||
try {
|
||||
return(p_reference(name, dataspace.getId(), ref_type));
|
||||
}
|
||||
catch (IdComponentException E) {
|
||||
throw DataTypeIException(inMemFunc("Reference"), E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataType::Reference
|
||||
///\brief Important!!! - This functions may not work correctly, it
|
||||
/// will be removed in the near future. Please use similar
|
||||
/// DataType::reference instead!
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void* DataType::Reference(const char* name) const
|
||||
{
|
||||
try {
|
||||
return(p_reference(name, -1, H5R_OBJECT));
|
||||
}
|
||||
catch (IdComponentException E) {
|
||||
throw DataTypeIException(inMemFunc("Reference"), E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataType::Reference
|
||||
///\brief Important!!! - This functions may not work correctly, it
|
||||
/// will be removed in the near future. Please use similar
|
||||
/// DataType::reference instead!
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void* DataType::Reference(const H5std_string& name) const
|
||||
{
|
||||
return(Reference(name.c_str()));
|
||||
}
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataType::getObjType
|
||||
@@ -707,6 +724,47 @@ DataSpace DataType::getRegion(void *ref, H5R_type_t ref_type) const
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataType::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
|
||||
//--------------------------------------------------------------------------
|
||||
hid_t DataType::getId() const
|
||||
{
|
||||
return(id);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataType::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
|
||||
// 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.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void DataType::p_setId(const hid_t new_id)
|
||||
{
|
||||
// handling references to this old id
|
||||
try {
|
||||
close();
|
||||
}
|
||||
catch (Exception close_error) {
|
||||
throw DataTypeIException(inMemFunc("p_setId"), close_error.getDetailMsg());
|
||||
}
|
||||
// reset object's id to the given id
|
||||
id = new_id;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataType::close
|
||||
///\brief Closes the datatype if it is not a predefined type.
|
||||
@@ -723,8 +781,10 @@ void DataType::close()
|
||||
{
|
||||
throw DataTypeIException(inMemFunc("close"), "H5Tclose failed");
|
||||
}
|
||||
// reset the id because the datatype that it represents is now closed
|
||||
id = 0;
|
||||
// reset the id when the datatype that it represents is no longer
|
||||
// referenced
|
||||
if (getCounter() == 0)
|
||||
id = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -740,14 +800,12 @@ void DataType::close()
|
||||
//--------------------------------------------------------------------------
|
||||
DataType::~DataType()
|
||||
{
|
||||
try {
|
||||
close();
|
||||
}
|
||||
catch (Exception close_error) {
|
||||
cerr << inMemFunc("~DataType - ") << close_error.getDetailMsg() << endl;
|
||||
}
|
||||
try {
|
||||
close();
|
||||
} catch (Exception close_error) {
|
||||
cerr << inMemFunc("~DataType - ") << close_error.getDetailMsg() << endl;
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
} // end namespace
|
||||
#endif
|
||||
|
||||
@@ -30,7 +30,9 @@ class H5_DLLCPP DataType : public H5Object {
|
||||
DataType( const DataType& original );
|
||||
|
||||
// Creates a datatype by way of dereference.
|
||||
DataType(IdComponent& obj, void* ref);
|
||||
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);
|
||||
|
||||
// Closes this datatype.
|
||||
virtual void close();
|
||||
@@ -99,14 +101,6 @@ class H5_DLLCPP DataType : public H5Object {
|
||||
// Checks whether this datatype is a variable-length string.
|
||||
bool isVariableStr() const;
|
||||
|
||||
// Creates a reference to a named HDF5 object or to a dataset region
|
||||
// in this object.
|
||||
void* Reference(const char* name, DataSpace& dataspace, H5R_type_t ref_type = H5R_DATASET_REGION) const; // will be obsolete
|
||||
|
||||
// Creates a reference to a named HDF5 object in this object.
|
||||
void* Reference(const char* name) const; // will be obsolete
|
||||
void* Reference(const H5std_string& name) const; // will be obsolete
|
||||
|
||||
#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;
|
||||
@@ -115,7 +109,7 @@ class H5_DLLCPP DataType : public H5Object {
|
||||
// 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
|
||||
@@ -124,8 +118,18 @@ class H5_DLLCPP DataType : public H5Object {
|
||||
// Default constructor
|
||||
DataType();
|
||||
|
||||
// Gets the datatype id.
|
||||
virtual hid_t getId() const;
|
||||
|
||||
// Destructor: properly terminates access to this datatype.
|
||||
virtual ~DataType();
|
||||
|
||||
protected:
|
||||
hid_t id; // HDF5 datatype id
|
||||
|
||||
// Sets the datatype id.
|
||||
virtual void p_setId(const hid_t new_id);
|
||||
|
||||
private:
|
||||
void p_commit(hid_t loc_id, const char* name);
|
||||
};
|
||||
|
||||
@@ -54,7 +54,7 @@ DSetCreatPropList::DSetCreatPropList( const DSetCreatPropList& orig ) : PropList
|
||||
/// existing dataset creation property list.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
DSetCreatPropList::DSetCreatPropList(const hid_t plist_id) : PropList( plist_id ) {}
|
||||
DSetCreatPropList::DSetCreatPropList(const hid_t plist_id) : PropList(plist_id) {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DSetCreatPropList::setChunk
|
||||
@@ -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
|
||||
@@ -172,16 +172,16 @@ void DSetCreatPropList::setDeflate( int level ) const
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DSetCreatPropList::setSzip
|
||||
///\brief Sets up for the use of the SZIP compression filter.
|
||||
///\param options_mask - IN: A bit-mask conveying the desired SZIP
|
||||
/// options. Valid values are H5_SZIP_EC_OPTION_MASK
|
||||
///\param options_mask - IN: A bit-mask conveying the desired SZIP
|
||||
/// options. Valid values are H5_SZIP_EC_OPTION_MASK
|
||||
/// and H5_SZIP_NN_OPTION_MASK.
|
||||
///\param pixels_per_block - IN: Number of pixels or data elements in
|
||||
///\param pixels_per_block - IN: Number of pixels or data elements in
|
||||
/// each data block.
|
||||
///\exception H5::PropListIException
|
||||
///\par Description
|
||||
/// The associate C function sets an SZIP compression filter,
|
||||
/// The associate C function sets an SZIP compression filter,
|
||||
/// H5Z_FILTER_SZIP, for a dataset. For more information about
|
||||
/// SZIP and usage, please refer to the C layer Reference
|
||||
/// SZIP and usage, please refer to the C layer Reference
|
||||
/// Manual at:
|
||||
/// http://hdfgroup.org/HDF5/doc/RM_H5P.html#Property-SetSzip
|
||||
// Programmer Binh-Minh Ribler - Jan, 2007
|
||||
@@ -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
|
||||
@@ -459,7 +459,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
|
||||
|
||||
@@ -107,7 +107,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.
|
||||
|
||||
@@ -309,7 +309,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 +349,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)
|
||||
|
||||
@@ -92,7 +92,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.
|
||||
@@ -104,7 +104,6 @@ class H5_DLLCPP DSetMemXferPropList : public PropList {
|
||||
|
||||
// Noop destructor
|
||||
virtual ~DSetMemXferPropList();
|
||||
|
||||
};
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
}
|
||||
|
||||
@@ -57,7 +57,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
|
||||
|
||||
@@ -252,7 +252,7 @@ void Exception::walkErrorStack( H5E_direction_t direction, H5E_walk2_t func, voi
|
||||
// Function: Exception::getDetailMsg
|
||||
///\brief Returns the detailed message set at the time the exception
|
||||
/// is thrown.
|
||||
///\return Text message - \c std::string
|
||||
///\return Text message - \c H5std_string
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
H5std_string Exception::getDetailMsg() const
|
||||
@@ -275,7 +275,7 @@ const char* Exception::getCDetailMsg() const
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Exception::getFuncName
|
||||
///\brief Returns the name of the function, where the exception is thrown.
|
||||
///\return Text message - \c std::string
|
||||
///\return Text message - \c H5std_string
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
H5std_string Exception::getFuncName() const
|
||||
|
||||
@@ -79,12 +79,6 @@ class H5_DLLCPP Exception {
|
||||
virtual ~Exception();
|
||||
|
||||
private:
|
||||
// Because 'string' is not instantiated at compilation time, this
|
||||
// warning is displayed when building DLL; but the class is exported
|
||||
// so the warning is harmless
|
||||
#if defined(_WIN32)
|
||||
#pragma warning(disable: 4251)
|
||||
#endif
|
||||
H5std_string detail_message;
|
||||
H5std_string func_name;
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -225,7 +225,7 @@ void FileAccPropList::getFamily(hsize_t& memb_size, FileAccPropList& memb_plist)
|
||||
{
|
||||
throw PropListIException("FileAccPropList::getFamily", "H5Pget_fapl_family failed");
|
||||
}
|
||||
memb_plist.setId(memb_plist_id);
|
||||
memb_plist.p_setId(memb_plist_id);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -261,7 +261,7 @@ 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
|
||||
@@ -295,11 +295,13 @@ void FileAccPropList::setSplit( FileAccPropList& meta_plist, FileAccPropList& ra
|
||||
#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
|
||||
// Purpose: Retrieves the streaming I/O driver settings
|
||||
// Return: The streaming I/O file access property list structure
|
||||
// Exception: H5::PropListIException
|
||||
// Description:
|
||||
// This C API seems to be removed from the library; will remove
|
||||
// this wrapper next time, only removed it from the RM in this
|
||||
// release - Oct, 2008
|
||||
// Programmer: Binh-Minh Ribler - April, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
H5FD_stream_fapl_t FileAccPropList::getStream() const
|
||||
@@ -315,13 +317,14 @@ H5FD_stream_fapl_t FileAccPropList::getStream() const
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// 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
|
||||
// Purpose: 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
|
||||
// Description:
|
||||
// This C API seems to be removed from the library; will remove
|
||||
// this wrapper next time, only removed it from the RM in this
|
||||
// release - Oct, 2008
|
||||
// Programmer: Binh-Minh Ribler - April, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void FileAccPropList::setStream(H5FD_stream_fapl_t &fapl) const
|
||||
@@ -360,7 +363,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 +383,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 +423,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 +480,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 +517,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 +536,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 +637,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
|
||||
|
||||
@@ -123,7 +123,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.
|
||||
|
||||
@@ -126,7 +126,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
|
||||
@@ -166,7 +166,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
|
||||
@@ -187,7 +187,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
|
||||
@@ -208,7 +208,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
|
||||
@@ -228,7 +228,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
|
||||
|
||||
@@ -60,7 +60,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.
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace H5 {
|
||||
///\brief Default constructor: creates a stub H5File object.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
H5File::H5File() : IdComponent(0) {}
|
||||
H5File::H5File() : IdComponent(), id(0) {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File overloaded constructor
|
||||
@@ -76,7 +76,7 @@ H5File::H5File() : IdComponent(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
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
H5File::H5File( const char* name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist ) : IdComponent(0)
|
||||
@@ -88,7 +88,7 @@ H5File::H5File( const char* name, unsigned int flags, const FileCreatPropList& c
|
||||
// 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
|
||||
@@ -140,7 +140,11 @@ 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) : IdComponent(original)
|
||||
{
|
||||
id = original.getId();
|
||||
incRefCount(); // increment number of references to this id
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::flush
|
||||
@@ -187,8 +191,8 @@ bool H5File::isHdf5(const char* name)
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::isHdf5
|
||||
///\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
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
bool H5File::isHdf5(const H5std_string& name )
|
||||
@@ -227,8 +231,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
|
||||
@@ -374,9 +378,9 @@ hssize_t H5File::getFreeSpace() const
|
||||
/// Multiple object types can be combined with the logical OR operator (|).
|
||||
// Programmer Binh-Minh Ribler - May 2004
|
||||
//--------------------------------------------------------------------------
|
||||
int H5File::getObjCount(unsigned types) const
|
||||
ssize_t H5File::getObjCount(unsigned types) const
|
||||
{
|
||||
int num_objs = H5Fget_obj_count(id, types);
|
||||
ssize_t num_objs = H5Fget_obj_count(id, types);
|
||||
if( num_objs < 0 )
|
||||
{
|
||||
throw FileIException("H5File::getObjCount", "H5Fget_obj_count failed");
|
||||
@@ -393,9 +397,9 @@ int H5File::getObjCount(unsigned types) const
|
||||
///\exception H5::FileIException
|
||||
// Programmer Binh-Minh Ribler - May 2004
|
||||
//--------------------------------------------------------------------------
|
||||
int H5File::getObjCount() const
|
||||
ssize_t H5File::getObjCount() const
|
||||
{
|
||||
int num_objs = H5Fget_obj_count(id, H5F_OBJ_ALL);
|
||||
ssize_t num_objs = H5Fget_obj_count(id, H5F_OBJ_ALL);
|
||||
if( num_objs < 0 )
|
||||
{
|
||||
throw FileIException("H5File::getObjCount", "H5Fget_obj_count failed");
|
||||
@@ -428,9 +432,9 @@ int H5File::getObjCount() const
|
||||
// Notes: will do the overload for this one after hearing from Quincey???
|
||||
// Programmer Binh-Minh Ribler - May 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void H5File::getObjIDs(unsigned types, int max_objs, hid_t *oid_list) const
|
||||
void H5File::getObjIDs(unsigned types, size_t max_objs, hid_t *oid_list) const
|
||||
{
|
||||
herr_t ret_value = H5Fget_obj_ids(id, types, max_objs, oid_list);
|
||||
ssize_t ret_value = H5Fget_obj_ids(id, types, max_objs, oid_list);
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw FileIException("H5File::getObjIDs", "H5Fget_obj_ids failed");
|
||||
@@ -502,60 +506,14 @@ H5std_string H5File::getFileName() const
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::Reference
|
||||
///\brief Important!!! - This functions does not work correctly, it
|
||||
/// will be removed in the near future. Please use
|
||||
/// H5File::reference instead!
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void* H5File::Reference(const char* name, DataSpace& dataspace, H5R_type_t ref_type) const
|
||||
{
|
||||
try {
|
||||
return(p_reference(name, dataspace.getId(), ref_type));
|
||||
}
|
||||
catch (IdComponentException E) {
|
||||
throw FileIException("H5File::Reference", E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::Reference
|
||||
///\brief Important!!! - This functions does not work correctly, it
|
||||
/// will be removed in the near future. Please use similar
|
||||
/// H5File::reference instead!
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void* H5File::Reference(const char* name) const
|
||||
{
|
||||
try {
|
||||
return(p_reference(name, -1, H5R_OBJECT));
|
||||
}
|
||||
catch (IdComponentException E) {
|
||||
throw FileIException("H5File::Reference", E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::Reference
|
||||
///\brief Important!!! - This functions does not work correctly, it
|
||||
/// will be removed in the near future. Please use similar
|
||||
/// H5File::reference instead!
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void* H5File::Reference(const H5std_string& name) const
|
||||
{
|
||||
return(Reference(name.c_str()));
|
||||
}
|
||||
|
||||
#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.
|
||||
/// \li \c H5R_OBJECT - Reference is an object reference.
|
||||
/// \li \c H5R_DATASET_REGION - Reference 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.
|
||||
@@ -616,6 +574,134 @@ hsize_t H5File::getFileSize() const
|
||||
return (file_size);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// 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
|
||||
//--------------------------------------------------------------------------
|
||||
void H5File::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: 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 - Reference is an object reference.
|
||||
/// \li \c H5R_DATASET_REGION - Reference 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 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
|
||||
// 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);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::getLocId
|
||||
// Purpose: Get the id of this file
|
||||
@@ -629,6 +715,47 @@ hid_t H5File::getLocId() const
|
||||
return( getId() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// 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
|
||||
//--------------------------------------------------------------------------
|
||||
hid_t H5File::getId() const
|
||||
{
|
||||
return(id);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::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
|
||||
// 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.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void H5File::p_setId(const hid_t new_id)
|
||||
{
|
||||
// handling references to this old id
|
||||
try {
|
||||
close();
|
||||
}
|
||||
catch (Exception E) {
|
||||
throw FileIException("H5File::p_setId", E.getDetailMsg());
|
||||
}
|
||||
// reset object's id to the given id
|
||||
id = new_id;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::close
|
||||
///\brief Closes this HDF5 file.
|
||||
@@ -645,8 +772,10 @@ void H5File::close()
|
||||
{
|
||||
throw FileIException("H5File::close", "H5Fclose failed");
|
||||
}
|
||||
// reset the id because the file that it represents is now closed
|
||||
id = 0;
|
||||
// reset the id when the file that it represents is no longer
|
||||
// referenced
|
||||
if (getCounter() == 0)
|
||||
id = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -685,8 +814,7 @@ H5File::~H5File()
|
||||
{
|
||||
try {
|
||||
close();
|
||||
}
|
||||
catch (Exception close_error) {
|
||||
} catch (Exception close_error) {
|
||||
cerr << "H5File::~H5File - " << close_error.getDetailMsg() << endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,12 +60,12 @@ class H5_DLLCPP H5File : public IdComponent, public CommonFG {
|
||||
|
||||
// Returns the number of opened object IDs (files, datasets, groups
|
||||
// and datatypes) in the same file.
|
||||
int getObjCount(unsigned types) const;
|
||||
int getObjCount() const;
|
||||
ssize_t getObjCount(unsigned types) const;
|
||||
ssize_t getObjCount() const;
|
||||
|
||||
// Retrieves a list of opened object IDs (files, datasets, groups
|
||||
// and datatypes) in the same file.
|
||||
void getObjIDs(unsigned types, int max_objs, hid_t *oid_list) const;
|
||||
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.
|
||||
@@ -89,13 +89,12 @@ class H5_DLLCPP H5File : public IdComponent, public CommonFG {
|
||||
|
||||
// Creates a reference to a named HDF5 object or to a dataset region
|
||||
// in this object.
|
||||
void* Reference(const char* name, DataSpace& dataspace, H5R_type_t ref_type = H5R_DATASET_REGION) const; // will be obsolete
|
||||
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;
|
||||
|
||||
// Creates a reference to a named Hdf5 object in this object.
|
||||
void* Reference(const char* name) const; // will be obsolete
|
||||
void* Reference(const H5std_string& name) const; // will be obsolete
|
||||
|
||||
// Returns this class name
|
||||
///\brief Returns this class name
|
||||
virtual H5std_string fromClass () const { return("H5File"); }
|
||||
|
||||
// Throw file exception.
|
||||
@@ -110,14 +109,38 @@ class H5_DLLCPP H5File : public IdComponent, public CommonFG {
|
||||
// Copy constructor: makes a copy of the original H5File object.
|
||||
H5File(const H5File& original);
|
||||
|
||||
// Gets the HDF5 file id.
|
||||
virtual hid_t getId() const;
|
||||
|
||||
// H5File destructor.
|
||||
virtual ~H5File();
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
@@ -53,7 +53,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
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include "H5DataSpace.h"
|
||||
#include "H5DataSet.h"
|
||||
#include "H5CommonFG.h"
|
||||
#include "H5Attribute.h"
|
||||
#include "H5Group.h"
|
||||
#include "H5File.h"
|
||||
#include "H5Alltypes.h"
|
||||
@@ -50,7 +51,7 @@ namespace H5 {
|
||||
///\brief Default constructor: creates a stub Group.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
Group::Group() : H5Object() {}
|
||||
Group::Group() : H5Object(), id(0) {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Group copy constructor
|
||||
@@ -58,7 +59,11 @@ Group::Group() : H5Object() {}
|
||||
///\param original - IN: Original group to copy
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
Group::Group( const Group& original ) : H5Object( original ) {}
|
||||
Group::Group(const Group& original) : H5Object(original)
|
||||
{
|
||||
id = original.getId();
|
||||
incRefCount(); // increment number of references to this id
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Group::getLocId
|
||||
@@ -74,70 +79,72 @@ 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 group_id ) : H5Object( group_id ) {}
|
||||
Group::Group(const hid_t existing_id) : H5Object()
|
||||
{
|
||||
id = existing_id;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Group overload constructor - dereference
|
||||
///\brief Given a reference to some object, returns that group
|
||||
/// obj - IN: Location reference object is in
|
||||
///\brief Given a reference, ref, to an hdf5 group, creates a Group object
|
||||
///\param obj - IN: Specifying location referenced object is in
|
||||
///\param ref - IN: Reference pointer
|
||||
///\parDescription
|
||||
/// \c obj can be DataSet, Group, H5File, or named DataType, that
|
||||
///\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
|
||||
//--------------------------------------------------------------------------
|
||||
Group::Group(IdComponent& obj, void* ref) : H5Object()
|
||||
Group::Group(H5Object& obj, const void* ref, H5R_type_t ref_type) : H5Object()
|
||||
{
|
||||
IdComponent::dereference(obj, ref);
|
||||
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::Reference
|
||||
///\brief Important!!! - This functions may not work correctly, it
|
||||
/// will be removed in the near future. Please use similar
|
||||
/// Group::reference instead!
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
// 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
|
||||
//--------------------------------------------------------------------------
|
||||
void* Group::Reference(const char* name, DataSpace& dataspace, H5R_type_t ref_type) const
|
||||
Group::Group(H5File& h5file, const void* ref, H5R_type_t ref_type) : H5Object()
|
||||
{
|
||||
try {
|
||||
return(p_reference(name, dataspace.getId(), ref_type));
|
||||
}
|
||||
catch (IdComponentException E) {
|
||||
throw GroupIException("Group::Reference", E.getDetailMsg());
|
||||
}
|
||||
try {
|
||||
id = p_dereference(h5file.getId(), ref, ref_type);
|
||||
} catch (ReferenceException deref_error) {
|
||||
throw ReferenceException("Group constructor - located by an H5File",
|
||||
deref_error.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Group::Reference
|
||||
///\brief Important!!! - This functions may not work correctly, it
|
||||
/// will be removed in the near future. Please use similar
|
||||
/// Group::reference instead!
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
// Function: Group overload constructor - dereference
|
||||
///\brief Given a reference, ref, to an hdf5 group, creates a Group 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
|
||||
///\exception H5::ReferenceException
|
||||
// Programmer Binh-Minh Ribler - Oct, 2006
|
||||
//--------------------------------------------------------------------------
|
||||
void* Group::Reference(const char* name) const
|
||||
Group::Group(Attribute& attr, const void* ref, H5R_type_t ref_type) : H5Object()
|
||||
{
|
||||
try {
|
||||
return(p_reference(name, -1, H5R_OBJECT));
|
||||
}
|
||||
catch (IdComponentException E) {
|
||||
throw GroupIException("Group::Reference", E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Group::Reference
|
||||
///\brief Important!!! - This functions may not work correctly, it
|
||||
/// will be removed in the near future. Please use similar
|
||||
/// Group::reference instead!
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void* Group::Reference(const H5std_string& name) const
|
||||
{
|
||||
return(Reference(name.c_str()));
|
||||
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
|
||||
@@ -146,13 +153,13 @@ void* Group::Reference(const H5std_string& name) const
|
||||
///\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.
|
||||
/// \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:
|
||||
/// 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
|
||||
/// \li \c H5G_LINK (0) - Object is a symbolic link.
|
||||
/// \li \c H5G_GROUP (1) - Object is a group.
|
||||
/// \li \c H5G_DATASET (2) - Object is a dataset.
|
||||
/// \li \c H5G_TYPE (3) - Object is a named datatype
|
||||
///\exception H5::GroupIException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -187,6 +194,47 @@ DataSpace Group::getRegion(void *ref, H5R_type_t ref_type) const
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Group::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
|
||||
//--------------------------------------------------------------------------
|
||||
hid_t Group::getId() const
|
||||
{
|
||||
return(id);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// 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
|
||||
// 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.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void Group::p_setId(const hid_t new_id)
|
||||
{
|
||||
// handling references to this old id
|
||||
try {
|
||||
close();
|
||||
}
|
||||
catch (Exception close_error) {
|
||||
throw GroupIException("Group::p_setId", close_error.getDetailMsg());
|
||||
}
|
||||
// reset object's id to the given id
|
||||
id = new_id;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Group::close
|
||||
///\brief Closes this group.
|
||||
@@ -203,8 +251,10 @@ void Group::close()
|
||||
{
|
||||
throw GroupIException("Group::close", "H5Gclose failed");
|
||||
}
|
||||
// reset the id because the group that it represents is now closed
|
||||
id = 0;
|
||||
// reset the id when the group that it represents is no longer
|
||||
// referenced
|
||||
if (getCounter() == 0)
|
||||
id = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -34,15 +34,7 @@ class H5_DLLCPP Group : public H5Object, public CommonFG {
|
||||
// Retrieves a dataspace with the region pointed to selected.
|
||||
DataSpace getRegion(void *ref, H5R_type_t ref_type = H5R_DATASET_REGION) const;
|
||||
|
||||
// Creates a reference to a named Hdf5 object or to a dataset region
|
||||
// in this object.
|
||||
void* Reference(const char* name, DataSpace& dataspace, H5R_type_t ref_type = H5R_DATASET_REGION) const; // will be obsolete
|
||||
|
||||
// Creates a reference to a named Hdf5 object in this object.
|
||||
void* Reference(const char* name) const; // will be obsolete
|
||||
void* Reference(const H5std_string& name) const; // will be obsolete
|
||||
|
||||
// Returns this class name
|
||||
///\brief Returns this class name
|
||||
virtual H5std_string fromClass () const { return("Group"); }
|
||||
|
||||
// Throw group exception.
|
||||
@@ -52,7 +44,9 @@ class H5_DLLCPP Group : public H5Object, public CommonFG {
|
||||
virtual hid_t getLocId() const;
|
||||
|
||||
// Creates a group by way of dereference.
|
||||
Group(IdComponent& obj, void* ref);
|
||||
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);
|
||||
|
||||
// default constructor
|
||||
Group();
|
||||
@@ -60,12 +54,21 @@ class H5_DLLCPP Group : public H5Object, public CommonFG {
|
||||
// Copy constructor: makes a copy of the original object
|
||||
Group(const Group& original);
|
||||
|
||||
// Gets the group id.
|
||||
virtual hid_t getId() const;
|
||||
|
||||
// Destructor
|
||||
virtual ~Group();
|
||||
|
||||
// Creates a copy of an existing group using its id.
|
||||
Group( const hid_t group_id );
|
||||
|
||||
private:
|
||||
hid_t id; // HDF5 group id
|
||||
|
||||
protected:
|
||||
// Sets the group id.
|
||||
virtual void p_setId(const hid_t new_id);
|
||||
};
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
#endif /*H5_VMS*/
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "H5Include.h"
|
||||
#include "H5Exception.h"
|
||||
#include "H5Library.h"
|
||||
@@ -36,7 +35,7 @@ namespace H5 {
|
||||
///\exception H5::DataTypeIException
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
IdComponent::IdComponent(const hid_t h5_id) : id(h5_id) {}
|
||||
IdComponent::IdComponent(const hid_t h5_id) {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: IdComponent copy constructor
|
||||
@@ -44,11 +43,7 @@ IdComponent::IdComponent(const hid_t h5_id) : id(h5_id) {}
|
||||
///\param original - IN: IdComponent instance to copy
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
IdComponent::IdComponent( const IdComponent& original )
|
||||
{
|
||||
id = original.id;
|
||||
incRefCount(); // increment number of references to this id
|
||||
}
|
||||
IdComponent::IdComponent( const IdComponent& original ) {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: IdComponent::incRefCount
|
||||
@@ -69,7 +64,7 @@ void IdComponent::incRefCount(const hid_t obj_id) const
|
||||
//--------------------------------------------------------------------------
|
||||
void IdComponent::incRefCount() const
|
||||
{
|
||||
incRefCount(id);
|
||||
incRefCount(getId());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -99,7 +94,7 @@ void IdComponent::decRefCount(const hid_t obj_id) const
|
||||
//--------------------------------------------------------------------------
|
||||
void IdComponent::decRefCount() const
|
||||
{
|
||||
decRefCount(id);
|
||||
decRefCount(getId());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -128,13 +123,13 @@ int IdComponent::getCounter(const hid_t obj_id) const
|
||||
//--------------------------------------------------------------------------
|
||||
int IdComponent::getCounter() const
|
||||
{
|
||||
return (getCounter(id));
|
||||
return (getCounter(getId()));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: hdfObjectType
|
||||
///\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
|
||||
@@ -173,7 +168,7 @@ IdComponent& IdComponent::operator=( const IdComponent& rhs )
|
||||
if (this != &rhs)
|
||||
{
|
||||
// handling references to this id
|
||||
try {
|
||||
try {
|
||||
close();
|
||||
}
|
||||
catch (Exception close_error) {
|
||||
@@ -181,10 +176,9 @@ IdComponent& IdComponent::operator=( const IdComponent& rhs )
|
||||
}
|
||||
|
||||
// copy the data members from the rhs object
|
||||
id = rhs.id;
|
||||
|
||||
// increment the reference counter
|
||||
incRefCount();
|
||||
setId(rhs.getId());
|
||||
// incRefCount(getId()); // a = b, so there are two objects with the same
|
||||
// hdf5 id
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
@@ -196,39 +190,30 @@ IdComponent& IdComponent::operator=( const IdComponent& rhs )
|
||||
///\exception H5::IdComponentException when the attempt to close the HDF5
|
||||
/// 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
|
||||
// Modification
|
||||
// 2008/7/23 - BMR
|
||||
// Changed all subclasses' setId to p_setId and put back setId
|
||||
// here. p_setId is used in the library where the id provided
|
||||
// by a C API passed on to user's application in the form of a
|
||||
// C++ API object, which will be destroyed properly, and so
|
||||
// p_setId does not call incRefCount. On the other hand, the
|
||||
// public version setId is used by other applications, in which
|
||||
// the id passed to setId already has a reference count, so setId
|
||||
// must call incRefCount.
|
||||
//--------------------------------------------------------------------------
|
||||
void IdComponent::setId(const hid_t new_id)
|
||||
{
|
||||
// handling references to this old id
|
||||
try {
|
||||
close();
|
||||
}
|
||||
catch (Exception close_error) {
|
||||
throw IdComponentException(inMemFunc("copy"), close_error.getDetailMsg());
|
||||
}
|
||||
|
||||
// reset object's id to the given id
|
||||
id = new_id;
|
||||
// set to new_id
|
||||
p_setId(new_id);
|
||||
|
||||
// increment the reference counter of the new id
|
||||
incRefCount();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: IdComponent::getId
|
||||
///\brief Returns the id of this object
|
||||
///\return HDF5 id
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
hid_t IdComponent::getId () const
|
||||
{
|
||||
return(id);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: IdComponent destructor
|
||||
///\brief Noop destructor.
|
||||
@@ -273,7 +258,7 @@ H5std_string IdComponent::inMemFunc(const char* func_name) const
|
||||
///\brief Default constructor.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
IdComponent::IdComponent() : id(-1) {}
|
||||
IdComponent::IdComponent() {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: IdComponent::p_get_file_name (protected)
|
||||
@@ -287,8 +272,10 @@ IdComponent::IdComponent() : id(-1) {}
|
||||
//--------------------------------------------------------------------------
|
||||
H5std_string IdComponent::p_get_file_name() const
|
||||
{
|
||||
hid_t temp_id = getId();
|
||||
|
||||
// Preliminary call to H5Fget_name to get the length of the file name
|
||||
ssize_t name_size = H5Fget_name(id, NULL, 0);
|
||||
ssize_t name_size = H5Fget_name(temp_id, NULL, 0);
|
||||
|
||||
// If H5Aget_name returns a negative value, raise an exception,
|
||||
if( name_size < 0 )
|
||||
@@ -298,7 +285,7 @@ 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
|
||||
name_size = H5Fget_name(id, name_C, name_size+1);
|
||||
name_size = H5Fget_name(temp_id, name_C, name_size+1);
|
||||
|
||||
// Check for failure again
|
||||
if( name_size < 0 )
|
||||
@@ -312,178 +299,6 @@ H5std_string IdComponent::p_get_file_name() const
|
||||
return(file_name);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: IdComponent::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 IdComponent::p_reference(void* ref, const char* name, hid_t space_id, H5R_type_t ref_type) const
|
||||
{
|
||||
herr_t ret_value = H5Rcreate(ref, id, name, ref_type, space_id);
|
||||
if (ret_value < 0)
|
||||
{
|
||||
throw IdComponentException("", "H5Rcreate failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: IdComponent::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 IdComponent::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("IdComponent::reference", E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: IdComponent::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 IdComponent::reference(void* ref, const char* name) const
|
||||
{
|
||||
try {
|
||||
p_reference(ref, name, -1, H5R_OBJECT);
|
||||
}
|
||||
catch (IdComponentException E) {
|
||||
throw IdComponentException("IdComponent::reference", E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: IdComponent::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 IdComponent::reference(void* ref, const H5std_string& name) const
|
||||
{
|
||||
reference(ref, name.c_str());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: IdComponent::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
|
||||
// Return A reference
|
||||
// Exception H5::IdComponentException
|
||||
// Notes This function is incorrect, and will be removed in the near
|
||||
// future after notifying users of the new APIs ::reference's.
|
||||
// BMR - Oct 8, 2006
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void* IdComponent::p_reference(const char* name, hid_t space_id, H5R_type_t ref_type) const
|
||||
{
|
||||
hobj_ref_t ref;
|
||||
herr_t ret_value = H5Rcreate(&ref, id, name, ref_type, space_id);
|
||||
if (ret_value < 0)
|
||||
{
|
||||
throw IdComponentException("", "H5Rcreate failed");
|
||||
}
|
||||
return (reinterpret_cast<void*>(ref));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: IdComponent::dereference
|
||||
// Purpose Opens the HDF5 object referenced.
|
||||
// Parameters
|
||||
// obj - IN: Dataset reference object is in or location of
|
||||
// object that the dataset is located within.
|
||||
// ref - IN: Reference pointer
|
||||
// Exception H5::IdComponentException
|
||||
// Programmer Binh-Minh Ribler - Oct, 2006
|
||||
//--------------------------------------------------------------------------
|
||||
void IdComponent::dereference(IdComponent& obj, void* ref)
|
||||
{
|
||||
id = H5Rdereference(obj.getId(), H5R_OBJECT, ref);
|
||||
if (id < 0)
|
||||
{
|
||||
throw IdComponentException("", "H5Rdereference failed");
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: IdComponent::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 IdComponent::p_get_obj_type(void *ref, H5R_type_t ref_type) const
|
||||
{
|
||||
H5G_obj_t obj_type = H5Rget_obj_type1(id, ref_type, ref);
|
||||
|
||||
if (obj_type == H5G_UNKNOWN)
|
||||
{
|
||||
throw IdComponentException("", "H5Rget_obj_type failed");
|
||||
}
|
||||
return(obj_type);
|
||||
}
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: IdComponent::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 IdComponent::p_get_region(void *ref, H5R_type_t ref_type) const
|
||||
{
|
||||
hid_t space_id = H5Rget_region(id, ref_type, ref);
|
||||
if (space_id < 0)
|
||||
{
|
||||
throw IdComponentException("", "H5Rget_region failed");
|
||||
}
|
||||
return(space_id);
|
||||
}
|
||||
|
||||
//
|
||||
// Local functions used in this class
|
||||
//
|
||||
@@ -495,7 +310,7 @@ hid_t IdComponent::p_get_region(void *ref, H5R_type_t ref_type) const
|
||||
// Return true if id is valid, false, otherwise
|
||||
// Programmer Binh-Minh Ribler - May, 2005
|
||||
//--------------------------------------------------------------------------
|
||||
bool IdComponent::p_valid_id(const hid_t obj_id) const
|
||||
bool IdComponent::p_valid_id(const hid_t obj_id)
|
||||
{
|
||||
H5I_type_t id_type = H5Iget_type(obj_id);
|
||||
if (id_type <= H5I_BADID || id_type >= H5I_NTYPES)
|
||||
|
||||
@@ -44,13 +44,8 @@ class H5_DLLCPP IdComponent {
|
||||
// Assignment operator.
|
||||
IdComponent& operator=( const IdComponent& rhs );
|
||||
|
||||
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.
|
||||
void dereference(IdComponent& obj, void* ref);
|
||||
// Gets the identifier of this object.
|
||||
virtual hid_t getId () const = 0;
|
||||
|
||||
// Sets the identifier of this object to a new value.
|
||||
void setId(const hid_t new_id);
|
||||
@@ -61,9 +56,6 @@ class H5_DLLCPP IdComponent {
|
||||
// Copy constructor: makes copy of the original IdComponent object.
|
||||
IdComponent( const IdComponent& original );
|
||||
|
||||
// Gets the value of IdComponent's data member.
|
||||
virtual hid_t getId () const;
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
// Pure virtual function for there are various H5*close for the
|
||||
// subclasses.
|
||||
@@ -73,7 +65,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
|
||||
@@ -83,7 +75,6 @@ class H5_DLLCPP IdComponent {
|
||||
|
||||
protected:
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
hid_t id; // HDF5 object id
|
||||
|
||||
// Default constructor.
|
||||
IdComponent();
|
||||
@@ -91,23 +82,12 @@ class H5_DLLCPP IdComponent {
|
||||
// Gets the name of the file, in which an HDF5 object belongs.
|
||||
H5std_string p_get_file_name() const;
|
||||
|
||||
// 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;
|
||||
void* p_reference(const char* name, hid_t space_id, H5R_type_t ref_type) const; // will be removed
|
||||
|
||||
#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;
|
||||
|
||||
// Verifies that the given id is valid.
|
||||
bool p_valid_id(const hid_t obj_id) const;
|
||||
static bool p_valid_id(const hid_t obj_id);
|
||||
|
||||
// Sets the identifier of this object to a new value. - this one
|
||||
// doesn't increment reference count
|
||||
virtual void p_setId(const hid_t new_id) = 0;
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
|
||||
@@ -35,7 +35,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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -21,10 +21,15 @@
|
||||
#include "H5PropList.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"
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
@@ -103,7 +108,7 @@ Attribute H5Object::createAttribute( const char* name, const DataType& data_type
|
||||
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(id, name, type_id, space_id, plist_id, H5P_DEFAULT );
|
||||
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 )
|
||||
@@ -119,7 +124,7 @@ Attribute H5Object::createAttribute( const char* name, const DataType& data_type
|
||||
// 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.
|
||||
/// a reference to an \c H5std_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
|
||||
@@ -137,7 +142,7 @@ Attribute H5Object::createAttribute( const H5std_string& name, const DataType& d
|
||||
//--------------------------------------------------------------------------
|
||||
Attribute H5Object::openAttribute( const char* name ) const
|
||||
{
|
||||
hid_t attr_id = H5Aopen( id, name, H5P_DEFAULT );
|
||||
hid_t attr_id = H5Aopen(getId(), name, H5P_DEFAULT);
|
||||
if( attr_id > 0 )
|
||||
{
|
||||
Attribute attr( attr_id );
|
||||
@@ -153,7 +158,7 @@ Attribute H5Object::openAttribute( const char* name ) const
|
||||
// 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.
|
||||
/// a reference to an \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
Attribute H5Object::openAttribute( const H5std_string& name ) const
|
||||
@@ -171,7 +176,8 @@ Attribute H5Object::openAttribute( const H5std_string& name ) const
|
||||
//--------------------------------------------------------------------------
|
||||
Attribute H5Object::openAttribute( const unsigned int idx ) const
|
||||
{
|
||||
hid_t attr_id = H5Aopen_by_idx(id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)idx, H5P_DEFAULT, H5P_DEFAULT);
|
||||
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 );
|
||||
@@ -188,7 +194,7 @@ Attribute H5Object::openAttribute( const unsigned int idx ) const
|
||||
///\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 _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
|
||||
@@ -196,7 +202,7 @@ Attribute H5Object::openAttribute( const unsigned int idx ) const
|
||||
///\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
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5A.html#Annot-Create2
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
int H5Object::iterateAttrs( attr_operator_t user_op, unsigned *_idx, void *op_data )
|
||||
@@ -208,15 +214,17 @@ int H5Object::iterateAttrs( attr_operator_t user_op, unsigned *_idx, void *op_da
|
||||
userData->object = this;
|
||||
|
||||
// call the C library routine H5Aiterate2 to iterate the attributes
|
||||
hsize_t idx = (hsize_t)*_idx;
|
||||
int ret_value = H5Aiterate2(id, H5_INDEX_NAME, H5_ITER_INC, &idx, userAttrOpWrpr, (void *) userData);
|
||||
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 */
|
||||
*_idx = (unsigned)idx;
|
||||
if (_idx)
|
||||
*_idx = (unsigned)idx;
|
||||
|
||||
return( ret_value );
|
||||
}
|
||||
@@ -235,7 +243,7 @@ int H5Object::getNumAttrs() const
|
||||
{
|
||||
H5O_info_t oinfo; /* Object info */
|
||||
|
||||
if(H5Oget_info(id, &oinfo) < 0)
|
||||
if(H5Oget_info(getId(), &oinfo) < 0)
|
||||
throw AttributeIException(inMemFunc("getNumAttrs"), "H5Oget_info failed");
|
||||
else
|
||||
return( (int)oinfo.num_attrs );
|
||||
@@ -250,7 +258,7 @@ int H5Object::getNumAttrs() const
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Object::removeAttr( const char* name ) const
|
||||
{
|
||||
herr_t ret_value = H5Adelete(id, name);
|
||||
herr_t ret_value = H5Adelete(getId(), name);
|
||||
if( ret_value < 0 )
|
||||
throw AttributeIException(inMemFunc("removeAttr"), "H5Adelete failed");
|
||||
}
|
||||
@@ -259,7 +267,7 @@ void H5Object::removeAttr( const char* name ) const
|
||||
// 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.
|
||||
/// a reference to an \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Object::removeAttr( const H5std_string& name ) const
|
||||
@@ -277,7 +285,7 @@ void H5Object::removeAttr( const H5std_string& name ) const
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Object::renameAttr(const char* oldname, const char* newname) const
|
||||
{
|
||||
herr_t ret_value = H5Arename(id, oldname, newname);
|
||||
herr_t ret_value = H5Arename(getId(), oldname, newname);
|
||||
if (ret_value < 0)
|
||||
throw AttributeIException(inMemFunc("renameAttr"), "H5Arename failed");
|
||||
}
|
||||
@@ -286,7 +294,7 @@ void H5Object::renameAttr(const char* oldname, const char* newname) const
|
||||
// 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.
|
||||
/// a reference to an \c H5std_string for the names.
|
||||
// Programmer Binh-Minh Ribler - Mar, 2005
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Object::renameAttr(const H5std_string& oldname, const H5std_string& newname) const
|
||||
@@ -306,9 +314,9 @@ void H5Object::renameAttr(const H5std_string& oldname, const H5std_string& newna
|
||||
/// This object is used to identify the file to be flushed.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Object::flush(H5F_scope_t scope ) const
|
||||
void H5Object::flush(H5F_scope_t scope) const
|
||||
{
|
||||
herr_t ret_value = H5Fflush( id, scope );
|
||||
herr_t ret_value = H5Fflush(getId(), scope);
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw FileIException(inMemFunc("flush"), "H5Fflush failed");
|
||||
@@ -332,6 +340,235 @@ H5std_string H5Object::getFileName() const
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// 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 - Reference is an object reference.
|
||||
/// \li \c H5R_DATASET_REGION - Reference 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 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
|
||||
// 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 = H5Rdereference(loc_id, 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);
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object destructor
|
||||
///\brief Noop destructor.
|
||||
|
||||
@@ -20,8 +20,7 @@
|
||||
#include "H5Classes.h" // constains forward class declarations
|
||||
|
||||
// H5Object is a baseclass. It has these subclasses:
|
||||
// Group, AbstractDs, and DataType.
|
||||
// AbstractDs, in turn, has subclasses DataSet and Attribute.
|
||||
// Group, DataSet, and DataType.
|
||||
// DataType, in turn, has several specific datatypes as subclasses.
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
@@ -80,6 +79,19 @@ class H5_DLLCPP H5Object : public IdComponent {
|
||||
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);
|
||||
|
||||
@@ -93,6 +105,24 @@ class H5_DLLCPP H5Object : public IdComponent {
|
||||
|
||||
// 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 */
|
||||
|
||||
@@ -289,7 +289,6 @@ void PredType::commit( H5Object& loc, const H5std_string& name )
|
||||
bool PredType::committed()
|
||||
{
|
||||
throw DataTypeIException("PredType::committed", "Error: Attempting to check for commit status on a predefined datatype." );
|
||||
return (0);
|
||||
}
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace H5 {
|
||||
|
||||
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
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "H5Exception.h"
|
||||
#include "H5IdComponent.h"
|
||||
#include "H5PropList.h"
|
||||
#include "H5private.h" // for HDfree
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
@@ -44,7 +45,7 @@ const PropList PropList::DEFAULT( H5P_DEFAULT );
|
||||
///\brief Default constructor: creates a stub property list object.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
PropList::PropList() : IdComponent( 0 ) {}
|
||||
PropList::PropList() : IdComponent(), id(0) {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: PropList copy constructor
|
||||
@@ -52,7 +53,11 @@ PropList::PropList() : IdComponent( 0 ) {}
|
||||
///\param original - IN: The original property list to copy
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
PropList::PropList( const PropList& original ) : IdComponent( original ) {}
|
||||
PropList::PropList(const PropList& original) : IdComponent(original)
|
||||
{
|
||||
id = original.getId();
|
||||
incRefCount(); // increment number of references to this id
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: PropList overloaded constructor
|
||||
@@ -68,7 +73,7 @@ PropList::PropList( const PropList& original ) : IdComponent( original ) {}
|
||||
// description was what I came up with from reading the code.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
PropList::PropList( const hid_t plist_id ) : IdComponent(0)
|
||||
PropList::PropList( const hid_t plist_id ) : IdComponent()
|
||||
{
|
||||
if (H5I_GENPROP_CLS == H5Iget_type(plist_id)) {
|
||||
// call C routine to create the new property
|
||||
@@ -157,7 +162,7 @@ void PropList::copyProp(PropList& dest, const char *name) const
|
||||
/// It differs from the above function only in what arguments it
|
||||
/// accepts.
|
||||
///\param dest - IN: Destination property list or class
|
||||
///\param name - IN: Name of the property to copy - \c std::string
|
||||
///\param name - IN: Name of the property to copy - \c H5std_string
|
||||
// Programmer Binh-Minh Ribler - Jul, 2005
|
||||
//--------------------------------------------------------------------------
|
||||
void PropList::copyProp( PropList& dest, const H5std_string& name ) const
|
||||
@@ -194,7 +199,7 @@ void PropList::copyProp( PropList& dest, PropList& src, const char *name ) const
|
||||
/// accepts. - Obsolete
|
||||
///\param dest - IN: Destination property list or class
|
||||
///\param src - IN: Source property list or class
|
||||
///\param name - IN: Name of the property to copy - \c std::string
|
||||
///\param name - IN: Name of the property to copy - \c H5std_string
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void PropList::copyProp( PropList& dest, PropList& src, const H5std_string& name ) const
|
||||
@@ -202,6 +207,46 @@ void PropList::copyProp( PropList& dest, PropList& src, const H5std_string& name
|
||||
copyProp( dest, src, name.c_str());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: PropList::getId
|
||||
// Purpose: Get the id of this attribute
|
||||
// Description:
|
||||
// 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 PropList::getId() const
|
||||
{
|
||||
return(id);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: PropList::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
|
||||
// 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.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void PropList::p_setId(const hid_t new_id)
|
||||
{
|
||||
// handling references to this old id
|
||||
try {
|
||||
close();
|
||||
}
|
||||
catch (Exception close_error) {
|
||||
throw PropListIException(inMemFunc("p_setId"), close_error.getDetailMsg());
|
||||
}
|
||||
// reset object's id to the given id
|
||||
id = new_id;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: PropList::close
|
||||
///\brief Closes the property list if it is not a default one.
|
||||
@@ -218,8 +263,10 @@ void PropList::close()
|
||||
{
|
||||
throw PropListIException(inMemFunc("close"), "H5Pclose failed");
|
||||
}
|
||||
// reset the id because the property list that it represents is now closed
|
||||
id = 0;
|
||||
// reset the id when the property list that it represents is no longer
|
||||
// referenced
|
||||
if (getCounter() == 0)
|
||||
id = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -273,7 +320,7 @@ bool PropList::propExist(const char* name ) const
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function only in what arguments it
|
||||
/// accepts.
|
||||
///\param name - IN: Name of property to check for - \c std::string
|
||||
///\param name - IN: Name of property to check for - \c H5std_string
|
||||
// Programmer: Binh-Minh Ribler - April, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
bool PropList::propExist(const H5std_string& name ) const
|
||||
@@ -326,7 +373,7 @@ void PropList::getProperty(const char* name, void* value) const
|
||||
/// It differs from the above function only in what arguments it
|
||||
/// accepts.
|
||||
///\param name - IN: Name of property to query - \c char pointer
|
||||
///\return The property that is a \c std::string.
|
||||
///\return The property that is a \c H5std_string.
|
||||
///\exception H5::PropListIException
|
||||
// Programmer: Binh-Minh Ribler - April, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -343,7 +390,7 @@ H5std_string PropList::getProperty(const char* name) const
|
||||
}
|
||||
|
||||
// Return propety value as a string after deleting temp C-string
|
||||
H5std_string prop_strg = H5std_string(prop_strg_C);
|
||||
H5std_string prop_strg(prop_strg_C);
|
||||
delete []prop_strg_C;
|
||||
return (prop_strg);
|
||||
}
|
||||
@@ -352,7 +399,7 @@ H5std_string PropList::getProperty(const char* name) const
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function only in what arguments it
|
||||
/// accepts.
|
||||
///\param name - IN: Name of property to query - \c std::string
|
||||
///\param name - IN: Name of property to query - \c H5std_string
|
||||
///\param value - OUT: Pointer to the buffer for the property value
|
||||
// Programmer: Binh-Minh Ribler - April, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -365,8 +412,8 @@ void PropList::getProperty(const H5std_string& name, void* value) const
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function only in what arguments it
|
||||
/// accepts.
|
||||
///\param name - IN: Name of property to query - \c std::string
|
||||
///\return The property that is a \c std::string.
|
||||
///\param name - IN: Name of property to query - \c H5std_string
|
||||
///\return The property that is a \c H5std_string.
|
||||
// Programmer: Binh-Minh Ribler - April, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
H5std_string PropList::getProperty(const H5std_string& name) const
|
||||
@@ -402,7 +449,7 @@ size_t PropList::getPropSize(const char *name) const
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function only in what arguments it
|
||||
/// accepts.
|
||||
///\param name - IN: Name of property to query - \c std::string
|
||||
///\param name - IN: Name of property to query - \c H5std_string
|
||||
///
|
||||
// Programmer: Binh-Minh Ribler - April, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -421,12 +468,13 @@ size_t PropList::getPropSize(const H5std_string& name) const
|
||||
H5std_string PropList::getClassName() const
|
||||
{
|
||||
char* temp_str;
|
||||
temp_str = H5Pget_class_name(id);
|
||||
temp_str = H5Pget_class_name(id); // this API specified that temp_str must
|
||||
// be freed.
|
||||
|
||||
if (temp_str != NULL)
|
||||
{
|
||||
H5std_string class_name = H5std_string(temp_str);
|
||||
free(temp_str);
|
||||
H5std_string class_name(temp_str);
|
||||
HDfree(temp_str);
|
||||
return(class_name);
|
||||
}
|
||||
else
|
||||
@@ -489,7 +537,7 @@ void PropList::setProperty(const char* name, const char* charptr) const
|
||||
/// It differs from the above function only in what arguments it
|
||||
/// accepts.
|
||||
///\param name - IN: Name of property to set - \c char pointer
|
||||
///\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 char* name, H5std_string& strg) const
|
||||
@@ -502,7 +550,7 @@ void PropList::setProperty(const char* name, H5std_string& strg) const
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function only in what arguments it
|
||||
/// accepts.
|
||||
///\param name - IN: Name of property to set - \c std::string
|
||||
///\param name - IN: Name of property to set - \c H5std_string
|
||||
///\param value - IN: Void pointer to the value for the property
|
||||
// Programmer: Binh-Minh Ribler - April, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -516,8 +564,8 @@ void PropList::setProperty(const H5std_string& name, void* value) const
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function only in what arguments it
|
||||
/// accepts.
|
||||
///\param name - IN: Name of property to set - \c std::string
|
||||
///\param strg - IN: Value for the property is a \c std::string
|
||||
///\param name - IN: Name of property to set - \c H5std_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
|
||||
@@ -569,7 +617,7 @@ void PropList::removeProp(const char *name) const
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function only in what arguments it
|
||||
/// accepts.
|
||||
///\param name - IN: Name of property to remove - \c std::string
|
||||
///\param name - IN: Name of property to remove - \c H5std_string
|
||||
// Programmer: Binh-Minh Ribler - April, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void PropList::removeProp(const H5std_string& name) const
|
||||
|
||||
@@ -94,7 +94,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.
|
||||
@@ -103,8 +103,17 @@ class H5_DLLCPP PropList : public IdComponent {
|
||||
// Copy constructor: creates a copy of a PropList object.
|
||||
PropList(const PropList& original);
|
||||
|
||||
// Gets the property list id.
|
||||
virtual hid_t getId() const;
|
||||
|
||||
// Destructor: properly terminates access to this property list.
|
||||
virtual ~PropList();
|
||||
|
||||
protected:
|
||||
hid_t id; // HDF5 property list id
|
||||
|
||||
// Sets the property list id.
|
||||
virtual void p_setId(const hid_t new_id);
|
||||
};
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
|
||||
@@ -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
|
||||
@@ -209,7 +209,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
|
||||
|
||||
@@ -47,7 +47,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
|
||||
|
||||
@@ -30,7 +30,7 @@ class H5_DLLCPP VarLenType : public DataType {
|
||||
// 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.
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#
|
||||
|
||||
include $(top_srcdir)/config/commence.am
|
||||
include $(top_srcdir)/config/lt_vers.am
|
||||
|
||||
# Include src directory
|
||||
INCLUDES=-I$(top_srcdir)/src
|
||||
@@ -26,10 +27,13 @@ INCLUDES=-I$(top_srcdir)/src
|
||||
# This is our main target
|
||||
lib_LTLIBRARIES=libhdf5_cpp.la
|
||||
|
||||
# Add libtool numbers to the HDF5 C++ library (from config/lt_vers.am)
|
||||
libhdf5_cpp_la_LDFLAGS= -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISION):$(LT_VERS_AGE) $(AM_LDFLAGS)
|
||||
|
||||
# Shared C++ libraries aren't universally supported.
|
||||
if CXX_SHARED_CONDITIONAL
|
||||
else
|
||||
AM_LDFLAGS=-static
|
||||
AM_LDFLAGS+=-static
|
||||
endif
|
||||
|
||||
bin_SCRIPTS=h5c++
|
||||
@@ -64,6 +68,6 @@ mostlyclean-local:
|
||||
fi
|
||||
|
||||
# Mark this directory as part of the C++ API
|
||||
HDF_CXX=yes
|
||||
CXX_API=yes
|
||||
|
||||
include $(top_srcdir)/config/conclude.am
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
# Makefile.in generated by automake 1.10 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.11 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.
|
||||
@@ -35,8 +36,9 @@
|
||||
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
@@ -54,7 +56,11 @@ host_triplet = @host@
|
||||
DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(srcdir)/h5c++.in \
|
||||
$(top_srcdir)/config/commence.am \
|
||||
$(top_srcdir)/config/conclude.am
|
||||
$(top_srcdir)/config/conclude.am \
|
||||
$(top_srcdir)/config/lt_vers.am
|
||||
|
||||
# Shared C++ libraries aren't universally supported.
|
||||
@CXX_SHARED_CONDITIONAL_FALSE@am__append_1 = -static
|
||||
TESTS =
|
||||
subdir = c++/src
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
@@ -64,15 +70,30 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/src/H5config.h
|
||||
CONFIG_CLEAN_FILES = h5c++
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
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 = `echo $$p | sed -e 's|^.*/||'`;
|
||||
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__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
|
||||
"$(DESTDIR)$(includedir)"
|
||||
libLTLIBRARIES_INSTALL = $(INSTALL)
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
libhdf5_cpp_la_LIBADD =
|
||||
am_libhdf5_cpp_la_OBJECTS = H5Exception.lo H5IdComponent.lo \
|
||||
@@ -83,11 +104,14 @@ am_libhdf5_cpp_la_OBJECTS = H5Exception.lo H5IdComponent.lo \
|
||||
H5StrType.lo H5ArrayType.lo H5VarLenType.lo H5CompType.lo \
|
||||
H5DataSet.lo H5CommonFG.lo H5Group.lo H5File.lo
|
||||
libhdf5_cpp_la_OBJECTS = $(am_libhdf5_cpp_la_OBJECTS)
|
||||
binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
|
||||
libhdf5_cpp_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
|
||||
$(CXXFLAGS) $(libhdf5_cpp_la_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SCRIPTS = $(bin_SCRIPTS)
|
||||
DEFAULT_INCLUDES = -I. -I$(top_builddir)/src@am__isrc@
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src
|
||||
depcomp = $(SHELL) $(top_srcdir)/bin/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
am__mv = mv -f
|
||||
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
@@ -99,14 +123,25 @@ CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
$(LDFLAGS) -o $@
|
||||
SOURCES = $(libhdf5_cpp_la_SOURCES)
|
||||
DIST_SOURCES = $(libhdf5_cpp_la_SOURCES)
|
||||
includeHEADERS_INSTALL = $(INSTALL_HEADER)
|
||||
HEADERS = $(include_HEADERS)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
am__tty_colors = \
|
||||
red=; grn=; lgn=; blu=; std=
|
||||
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
|
||||
ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@
|
||||
AMTAR = @AMTAR@
|
||||
|
||||
# H5_CFLAGS holds flags that should be used when building hdf5,
|
||||
# but which should not be exported to h5cc for building other programs.
|
||||
# AM_CFLAGS is an automake construct which should be used by Makefiles
|
||||
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
|
||||
AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
|
||||
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@
|
||||
AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
|
||||
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
|
||||
AM_LDFLAGS = @AM_LDFLAGS@ $(am__append_1)
|
||||
AM_MAKEFLAGS = @AM_MAKEFLAGS@
|
||||
AR = @AR@
|
||||
|
||||
@@ -120,46 +155,47 @@ BYTESEX = @BYTESEX@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CC_VERSION = @CC_VERSION@
|
||||
|
||||
# H5_CFLAGS holds flags that should be used as CFLAGS when building hdf5,
|
||||
# but which shouldn't be exported to h5cc for building other programs.
|
||||
CFLAGS = @CFLAGS@ @H5_CFLAGS@
|
||||
CFLAGS = @CFLAGS@
|
||||
CLEARFILEBUF = @CLEARFILEBUF@
|
||||
CODESTACK = @CODESTACK@
|
||||
CONFIG_DATE = @CONFIG_DATE@
|
||||
CONFIG_MODE = @CONFIG_MODE@
|
||||
CONFIG_USER = @CONFIG_USER@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@ @H5_CPPFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@ @H5_CXXFLAGS@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEBUG_PKG = @DEBUG_PKG@
|
||||
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
|
||||
DIRECT_VFD = @DIRECT_VFD@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
DYNAMIC_DIRS = @DYNAMIC_DIRS@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
EXTERNAL_FILTERS = @EXTERNAL_FILTERS@
|
||||
|
||||
# Make sure that these variables are exported to the Makefiles
|
||||
F9XMODEXT = @F9XMODEXT@
|
||||
F9XMODFLAG = @F9XMODFLAG@
|
||||
F9XSUFFIXFLAG = @F9XSUFFIXFLAG@
|
||||
FC = @FC@
|
||||
FCFLAGS = @FCFLAGS@ @H5_FCFLAGS@
|
||||
FCFLAGS = @FCFLAGS@
|
||||
FCFLAGS_f90 = @FCFLAGS_f90@
|
||||
FCLIBS = @FCLIBS@
|
||||
FFLAGS = @FFLAGS@
|
||||
FGREP = @FGREP@
|
||||
FILTERS = @FILTERS@
|
||||
FSEARCH_DIRS = @FSEARCH_DIRS@
|
||||
GPFS = @GPFS@
|
||||
GREP = @GREP@
|
||||
H5_CFLAGS = @H5_CFLAGS@
|
||||
H5_CPPFLAGS = @H5_CPPFLAGS@
|
||||
@@ -168,11 +204,14 @@ H5_FCFLAGS = @H5_FCFLAGS@
|
||||
H5_LONE_COLON = @H5_LONE_COLON@
|
||||
H5_VERSION = @H5_VERSION@
|
||||
HADDR_T = @HADDR_T@
|
||||
HAVE_DMALLOC = @HAVE_DMALLOC@
|
||||
HDF5_HL = @HDF5_HL@
|
||||
HDF5_INTERFACES = @HDF5_INTERFACES@
|
||||
HDF_CXX = @HDF_CXX@
|
||||
HDF_FORTRAN = @HDF_FORTRAN@
|
||||
HID_T = @HID_T@
|
||||
HL = @HL@
|
||||
HL_FOR = @HL_FOR@
|
||||
HSIZET = @HSIZET@
|
||||
HSIZE_T = @HSIZE_T@
|
||||
HSSIZE_T = @HSSIZE_T@
|
||||
INSTALL = @INSTALL@
|
||||
@@ -180,11 +219,16 @@ INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INSTRUMENT = @INSTRUMENT@
|
||||
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LINUX_LFS = @LINUX_LFS@
|
||||
LIPO = @LIPO@
|
||||
LL_PATH = @LL_PATH@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_STATIC_EXEC = @LT_STATIC_EXEC@
|
||||
@@ -193,13 +237,19 @@ MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MPE = @MPE@
|
||||
MPI_GET_SIZE = @MPI_GET_SIZE@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PARALLEL = @PARALLEL@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
@@ -212,22 +262,21 @@ RUNSERIAL = @RUNSERIAL@
|
||||
R_INTEGER = @R_INTEGER@
|
||||
R_LARGE = @R_LARGE@
|
||||
SEARCH = @SEARCH@
|
||||
SED = @SED@
|
||||
SETX = @SETX@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
|
||||
# Hardcode SHELL to be /bin/sh. Most machines have this shell, and
|
||||
# on at least one machine configure fails to detect its existence (janus).
|
||||
# Also, when HDF5 is configured on one machine but run on another,
|
||||
# configure's automatic SHELL detection may not work on the build machine.
|
||||
SHELL = /bin/sh
|
||||
SHELL = @SHELL@
|
||||
SIZE_T = @SIZE_T@
|
||||
STATIC_EXEC = @STATIC_EXEC@
|
||||
STATIC_SHARED = @STATIC_SHARED@
|
||||
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
|
||||
STRIP = @STRIP@
|
||||
TESTPARALLEL = @TESTPARALLEL@
|
||||
THREADSAFE = @THREADSAFE@
|
||||
TIME = @TIME@
|
||||
TR = @TR@
|
||||
TRACE_API = @TRACE_API@
|
||||
UNAME_INFO = @UNAME_INFO@
|
||||
USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@
|
||||
USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@
|
||||
USE_FILTER_NBIT = @USE_FILTER_NBIT@
|
||||
@@ -236,13 +285,14 @@ USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@
|
||||
USE_FILTER_SZIP = @USE_FILTER_SZIP@
|
||||
USINGMEMCHECKER = @USINGMEMCHECKER@
|
||||
VERSION = @VERSION@
|
||||
WORDS_BIGENDIAN = @WORDS_BIGENDIAN@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
ac_ct_FC = @ac_ct_FC@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
@@ -258,8 +308,12 @@ build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
|
||||
# Install directories that automake doesn't know about
|
||||
docdir = $(exec_prefix)/doc
|
||||
dvidir = @dvidir@
|
||||
enable_shared = @enable_shared@
|
||||
enable_static = @enable_static@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
@@ -267,15 +321,14 @@ host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
|
||||
# Install directories that automake doesn't know about
|
||||
includedir = $(exec_prefix)/include
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
lt_ECHO = @lt_ECHO@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
@@ -288,6 +341,7 @@ sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
@@ -333,14 +387,20 @@ TRACE = perl $(top_srcdir)/bin/trace
|
||||
# *.clog are from the MPE option.
|
||||
CHECK_CLEANFILES = *.chkexe *.chklog *.clog
|
||||
|
||||
# Add libtool shared library version numbers to the HDF5 library
|
||||
# See libtool versioning documentation online.
|
||||
LT_VERS_INTERFACE = 6
|
||||
LT_VERS_REVISION = 3
|
||||
LT_VERS_AGE = 0
|
||||
|
||||
# Include src directory
|
||||
INCLUDES = -I$(top_srcdir)/src
|
||||
|
||||
# This is our main target
|
||||
lib_LTLIBRARIES = libhdf5_cpp.la
|
||||
|
||||
# Shared C++ libraries aren't universally supported.
|
||||
@CXX_SHARED_CONDITIONAL_FALSE@AM_LDFLAGS = -static
|
||||
# Add libtool numbers to the HDF5 C++ library (from config/lt_vers.am)
|
||||
libhdf5_cpp_la_LDFLAGS = -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISION):$(LT_VERS_AGE) $(AM_LDFLAGS)
|
||||
bin_SCRIPTS = h5c++
|
||||
|
||||
# Source files for the library
|
||||
@@ -367,7 +427,7 @@ include_HEADERS = H5Cpp.h H5AbstractDs.h H5AtomType.h H5Attribute.h H5Classes.h
|
||||
DISTCLEANFILES = h5c++ libhdf5.settings
|
||||
|
||||
# Mark this directory as part of the C++ API
|
||||
HDF_CXX = yes
|
||||
CXX_API = yes
|
||||
|
||||
# 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.,
|
||||
@@ -388,18 +448,18 @@ all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .cpp .lo .o .obj
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/commence.am $(top_srcdir)/config/conclude.am $(am__configure_deps)
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/commence.am $(top_srcdir)/config/lt_vers.am $(top_srcdir)/config/conclude.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign c++/src/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign c++/src/Makefile
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign c++/src/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign c++/src/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
@@ -417,25 +477,30 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
h5c++: $(top_builddir)/config.status $(srcdir)/h5c++.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
|
||||
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
|
||||
list2=; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
|
||||
$(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
|
||||
list2="$$list2 $$p"; \
|
||||
else :; fi; \
|
||||
done
|
||||
done; \
|
||||
test -z "$$list2" || { \
|
||||
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
|
||||
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
|
||||
}
|
||||
|
||||
uninstall-libLTLIBRARIES:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
p=$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
|
||||
$(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
|
||||
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
|
||||
for p in $$list; do \
|
||||
$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
|
||||
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
|
||||
done
|
||||
|
||||
clean-libLTLIBRARIES:
|
||||
@@ -447,26 +512,41 @@ clean-libLTLIBRARIES:
|
||||
rm -f "$${dir}/so_locations"; \
|
||||
done
|
||||
libhdf5_cpp.la: $(libhdf5_cpp_la_OBJECTS) $(libhdf5_cpp_la_DEPENDENCIES)
|
||||
$(CXXLINK) -rpath $(libdir) $(libhdf5_cpp_la_OBJECTS) $(libhdf5_cpp_la_LIBADD) $(LIBS)
|
||||
$(libhdf5_cpp_la_LINK) -rpath $(libdir) $(libhdf5_cpp_la_OBJECTS) $(libhdf5_cpp_la_LIBADD) $(LIBS)
|
||||
install-binSCRIPTS: $(bin_SCRIPTS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
|
||||
@list='$(bin_SCRIPTS)'; for p in $$list; do \
|
||||
@list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
if test -f $$d$$p; then \
|
||||
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
|
||||
echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \
|
||||
$(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
|
||||
else :; fi; \
|
||||
done
|
||||
if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
|
||||
done | \
|
||||
sed -e 'p;s,.*/,,;n' \
|
||||
-e 'h;s|.*|.|' \
|
||||
-e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
|
||||
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
|
||||
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
|
||||
if ($$2 == $$4) { files[d] = files[d] " " $$1; \
|
||||
if (++n[d] == $(am__install_max)) { \
|
||||
print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
|
||||
else { print "f", d "/" $$4, $$1 } } \
|
||||
END { for (d in files) print "f", d, files[d] }' | \
|
||||
while read type dir files; do \
|
||||
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
|
||||
test -z "$$files" || { \
|
||||
echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
|
||||
$(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
|
||||
} \
|
||||
; done
|
||||
|
||||
uninstall-binSCRIPTS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(bin_SCRIPTS)'; for p in $$list; do \
|
||||
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
|
||||
echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(bindir)/$$f"; \
|
||||
done
|
||||
@list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
|
||||
files=`for p in $$list; do echo "$$p"; done | \
|
||||
sed -e 's,.*/,,;$(transform)'`; \
|
||||
test -n "$$list" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(bindir)" && rm -f $$files
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
@@ -503,21 +583,21 @@ distclean-compile:
|
||||
|
||||
.cpp.o:
|
||||
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
|
||||
|
||||
.cpp.obj:
|
||||
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.cpp.lo:
|
||||
@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
|
||||
@@ -530,65 +610,72 @@ clean-libtool:
|
||||
install-includeHEADERS: $(include_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
|
||||
@list='$(include_HEADERS)'; for p in $$list; do \
|
||||
@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \
|
||||
$(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \
|
||||
echo "$$d$$p"; \
|
||||
done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
|
||||
$(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
|
||||
done
|
||||
|
||||
uninstall-includeHEADERS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(include_HEADERS)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(includedir)/$$f"; \
|
||||
done
|
||||
@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
|
||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||
test -n "$$files" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(includedir)" && rm -f $$files
|
||||
|
||||
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; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
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; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
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; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
@@ -609,13 +696,17 @@ distdir: $(DISTFILES)
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
@@ -647,6 +738,7 @@ clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@@ -669,6 +761,8 @@ dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
@@ -677,18 +771,28 @@ install-data-am: install-includeHEADERS
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am: install-binSCRIPTS install-libLTLIBRARIES
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
@@ -712,7 +816,7 @@ ps-am:
|
||||
uninstall-am: uninstall-binSCRIPTS uninstall-includeHEADERS \
|
||||
uninstall-libLTLIBRARIES
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
.MAKE: check-am install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am all-local check check-TESTS check-am \
|
||||
clean clean-generic clean-libLTLIBRARIES clean-libtool ctags \
|
||||
@@ -743,6 +847,19 @@ uninstall-am: uninstall-binSCRIPTS uninstall-includeHEADERS \
|
||||
help:
|
||||
@$(top_srcdir)/bin/makehelp
|
||||
|
||||
# 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.
|
||||
|
||||
# Some C++ compilers/linkers (PGI?) create a directory named "ii_files" that
|
||||
# holds *.ii files, which are template entity instantiations.
|
||||
# This entire directory should be cleaned.
|
||||
@@ -839,10 +956,10 @@ $(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
|
||||
echo "No need to test $${tname} again."; \
|
||||
else \
|
||||
echo "============================" > $${log}; \
|
||||
if test "X$(HDF_FORTRAN)" = "Xyes"; then \
|
||||
if test "X$(FORTRAN_API)" = "Xyes"; then \
|
||||
echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
|
||||
echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
|
||||
elif test "X$(HDF_CXX)" = "Xyes"; then \
|
||||
elif test "X$(CXX_API)" = "Xyes"; then \
|
||||
echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
|
||||
echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\
|
||||
else \
|
||||
@@ -878,10 +995,10 @@ $(TEST_SCRIPT_CHKSH) $(TEST_SCRIPT_PARA_CHKSH) dummysh.chkexe_:
|
||||
echo "No need to test $${tname} again."; \
|
||||
else \
|
||||
echo "============================" > $${log}; \
|
||||
if test "X$(HDF_FORTRAN)" = "Xyes"; then \
|
||||
if test "X$(FORTRAN_API)" = "Xyes"; then \
|
||||
echo "Fortran API: Testing $${tname} $(TEST_FLAGS)"; \
|
||||
echo "Fortran API: $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
|
||||
elif test "X$(HDF_CXX)" = "Xyes"; then \
|
||||
elif test "X$(CXX_API)" = "Xyes"; then \
|
||||
echo "C++ API: Testing $${tname} $(TEST_FLAGS)"; \
|
||||
echo "C++ API: $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
|
||||
else \
|
||||
@@ -945,6 +1062,7 @@ check-vfd: $(LIB) $(PROGS) $(TESTS)
|
||||
HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
# 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.
|
||||
.NOEXPORT:
|
||||
|
||||
@@ -56,9 +56,9 @@ get_output_file="no"
|
||||
SHOW="eval"
|
||||
CXXBASE="@CXX@"
|
||||
CXXLINKERBASE="@CXX@"
|
||||
CXXFLAGS="@CXXFLAGS@"
|
||||
CPPFLAGS="@CPPFLAGS@"
|
||||
LDFLAGS="@LDFLAGS@"
|
||||
CXXFLAGS="@AM_CXXFLAGS@ @CXXFLAGS@"
|
||||
CPPFLAGS="@AM_CPPFLAGS@ @CPPFLAGS@"
|
||||
LDFLAGS="@AM_LDFLAGS@ @LDFLAGS@"
|
||||
LIBS="@LIBS@"
|
||||
|
||||
CXX="${HDF5_CXX:-$CXXBASE}"
|
||||
@@ -317,7 +317,7 @@ if test "x$do_link" = "xyes"; then
|
||||
# module. It's okay if they're included twice in the compile line.
|
||||
link_args="$link_args $LIBS"
|
||||
|
||||
$SHOW $CXXLINKER $CPPFLAGS $CXXFLAGS $LDFLAGS $clibpath $link_objs $link_args $shared_link
|
||||
$SHOW $CXXLINKER $CPPFLAGS $CXXFLAGS $clibpath $link_objs $link_args $shared_link $LDFLAGS
|
||||
|
||||
status=$?
|
||||
fi
|
||||
|
||||
@@ -26,7 +26,7 @@ INCLUDES=-I$(top_srcdir)/src -I$(top_srcdir)/test -I$(top_srcdir)/c++/src
|
||||
# Shared C++ libraries aren't universally supported.
|
||||
if CXX_SHARED_CONDITIONAL
|
||||
else
|
||||
AM_LDFLAGS=-static
|
||||
AM_LDFLAGS+=-static
|
||||
endif
|
||||
|
||||
# These are our main targets. They should be listed in the order to be
|
||||
@@ -39,10 +39,10 @@ LDADD=$(LIBH5TEST) $(LIBH5CPP) $(LIBHDF5)
|
||||
|
||||
dsets_SOURCES=dsets.cpp h5cpputil.cpp
|
||||
testhdf5_SOURCES=testhdf5.cpp tattr.cpp tcompound.cpp tfile.cpp tfilter.cpp \
|
||||
th5s.cpp trefer.cpp ttypes.cpp tvlstr.cpp h5cpputil.cpp
|
||||
th5s.cpp tlinks.cpp trefer.cpp ttypes.cpp tvlstr.cpp h5cpputil.cpp
|
||||
|
||||
# Tell conclude.am that these are C++ tests.
|
||||
HDF_CXX=yes
|
||||
CXX_API=yes
|
||||
|
||||
# Some C++ compilers/linkers (PGI?) create a directory named "ii_files" that
|
||||
# holds *.ii files, which are template entity instantiations.
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
# Makefile.in generated by automake 1.10 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.11 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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,8 +33,9 @@
|
||||
#
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
@@ -51,6 +53,9 @@ host_triplet = @host@
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
|
||||
$(top_srcdir)/config/commence.am \
|
||||
$(top_srcdir)/config/conclude.am
|
||||
|
||||
# Shared C++ libraries aren't universally supported.
|
||||
@CXX_SHARED_CONDITIONAL_FALSE@am__append_1 = -static
|
||||
check_PROGRAMS = $(am__EXEEXT_1)
|
||||
TESTS = $(check_PROGRAMS)
|
||||
subdir = c++/test
|
||||
@@ -61,6 +66,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/src/H5config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
am__EXEEXT_1 = dsets$(EXEEXT) testhdf5$(EXEEXT)
|
||||
am_dsets_OBJECTS = dsets.$(OBJEXT) h5cpputil.$(OBJEXT)
|
||||
dsets_OBJECTS = $(am_dsets_OBJECTS)
|
||||
@@ -68,14 +74,15 @@ dsets_LDADD = $(LDADD)
|
||||
dsets_DEPENDENCIES = $(LIBH5TEST) $(LIBH5CPP) $(LIBHDF5)
|
||||
am_testhdf5_OBJECTS = testhdf5.$(OBJEXT) tattr.$(OBJEXT) \
|
||||
tcompound.$(OBJEXT) tfile.$(OBJEXT) tfilter.$(OBJEXT) \
|
||||
th5s.$(OBJEXT) trefer.$(OBJEXT) ttypes.$(OBJEXT) \
|
||||
tvlstr.$(OBJEXT) h5cpputil.$(OBJEXT)
|
||||
th5s.$(OBJEXT) tlinks.$(OBJEXT) trefer.$(OBJEXT) \
|
||||
ttypes.$(OBJEXT) tvlstr.$(OBJEXT) h5cpputil.$(OBJEXT)
|
||||
testhdf5_OBJECTS = $(am_testhdf5_OBJECTS)
|
||||
testhdf5_LDADD = $(LDADD)
|
||||
testhdf5_DEPENDENCIES = $(LIBH5TEST) $(LIBH5CPP) $(LIBHDF5)
|
||||
DEFAULT_INCLUDES = -I. -I$(top_builddir)/src@am__isrc@
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src
|
||||
depcomp = $(SHELL) $(top_srcdir)/bin/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
am__mv = mv -f
|
||||
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
@@ -89,10 +96,22 @@ SOURCES = $(dsets_SOURCES) $(testhdf5_SOURCES)
|
||||
DIST_SOURCES = $(dsets_SOURCES) $(testhdf5_SOURCES)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
am__tty_colors = \
|
||||
red=; grn=; lgn=; blu=; std=
|
||||
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
|
||||
ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@
|
||||
AMTAR = @AMTAR@
|
||||
|
||||
# H5_CFLAGS holds flags that should be used when building hdf5,
|
||||
# but which should not be exported to h5cc for building other programs.
|
||||
# AM_CFLAGS is an automake construct which should be used by Makefiles
|
||||
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
|
||||
AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
|
||||
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@
|
||||
AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
|
||||
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
|
||||
AM_LDFLAGS = @AM_LDFLAGS@ $(am__append_1)
|
||||
AM_MAKEFLAGS = @AM_MAKEFLAGS@
|
||||
AR = @AR@
|
||||
|
||||
@@ -106,46 +125,47 @@ BYTESEX = @BYTESEX@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CC_VERSION = @CC_VERSION@
|
||||
|
||||
# H5_CFLAGS holds flags that should be used as CFLAGS when building hdf5,
|
||||
# but which shouldn't be exported to h5cc for building other programs.
|
||||
CFLAGS = @CFLAGS@ @H5_CFLAGS@
|
||||
CFLAGS = @CFLAGS@
|
||||
CLEARFILEBUF = @CLEARFILEBUF@
|
||||
CODESTACK = @CODESTACK@
|
||||
CONFIG_DATE = @CONFIG_DATE@
|
||||
CONFIG_MODE = @CONFIG_MODE@
|
||||
CONFIG_USER = @CONFIG_USER@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@ @H5_CPPFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@ @H5_CXXFLAGS@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEBUG_PKG = @DEBUG_PKG@
|
||||
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
|
||||
DIRECT_VFD = @DIRECT_VFD@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
DYNAMIC_DIRS = @DYNAMIC_DIRS@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
EXTERNAL_FILTERS = @EXTERNAL_FILTERS@
|
||||
|
||||
# Make sure that these variables are exported to the Makefiles
|
||||
F9XMODEXT = @F9XMODEXT@
|
||||
F9XMODFLAG = @F9XMODFLAG@
|
||||
F9XSUFFIXFLAG = @F9XSUFFIXFLAG@
|
||||
FC = @FC@
|
||||
FCFLAGS = @FCFLAGS@ @H5_FCFLAGS@
|
||||
FCFLAGS = @FCFLAGS@
|
||||
FCFLAGS_f90 = @FCFLAGS_f90@
|
||||
FCLIBS = @FCLIBS@
|
||||
FFLAGS = @FFLAGS@
|
||||
FGREP = @FGREP@
|
||||
FILTERS = @FILTERS@
|
||||
FSEARCH_DIRS = @FSEARCH_DIRS@
|
||||
GPFS = @GPFS@
|
||||
GREP = @GREP@
|
||||
H5_CFLAGS = @H5_CFLAGS@
|
||||
H5_CPPFLAGS = @H5_CPPFLAGS@
|
||||
@@ -154,11 +174,14 @@ H5_FCFLAGS = @H5_FCFLAGS@
|
||||
H5_LONE_COLON = @H5_LONE_COLON@
|
||||
H5_VERSION = @H5_VERSION@
|
||||
HADDR_T = @HADDR_T@
|
||||
HAVE_DMALLOC = @HAVE_DMALLOC@
|
||||
HDF5_HL = @HDF5_HL@
|
||||
HDF5_INTERFACES = @HDF5_INTERFACES@
|
||||
HDF_CXX = @HDF_CXX@
|
||||
HDF_FORTRAN = @HDF_FORTRAN@
|
||||
HID_T = @HID_T@
|
||||
HL = @HL@
|
||||
HL_FOR = @HL_FOR@
|
||||
HSIZET = @HSIZET@
|
||||
HSIZE_T = @HSIZE_T@
|
||||
HSSIZE_T = @HSSIZE_T@
|
||||
INSTALL = @INSTALL@
|
||||
@@ -166,11 +189,16 @@ INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INSTRUMENT = @INSTRUMENT@
|
||||
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LINUX_LFS = @LINUX_LFS@
|
||||
LIPO = @LIPO@
|
||||
LL_PATH = @LL_PATH@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_STATIC_EXEC = @LT_STATIC_EXEC@
|
||||
@@ -179,13 +207,19 @@ MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MPE = @MPE@
|
||||
MPI_GET_SIZE = @MPI_GET_SIZE@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PARALLEL = @PARALLEL@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
@@ -198,22 +232,21 @@ RUNSERIAL = @RUNSERIAL@
|
||||
R_INTEGER = @R_INTEGER@
|
||||
R_LARGE = @R_LARGE@
|
||||
SEARCH = @SEARCH@
|
||||
SED = @SED@
|
||||
SETX = @SETX@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
|
||||
# Hardcode SHELL to be /bin/sh. Most machines have this shell, and
|
||||
# on at least one machine configure fails to detect its existence (janus).
|
||||
# Also, when HDF5 is configured on one machine but run on another,
|
||||
# configure's automatic SHELL detection may not work on the build machine.
|
||||
SHELL = /bin/sh
|
||||
SHELL = @SHELL@
|
||||
SIZE_T = @SIZE_T@
|
||||
STATIC_EXEC = @STATIC_EXEC@
|
||||
STATIC_SHARED = @STATIC_SHARED@
|
||||
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
|
||||
STRIP = @STRIP@
|
||||
TESTPARALLEL = @TESTPARALLEL@
|
||||
THREADSAFE = @THREADSAFE@
|
||||
TIME = @TIME@
|
||||
TR = @TR@
|
||||
TRACE_API = @TRACE_API@
|
||||
UNAME_INFO = @UNAME_INFO@
|
||||
USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@
|
||||
USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@
|
||||
USE_FILTER_NBIT = @USE_FILTER_NBIT@
|
||||
@@ -222,13 +255,14 @@ USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@
|
||||
USE_FILTER_SZIP = @USE_FILTER_SZIP@
|
||||
USINGMEMCHECKER = @USINGMEMCHECKER@
|
||||
VERSION = @VERSION@
|
||||
WORDS_BIGENDIAN = @WORDS_BIGENDIAN@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
ac_ct_FC = @ac_ct_FC@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
@@ -244,8 +278,12 @@ build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
|
||||
# Install directories that automake doesn't know about
|
||||
docdir = $(exec_prefix)/doc
|
||||
dvidir = @dvidir@
|
||||
enable_shared = @enable_shared@
|
||||
enable_static = @enable_static@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
@@ -253,15 +291,14 @@ host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
|
||||
# Install directories that automake doesn't know about
|
||||
includedir = $(exec_prefix)/include
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
lt_ECHO = @lt_ECHO@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
@@ -274,6 +311,7 @@ sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
@@ -322,9 +360,6 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog
|
||||
# Include src, test, and c++/src directories
|
||||
INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/test -I$(top_srcdir)/c++/src
|
||||
|
||||
# Shared C++ libraries aren't universally supported.
|
||||
@CXX_SHARED_CONDITIONAL_FALSE@AM_LDFLAGS = -static
|
||||
|
||||
# These are our main targets. They should be listed in the order to be
|
||||
# executed, generally most specific tests to least specific tests.
|
||||
TEST_PROG = dsets testhdf5
|
||||
@@ -333,11 +368,11 @@ TEST_PROG = dsets testhdf5
|
||||
LDADD = $(LIBH5TEST) $(LIBH5CPP) $(LIBHDF5)
|
||||
dsets_SOURCES = dsets.cpp h5cpputil.cpp
|
||||
testhdf5_SOURCES = testhdf5.cpp tattr.cpp tcompound.cpp tfile.cpp tfilter.cpp \
|
||||
th5s.cpp trefer.cpp ttypes.cpp tvlstr.cpp h5cpputil.cpp
|
||||
th5s.cpp tlinks.cpp trefer.cpp ttypes.cpp tvlstr.cpp h5cpputil.cpp
|
||||
|
||||
|
||||
# Tell conclude.am that these are C++ tests.
|
||||
HDF_CXX = yes
|
||||
CXX_API = yes
|
||||
|
||||
# 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.,
|
||||
@@ -362,14 +397,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign c++/test/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign c++/test/Makefile
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign c++/test/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign c++/test/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
@@ -387,13 +422,16 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
clean-checkPROGRAMS:
|
||||
@list='$(check_PROGRAMS)'; for p in $$list; do \
|
||||
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f $$p $$f"; \
|
||||
rm -f $$p $$f ; \
|
||||
done
|
||||
@list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list || exit $$?; \
|
||||
test -n "$(EXEEXT)" || exit 0; \
|
||||
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list
|
||||
dsets$(EXEEXT): $(dsets_OBJECTS) $(dsets_DEPENDENCIES)
|
||||
@rm -f dsets$(EXEEXT)
|
||||
$(CXXLINK) $(dsets_OBJECTS) $(dsets_LDADD) $(LIBS)
|
||||
@@ -415,27 +453,28 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tfile.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tfilter.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/th5s.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tlinks.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trefer.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ttypes.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tvlstr.Po@am__quote@
|
||||
|
||||
.cpp.o:
|
||||
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
|
||||
|
||||
.cpp.obj:
|
||||
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.cpp.lo:
|
||||
@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
|
||||
@@ -451,45 +490,49 @@ ID: $(HEADERS) $(SOURCES) $(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; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
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; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
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; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
@@ -510,13 +553,17 @@ distdir: $(DISTFILES)
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
@@ -546,6 +593,7 @@ clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@@ -567,6 +615,8 @@ dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
@@ -575,18 +625,28 @@ install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
@@ -609,7 +669,7 @@ ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
.MAKE: check-am install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am all-local check check-TESTS check-am \
|
||||
clean clean-checkPROGRAMS clean-generic clean-libtool ctags \
|
||||
@@ -733,10 +793,10 @@ $(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
|
||||
echo "No need to test $${tname} again."; \
|
||||
else \
|
||||
echo "============================" > $${log}; \
|
||||
if test "X$(HDF_FORTRAN)" = "Xyes"; then \
|
||||
if test "X$(FORTRAN_API)" = "Xyes"; then \
|
||||
echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
|
||||
echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
|
||||
elif test "X$(HDF_CXX)" = "Xyes"; then \
|
||||
elif test "X$(CXX_API)" = "Xyes"; then \
|
||||
echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
|
||||
echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\
|
||||
else \
|
||||
@@ -772,10 +832,10 @@ $(TEST_SCRIPT_CHKSH) $(TEST_SCRIPT_PARA_CHKSH) dummysh.chkexe_:
|
||||
echo "No need to test $${tname} again."; \
|
||||
else \
|
||||
echo "============================" > $${log}; \
|
||||
if test "X$(HDF_FORTRAN)" = "Xyes"; then \
|
||||
if test "X$(FORTRAN_API)" = "Xyes"; then \
|
||||
echo "Fortran API: Testing $${tname} $(TEST_FLAGS)"; \
|
||||
echo "Fortran API: $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
|
||||
elif test "X$(HDF_CXX)" = "Xyes"; then \
|
||||
elif test "X$(CXX_API)" = "Xyes"; then \
|
||||
echo "C++ API: Testing $${tname} $(TEST_FLAGS)"; \
|
||||
echo "C++ API: $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
|
||||
else \
|
||||
@@ -839,6 +899,7 @@ check-vfd: $(LIB) $(PROGS) $(TESTS)
|
||||
HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
# 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.
|
||||
.NOEXPORT:
|
||||
|
||||
@@ -352,7 +352,7 @@ test_tconv( H5File& file)
|
||||
} // test_tconv
|
||||
|
||||
/* This message derives from H5Z */
|
||||
const H5Z_class_t H5Z_BOGUS[1] = {{
|
||||
const H5Z_class2_t H5Z_BOGUS[1] = {{
|
||||
H5Z_CLASS_T_VERS, /* H5Z_class_t version number */
|
||||
H5Z_FILTER_BOGUS, /* Filter id number */
|
||||
1, 1, /* Encode and decode enabled */
|
||||
@@ -413,8 +413,10 @@ filter_bogus(unsigned int flags, size_t cd_nelmts,
|
||||
static herr_t
|
||||
test_compression(H5File& file)
|
||||
{
|
||||
#ifndef H5_HAVE_FILTER_DEFLATE
|
||||
const char *not_supported;
|
||||
not_supported = " Deflate compression is not enabled.";
|
||||
#endif /* H5_HAVE_FILTER_DEFLATE */
|
||||
int points[100][200];
|
||||
int check[100][200];
|
||||
hsize_t i, j, n;
|
||||
@@ -423,7 +425,7 @@ test_compression(H5File& file)
|
||||
for (i = n = 0; i < 100; i++)
|
||||
{
|
||||
for (j = 0; j < 200; j++) {
|
||||
points[i][j] = n++;
|
||||
points[i][j] = (int)n++;
|
||||
}
|
||||
}
|
||||
char* tconv_buf = new char [1000];
|
||||
@@ -487,7 +489,7 @@ test_compression(H5File& file)
|
||||
{
|
||||
for (j=0; j<size[1]; j++)
|
||||
{
|
||||
points[i][j] = n++;
|
||||
points[i][j] = (int)n++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ void issue_fail_msg(const char* where, int line, const char* file_name,
|
||||
* different, the function will print out a message and the
|
||||
* different values. This function is made to reuse the code
|
||||
* segment that is used in various places throughout
|
||||
* the test code. Where the C version of this code segment
|
||||
* the test code. Where the C version of this code segment
|
||||
* "goto error," this function will return -1.
|
||||
*
|
||||
* Return: Success: 0
|
||||
|
||||
@@ -113,25 +113,27 @@ template <class Type1, class Type2>
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
void test_attr(void);
|
||||
void test_compound(void);
|
||||
void test_file(void);
|
||||
void test_filters(void);
|
||||
void test_h5s(void);
|
||||
void test_reference(void);
|
||||
void test_types(void);
|
||||
void test_vlstrings(void);
|
||||
void test_attr();
|
||||
void test_compound();
|
||||
void test_file();
|
||||
void test_filters();
|
||||
void test_links();
|
||||
void test_h5s();
|
||||
void test_reference();
|
||||
void test_types();
|
||||
void test_vlstrings();
|
||||
|
||||
/* Prototypes for the cleanup routines */
|
||||
void cleanup_attr(void);
|
||||
void cleanup_compound(void);
|
||||
void cleanup_dsets(void);
|
||||
void cleanup_file(void);
|
||||
void cleanup_filters(void);
|
||||
void cleanup_h5s(void);
|
||||
void cleanup_reference(void);
|
||||
void cleanup_types(void);
|
||||
void cleanup_vlstrings(void);
|
||||
void cleanup_attr();
|
||||
void cleanup_compound();
|
||||
void cleanup_dsets();
|
||||
void cleanup_file();
|
||||
void cleanup_filters();
|
||||
void cleanup_links();
|
||||
void cleanup_h5s();
|
||||
void cleanup_reference();
|
||||
void cleanup_types();
|
||||
void cleanup_vlstrings();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -356,7 +356,7 @@ static void test_attr_basic_read()
|
||||
for(i=0; i<ATTR2_DIM1; i++)
|
||||
for(j=0; j<ATTR2_DIM2; j++)
|
||||
if(attr_data2[i][j]!=read_data2[i][j]) {
|
||||
TestErrPrintf("%d: attribute data different: attr_data2[%d][%d]=%d, read_data2[%d][%d]=%d\n",__LINE__, i,j,attr_data2[i][j],i,j,read_data1[i]);
|
||||
TestErrPrintf("%d: attribute data different: attr_data2[%d][%d]=%d, read_data2[%d][%d]=%d\n",__LINE__, i,j,attr_data2[i][j],i,j,read_data2[i][j]);
|
||||
}
|
||||
PASSED();
|
||||
} // end try block
|
||||
@@ -1043,13 +1043,18 @@ static void test_attr_dtype_shared()
|
||||
|
||||
// Get size of file
|
||||
h5_stat_size_t empty_filesize; // Size of empty file
|
||||
empty_filesize = h5_get_file_size(FILENAME.c_str());
|
||||
empty_filesize = h5_get_file_size(FILENAME.c_str(), H5P_DEFAULT);
|
||||
if (empty_filesize < 0)
|
||||
TestErrPrintf("Line %d: file size wrong!\n",__LINE__);
|
||||
TestErrPrintf("Line %d: file size wrong!\n", __LINE__);
|
||||
|
||||
// Open the file again
|
||||
fid1.openFile(FILENAME, H5F_ACC_RDWR);
|
||||
|
||||
// Enclosing to work around the issue of unused variables and/or
|
||||
// objects created by copy constructors stay around until end of
|
||||
// scope, causing incorrect number of ref counts.
|
||||
{ // First enclosed block
|
||||
|
||||
// Create a datatype to commit and use
|
||||
IntType dtype(PredType::NATIVE_INT);
|
||||
|
||||
@@ -1065,13 +1070,6 @@ static void test_attr_dtype_shared()
|
||||
// Create dataspace for dataset
|
||||
DataSpace dspace;
|
||||
|
||||
// Enclose the following so that all temporary objects can be
|
||||
// destroyed before testing reference count - this is to overcome
|
||||
// the different time when the temporary objects are to be destroyed
|
||||
// by different compilers.
|
||||
{
|
||||
|
||||
// Create dataset
|
||||
DataSet dset = fid1.createDataSet(DSET1_NAME, dtype, dspace);
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
@@ -1089,8 +1087,8 @@ static void test_attr_dtype_shared()
|
||||
verify_val((int)statbuf.nlink, 3, "DataSet::getObjinfo", __LINE__, __FILE__);
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
// Close attribute
|
||||
attr.close();
|
||||
// Close attribute
|
||||
attr.close();
|
||||
|
||||
// Delete attribute
|
||||
dset.removeAttr(ATTR1_NAME);
|
||||
@@ -1101,8 +1099,8 @@ static void test_attr_dtype_shared()
|
||||
verify_val((int)statbuf.nlink, 2, "DataSet::getObjinfo after DataSet::removeAttr", __LINE__, __FILE__);
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
// Create attribute on dataset
|
||||
attr = dset.createAttribute(ATTR1_NAME,dtype,dspace);
|
||||
// Create attribute on dataset
|
||||
attr = dset.createAttribute(ATTR1_NAME,dtype,dspace);
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
// Check reference count on named datatype
|
||||
@@ -1118,11 +1116,15 @@ static void test_attr_dtype_shared()
|
||||
dset.close();
|
||||
dspace.close();
|
||||
dtype.close();
|
||||
} // end of first enclosing
|
||||
|
||||
fid1.close();
|
||||
|
||||
// Open the file again
|
||||
fid1.openFile(FILENAME, H5F_ACC_RDWR);
|
||||
|
||||
{ // Second enclosed block...
|
||||
|
||||
// Open dataset
|
||||
DataSet *dset2 = new DataSet (fid1.openDataSet(DSET1_NAME));
|
||||
|
||||
@@ -1142,12 +1144,11 @@ static void test_attr_dtype_shared()
|
||||
fid1.getObjinfo(TYPE1_NAME, statbuf);
|
||||
verify_val((int)statbuf.nlink, 3, "DataSet::openAttribute", __LINE__, __FILE__);
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
} // end of second enclosing
|
||||
|
||||
// Unlink the dataset
|
||||
fid1.unlink(DSET1_NAME);
|
||||
|
||||
} // end of enclosing to test reference counts
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
// Check reference count on named datatype
|
||||
fid1.getObjinfo(TYPE1_NAME, statbuf);
|
||||
@@ -1161,7 +1162,7 @@ static void test_attr_dtype_shared()
|
||||
fid1.close();
|
||||
|
||||
// Check size of file
|
||||
filesize=h5_get_file_size(FILENAME.c_str());
|
||||
filesize = h5_get_file_size(FILENAME.c_str(), H5P_DEFAULT);
|
||||
verify_val((long)filesize, (long)empty_filesize, "Checking file size", __LINE__, __FILE__);
|
||||
|
||||
PASSED();
|
||||
@@ -1179,20 +1180,26 @@ static void test_attr_dtype_shared()
|
||||
**
|
||||
****************************************************************/
|
||||
/* Info for a string attribute */
|
||||
const H5std_string ATTRSTR_NAME("String_attr");
|
||||
const H5std_string ATTR1_FL_STR_NAME("String_attr 1");
|
||||
const H5std_string ATTR2_FL_STR_NAME("String_attr 2");
|
||||
const H5std_string ATTR_VL_STR_NAME("String_attr");
|
||||
const H5std_string ATTRSTR_DATA("String Attribute");
|
||||
const int ATTR_LEN = 17;
|
||||
|
||||
static void test_string_attr()
|
||||
{
|
||||
// Output message about test being performed
|
||||
SUBTEST("Testing Basic Attribute Writing Functions");
|
||||
SUBTEST("Testing I/O on FL and VL String Attributes");
|
||||
|
||||
try {
|
||||
// Create file
|
||||
H5File fid1(FILENAME, H5F_ACC_RDWR);
|
||||
|
||||
// Create a variable length string datatype to refer to.
|
||||
StrType type(0, H5T_VARIABLE);
|
||||
//
|
||||
// Fixed-lenth string attributes
|
||||
//
|
||||
// Create a fixed-length string datatype to refer to.
|
||||
StrType fls_type(0, ATTR_LEN);
|
||||
|
||||
// Open the root group.
|
||||
Group root = fid1.openGroup("/");
|
||||
@@ -1200,24 +1207,88 @@ static void test_string_attr()
|
||||
// Create dataspace for the attribute.
|
||||
DataSpace att_space (H5S_SCALAR);
|
||||
|
||||
/* Test Attribute::write(...,const void *buf) with Fixed len string */
|
||||
|
||||
// Create an attribute for the root group.
|
||||
Attribute gr_attr = root.createAttribute(ATTRSTR_NAME, type, att_space);
|
||||
Attribute gr_flattr1 = root.createAttribute(ATTR1_FL_STR_NAME, fls_type, att_space);
|
||||
|
||||
// Write data to the attribute.
|
||||
gr_attr.write(type, ATTRSTR_DATA);
|
||||
gr_flattr1.write(fls_type, ATTRSTR_DATA.c_str());
|
||||
|
||||
/* Test Attribute::write(...,const H5std_string& strg) with FL string */
|
||||
|
||||
// Create an attribute for the root group.
|
||||
Attribute gr_flattr2 = root.createAttribute(ATTR2_FL_STR_NAME, fls_type, att_space);
|
||||
|
||||
// Write data to the attribute.
|
||||
gr_flattr2.write(fls_type, ATTRSTR_DATA);
|
||||
|
||||
/* Test Attribute::read(...,void *buf) with FL string */
|
||||
|
||||
// Read and verify the attribute string as a string of chars.
|
||||
char *string_att_check;
|
||||
gr_attr.read(type, &string_att_check);
|
||||
if(HDstrcmp(string_att_check, ATTRSTR_DATA.c_str())!=0)
|
||||
TestErrPrintf("Line %d: Attribute data different: ATTRSTR_DATA=%s,string_att_check=%s\n",__LINE__, ATTRSTR_DATA.c_str(), string_att_check);
|
||||
char flstring_att_check[ATTR_LEN];
|
||||
gr_flattr1.read(fls_type, flstring_att_check);
|
||||
if(HDstrcmp(flstring_att_check, ATTRSTR_DATA.c_str())!=0)
|
||||
TestErrPrintf("Line %d: Attribute data different: ATTRSTR_DATA=%s,flstring_att_check=%s\n",__LINE__, ATTRSTR_DATA.c_str(), flstring_att_check);
|
||||
|
||||
// Read and verify the attribute string as a string of chars; buffer
|
||||
// is dynamically allocated.
|
||||
size_t attr_size = gr_flattr1.getInMemDataSize();
|
||||
char *fl_dyn_string_att_check;
|
||||
fl_dyn_string_att_check = new char[attr_size+1];
|
||||
gr_flattr1.read(fls_type, fl_dyn_string_att_check);
|
||||
if(HDstrcmp(fl_dyn_string_att_check, ATTRSTR_DATA.c_str())!=0)
|
||||
TestErrPrintf("Line %d: Attribute data different: ATTRSTR_DATA=%s,flstring_att_check=%s\n",__LINE__, ATTRSTR_DATA.c_str(), fl_dyn_string_att_check);
|
||||
delete []fl_dyn_string_att_check;
|
||||
|
||||
/* Test Attribute::read(...,H5std_string& strg) with FL string */
|
||||
|
||||
// Read and verify the attribute string as an std::string.
|
||||
H5std_string read_flstr1;
|
||||
gr_flattr1.read(fls_type, read_flstr1);
|
||||
if (read_flstr1 != ATTRSTR_DATA)
|
||||
TestErrPrintf("Line %d: Attribute data different: ATTRSTR_DATA=%s,read_flstr1=%s\n",__LINE__, ATTRSTR_DATA.c_str(), read_flstr1.c_str());
|
||||
|
||||
// Read and verify the attribute string as a string of chars.
|
||||
HDstrcpy(flstring_att_check, "");
|
||||
gr_flattr2.read(fls_type, flstring_att_check);
|
||||
if(HDstrcmp(flstring_att_check, ATTRSTR_DATA.c_str())!=0)
|
||||
TestErrPrintf("Line %d: Attribute data different: ATTRSTR_DATA=%s,flstring_att_check=%s\n",__LINE__, ATTRSTR_DATA.c_str(), flstring_att_check);
|
||||
|
||||
/* Test Attribute::read(...,H5std_string& strg) with FL string */
|
||||
|
||||
// Read and verify the attribute string as an std::string.
|
||||
H5std_string read_flstr2;
|
||||
gr_flattr2.read(fls_type, read_flstr2);
|
||||
if (read_flstr2 != ATTRSTR_DATA)
|
||||
TestErrPrintf("Line %d: Attribute data different: ATTRSTR_DATA=%s,read_flstr2=%s\n",__LINE__, ATTRSTR_DATA.c_str(), read_flstr2.c_str());
|
||||
|
||||
//
|
||||
// Variable-lenth string attributes
|
||||
//
|
||||
// Create a variable length string datatype to refer to.
|
||||
StrType vls_type(0, H5T_VARIABLE);
|
||||
|
||||
// Create an attribute for the root group.
|
||||
Attribute gr_vlattr = root.createAttribute(ATTR_VL_STR_NAME, vls_type, att_space);
|
||||
|
||||
// Write data to the attribute.
|
||||
gr_vlattr.write(vls_type, ATTRSTR_DATA);
|
||||
|
||||
/* Test Attribute::read(...,void *buf) with Variable len string */
|
||||
// Read and verify the attribute string as a string of chars.
|
||||
char *string_att_check;
|
||||
gr_vlattr.read(vls_type, &string_att_check);
|
||||
if(HDstrcmp(string_att_check, ATTRSTR_DATA.c_str())!=0)
|
||||
TestErrPrintf("Line %d: Attribute data different: ATTRSTR_DATA=%s,string_att_check=%s\n",__LINE__, ATTRSTR_DATA.c_str(), string_att_check);
|
||||
HDfree(string_att_check);
|
||||
|
||||
/* Test Attribute::read(...,H5std_string& strg) with VL string */
|
||||
// Read and verify the attribute string as an std::string.
|
||||
H5std_string read_str;
|
||||
gr_attr.read(type, read_str);
|
||||
gr_vlattr.read(vls_type, read_str);
|
||||
if (read_str != ATTRSTR_DATA)
|
||||
TestErrPrintf("Line %d: Attribute data different: ATTRSTR_DATA=%s,read_str=%s\n",__LINE__, ATTRSTR_DATA.c_str(), read_str.c_str());
|
||||
|
||||
PASSED();
|
||||
} // end try block
|
||||
|
||||
|
||||
@@ -178,13 +178,13 @@ static void test_compound_2()
|
||||
s_ptr->e != d_ptr->e) {
|
||||
H5_FAILED();
|
||||
cerr << " i=" << i << endl;
|
||||
cerr << " src={a=" << s_ptr->a << ", b=" << s_ptr->b
|
||||
<< "c=[" << s_ptr->c[0] << "," << s_ptr->c[1] << ","
|
||||
<< s_ptr->c[2] << "," << s_ptr->c[3] << ", d="
|
||||
cerr << " src={a=" << s_ptr->a << ", b=" << s_ptr->b
|
||||
<< "c=[" << s_ptr->c[0] << "," << s_ptr->c[1] << ","
|
||||
<< s_ptr->c[2] << "," << s_ptr->c[3] << ", d="
|
||||
<< s_ptr->d << ", e=" << s_ptr->e << "}" << endl;
|
||||
cerr << " dst={a=" << s_ptr->a << ", b=" << s_ptr->b
|
||||
<< "c=[" << s_ptr->c[0] << "," << s_ptr->c[1] << ","
|
||||
<< s_ptr->c[2] << "," << s_ptr->c[3] << ", d="
|
||||
cerr << " dst={a=" << s_ptr->a << ", b=" << s_ptr->b
|
||||
<< "c=[" << s_ptr->c[0] << "," << s_ptr->c[1] << ","
|
||||
<< s_ptr->c[2] << "," << s_ptr->c[3] << ", d="
|
||||
<< s_ptr->d << ", e=" << s_ptr->e << "}" << endl;
|
||||
}
|
||||
}
|
||||
@@ -294,13 +294,13 @@ static void test_compound_3()
|
||||
s_ptr->e != d_ptr->e) {
|
||||
H5_FAILED();
|
||||
cerr << " i=" << i << endl;
|
||||
cerr << " src={a=" << s_ptr->a << ", b=" << s_ptr->b
|
||||
<< ", c=[" << s_ptr->c[0] << "," << s_ptr->c[1] << ","
|
||||
<< s_ptr->c[2] << "," << s_ptr->c[3] << "], d="
|
||||
cerr << " src={a=" << s_ptr->a << ", b=" << s_ptr->b
|
||||
<< ", c=[" << s_ptr->c[0] << "," << s_ptr->c[1] << ","
|
||||
<< s_ptr->c[2] << "," << s_ptr->c[3] << "], d="
|
||||
<< s_ptr->d << ", e=" << s_ptr->e << "}" << endl;
|
||||
cerr << " dst={a=" << d_ptr->a
|
||||
<< ", c=[" << d_ptr->c[0] << "," << d_ptr->c[1] << ","
|
||||
<< d_ptr->c[2] << "," << d_ptr->c[3] << "], e="
|
||||
<< ", c=[" << d_ptr->c[0] << "," << d_ptr->c[1] << ","
|
||||
<< d_ptr->c[2] << "," << d_ptr->c[3] << "], e="
|
||||
<< d_ptr->e << "}" << endl;
|
||||
} // if
|
||||
} // for
|
||||
@@ -391,7 +391,7 @@ static void test_compound_4()
|
||||
st.insertMember("d", HOFFSET(src_typ_t, d), PredType::NATIVE_INT);
|
||||
st.insertMember("e", HOFFSET(src_typ_t, e), PredType::NATIVE_INT);
|
||||
array_dt->close();
|
||||
|
||||
|
||||
array_dt = new ArrayType(PredType::NATIVE_INT, 1, &four);
|
||||
|
||||
// Create an empty compound datatype
|
||||
@@ -402,7 +402,7 @@ static void test_compound_4()
|
||||
dt.insertMember("d", HOFFSET(dst_typ_t, d), PredType::NATIVE_SHORT);
|
||||
dt.insertMember("e", HOFFSET(dst_typ_t, e), PredType::NATIVE_INT);
|
||||
array_dt->close();
|
||||
|
||||
|
||||
/* Perform the conversion */
|
||||
st.convert(dt, (size_t)nelmts, buf, bkg);
|
||||
|
||||
@@ -421,17 +421,17 @@ static void test_compound_4()
|
||||
{
|
||||
H5_FAILED();
|
||||
cerr << " i=" << i << endl;
|
||||
cerr << " src={a=" << s_ptr->a << ", b=" << s_ptr->b
|
||||
<< "c=[" << s_ptr->c[0] << "," << s_ptr->c[1] << ","
|
||||
<< s_ptr->c[2] << "," << s_ptr->c[3] << ", d="
|
||||
cerr << " src={a=" << s_ptr->a << ", b=" << s_ptr->b
|
||||
<< "c=[" << s_ptr->c[0] << "," << s_ptr->c[1] << ","
|
||||
<< s_ptr->c[2] << "," << s_ptr->c[3] << ", d="
|
||||
<< s_ptr->d << ", e=" << s_ptr->e << "}" << endl;
|
||||
cerr << " dst={a=" << d_ptr->a << ", b=" << d_ptr->b
|
||||
<< "c=[" << d_ptr->c[0] << "," << d_ptr->c[1] << ","
|
||||
<< d_ptr->c[2] << "," << d_ptr->c[3] << ", d="
|
||||
cerr << " dst={a=" << d_ptr->a << ", b=" << d_ptr->b
|
||||
<< "c=[" << d_ptr->c[0] << "," << d_ptr->c[1] << ","
|
||||
<< d_ptr->c[2] << "," << d_ptr->c[3] << ", d="
|
||||
<< d_ptr->d << ", e=" << d_ptr->e << "}" << endl;
|
||||
} // if
|
||||
} // for
|
||||
|
||||
|
||||
/* Release resources */
|
||||
free(buf);
|
||||
free(bkg);
|
||||
@@ -493,13 +493,13 @@ static void test_compound_5()
|
||||
try {
|
||||
|
||||
/* Build datatypes */
|
||||
ArrayType* array_dt = new ArrayType(PredType::NATIVE_SHORT, 1, dims);
|
||||
ArrayType* array_dt = new ArrayType(PredType::NATIVE_SHORT, 1, dims);
|
||||
CompType short_array(4*sizeof(short));
|
||||
short_array.insertMember("_", 0, *array_dt);
|
||||
array_dt->close();
|
||||
|
||||
CompType int_array(4*sizeof(int));
|
||||
array_dt = new ArrayType(PredType::NATIVE_INT, 1, dims);
|
||||
array_dt = new ArrayType(PredType::NATIVE_INT, 1, dims);
|
||||
int_array.insertMember("_", 0, *array_dt);
|
||||
array_dt->close();
|
||||
|
||||
@@ -532,7 +532,7 @@ static void test_compound_5()
|
||||
src[1].coll_ids[0]!=dst[1].coll_ids[0] ||
|
||||
src[1].coll_ids[1]!=dst[1].coll_ids[1] ||
|
||||
src[1].coll_ids[2]!=dst[1].coll_ids[2] ||
|
||||
src[1].coll_ids[3]!=dst[1].coll_ids[3])
|
||||
src[1].coll_ids[3]!=dst[1].coll_ids[3])
|
||||
{ H5_FAILED(); }
|
||||
|
||||
/* Free memory buffers */
|
||||
@@ -614,17 +614,17 @@ static void test_compound_6()
|
||||
s_ptr = ((src_typ_t*)orig) + i;
|
||||
d_ptr = ((dst_typ_t*)buf) + i;
|
||||
if (s_ptr->b != d_ptr->b ||
|
||||
s_ptr->d != d_ptr->d)
|
||||
s_ptr->d != d_ptr->d)
|
||||
{
|
||||
H5_FAILED();
|
||||
cerr << " i=" << i << endl;
|
||||
cerr << " src={b=" << s_ptr->b << ", d=" << s_ptr->d
|
||||
cerr << " src={b=" << s_ptr->b << ", d=" << s_ptr->d
|
||||
<< "}" << endl;
|
||||
cerr << " dst={b=" << d_ptr->b << ", d=" << d_ptr->d
|
||||
cerr << " dst={b=" << d_ptr->b << ", d=" << d_ptr->d
|
||||
<< "}" << endl;
|
||||
} // if
|
||||
} // for
|
||||
|
||||
|
||||
/* Release resources */
|
||||
free(buf);
|
||||
free(bkg);
|
||||
|
||||
@@ -85,6 +85,7 @@ main(int argc, char *argv[])
|
||||
AddTest("types", test_types, cleanup_types, "Generic Data Types", NULL);
|
||||
AddTest("compound", test_compound, cleanup_compound, "Compound Data Types", NULL);
|
||||
AddTest("filter", test_filters, cleanup_filters, "Various Filters", NULL);
|
||||
AddTest("links", test_links, cleanup_links, "Various Links", NULL);
|
||||
/* Comment out tests that are not done yet. - BMR, Feb 2001
|
||||
AddTest("select", test_select, cleanup_select, "Selections", NULL);
|
||||
AddTest("time", test_time, cleanup_time, "Time Datatypes", NULL);
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
#define FILTER_CHUNK_DIM2 25
|
||||
|
||||
// will do this function later or use it as guideline - BMR - 2007/01/26
|
||||
static herr_t test_filter_internal(hid_t fid, const char *name, hid_t dcpl,
|
||||
static herr_t test_filter_internal(hid_t fid, const char *name, hid_t dcpl,
|
||||
int if_fletcher32, int corrupted, hsize_t *dset_size)
|
||||
{
|
||||
cerr << "do nothing right now" << endl;
|
||||
@@ -58,9 +58,9 @@ static herr_t test_filter_internal(hid_t fid, const char *name, hid_t dcpl,
|
||||
/* Temporary filter IDs used for testing */
|
||||
#define H5Z_FILTER_BOGUS 305
|
||||
static size_t filter_bogus(unsigned int flags, size_t cd_nelmts,
|
||||
const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf);
|
||||
const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf);
|
||||
/* This message derives from H5Z */
|
||||
const H5Z_class_t H5Z_BOGUS[1] = {{
|
||||
const H5Z_class2_t H5Z_BOGUS[1] = {{
|
||||
H5Z_CLASS_T_VERS, /* H5Z_class_t version */
|
||||
H5Z_FILTER_BOGUS, /* Filter id number */
|
||||
1, 1, /* Encoding and decoding enabled */
|
||||
@@ -118,7 +118,7 @@ static void test_null_filter()
|
||||
// Output message about test being performed
|
||||
SUBTEST("'Null' filter");
|
||||
try {
|
||||
hsize_t null_size; // Size of dataset with null filter
|
||||
//hsize_t null_size; // Size of dataset with null filter
|
||||
|
||||
// Prepare dataset create property list
|
||||
DSetCreatPropList dsplist;
|
||||
@@ -168,7 +168,6 @@ void test_szip_filter(H5File& file1)
|
||||
{
|
||||
#ifdef H5_HAVE_FILTER_SZIP
|
||||
int points[DSET_DIM1][DSET_DIM2], check[DSET_DIM1][DSET_DIM2];
|
||||
hsize_t szip_size; /* Size of dataset with szip filter */
|
||||
unsigned szip_options_mask=H5_SZIP_NN_OPTION_MASK;
|
||||
unsigned szip_pixels_per_block=4;
|
||||
|
||||
@@ -203,7 +202,7 @@ void test_szip_filter(H5File& file1)
|
||||
{
|
||||
for (j=0; j<size[1]; j++)
|
||||
{
|
||||
points[i][j] = n++;
|
||||
points[i][j] = (int)n++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -228,7 +227,7 @@ void test_szip_filter(H5File& file1)
|
||||
{
|
||||
issue_fail_msg("test_szip_filter()", __LINE__, __FILE__, E.getCDetailMsg());
|
||||
}
|
||||
} // if szip presents
|
||||
} // if szip presents
|
||||
else {
|
||||
SKIPPED();
|
||||
}
|
||||
|
||||
@@ -300,7 +300,7 @@ static void test_h5s_scalar_write()
|
||||
verify_val(ext_type, H5S_SCALAR, "DataSpace::getSimpleExtentType", __LINE__, __FILE__);
|
||||
|
||||
// Create and write a dataset
|
||||
DataSet dataset = fid1.createDataSet("Dataset1", PredType::NATIVE_UINT,sid1);
|
||||
DataSet dataset = fid1.createDataSet("Dataset1", PredType::NATIVE_UINT,sid1);
|
||||
dataset.write(&space3_data, PredType::NATIVE_UINT);
|
||||
|
||||
PASSED();
|
||||
|
||||
722
c++/test/tlinks.cpp
Normal file
722
c++/test/tlinks.cpp
Normal file
@@ -0,0 +1,722 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Copyright by The HDF Group. *
|
||||
* 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. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
/*****************************************************************************
|
||||
FILE
|
||||
tlinks.cpp - HDF5 C++ testing functionalities associated with the
|
||||
C attribute interface (H5L)
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#ifdef OLD_HEADER_FILENAME
|
||||
#include <iostream.h>
|
||||
#else
|
||||
#include <iostream>
|
||||
#endif
|
||||
#include <string>
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
#ifndef H5_NO_STD
|
||||
using std::cerr;
|
||||
using std::endl;
|
||||
#endif // H5_NO_STD
|
||||
#endif
|
||||
|
||||
#include "testhdf5.h" // C test header file
|
||||
#include "H5Cpp.h" // C++ API header file
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
using namespace H5;
|
||||
#endif
|
||||
|
||||
#include "h5cpputil.h" // C++ test utilility header file
|
||||
|
||||
// A lot of the definition inherited from C test links.c is left here until
|
||||
// the H5L API is implemented and tests are completed - BMR 10/19/2009
|
||||
/*
|
||||
* This file needs to access private information from the H5G package.
|
||||
* This file also needs to access the group testing code.
|
||||
*/
|
||||
//#define H5G_PACKAGE
|
||||
//#define H5G_TESTING
|
||||
|
||||
//#include "h5test.h"
|
||||
//#include "H5Gpkg.h" /* Groups */
|
||||
//#include "H5Iprivate.h" /* IDs */
|
||||
//#include "H5Lprivate.h" /* Links */
|
||||
|
||||
/* File for external link test. Created with gen_udlinks.c */
|
||||
#define LINKED_FILE "be_extlink2.h5"
|
||||
|
||||
#ifdef H5_VMS
|
||||
#if 0
|
||||
const char *FILENAME[] = {
|
||||
"links0",
|
||||
"links1",
|
||||
"links2",
|
||||
"links3",
|
||||
"links4a", /* 4 */
|
||||
"links4b", /* 5 */
|
||||
"links4c", /* 6 */
|
||||
"links4d", /* 7 */
|
||||
"links5", /* 8 */
|
||||
"links6", /* 9 */
|
||||
"links7", /* 10 */
|
||||
"links8", /* 11 */
|
||||
"extlinks0", /* 12: main files */
|
||||
"[.tmp]extlinks0", /* 13: */
|
||||
"extlinks1", /* 14: target files */
|
||||
"[.tmp]extlinks1", /* 15: */
|
||||
"extlinks2", /* 16: */
|
||||
"[.tmp]extlinks2", /* 17: */
|
||||
"extlinks3", /* 18: */
|
||||
"[.tmp]extlinks3", /* 19: */
|
||||
"extlinks4", /* 20: */
|
||||
"[.tmp]extlinks4", /* 21: */
|
||||
"extlinks5", /* 22: */
|
||||
"[.tmp]extlinks6", /* 23: */
|
||||
"extlinks7", /* 24: */
|
||||
"[.tmp]extlinks7", /* 25: */
|
||||
"[.tmp]extlinks8", /* 26: */
|
||||
"extlinks9", /* 27: */
|
||||
"[.tmp]extlinks9", /* 28: */
|
||||
"extlinks10", /* 29: */ /* TESTS for windows */
|
||||
"[.tmp]extlinks10", /* 30: */
|
||||
"[.tmp]extlinks11", /* 31: */
|
||||
"[.tmp]extlinks12", /* 32: */
|
||||
"extlinks13", /* 33: */
|
||||
"[.tmp]extlinks13", /* 34: */
|
||||
"[.tmp]extlinks14", /* 35: */
|
||||
"[.tmp]extlinks15", /* 36: */
|
||||
"extlinks16A", /* 37: */ /* TESTS for H5P_set_elink_fapl */
|
||||
"extlinks16B", /* 38: */
|
||||
"extlinks17", /* 39: */
|
||||
"extlinks18A", /* 40: */
|
||||
"extlinks18B", /* 41: */
|
||||
"extlinks19A", /* 42: */
|
||||
"extlinks19B", /* 43: */
|
||||
"extlinks20", /* 44: */
|
||||
NULL
|
||||
};
|
||||
#endif // 0
|
||||
|
||||
#define TMPDIR "[.tmp]"
|
||||
#else
|
||||
#if 0
|
||||
const char *FILENAME[] = {
|
||||
"links0",
|
||||
"links1",
|
||||
"links2",
|
||||
"links3",
|
||||
"links4a", /* 4 */
|
||||
"links4b", /* 5 */
|
||||
"links4c", /* 6 */
|
||||
"links4d", /* 7 */
|
||||
"links5", /* 8 */
|
||||
"links6", /* 9 */
|
||||
"links7", /* 10 */
|
||||
"links8", /* 11 */
|
||||
"extlinks0", /* 12: main files */
|
||||
"tmp/extlinks0", /* 13: */
|
||||
"extlinks1", /* 14: target files */
|
||||
"tmp/extlinks1", /* 15: */
|
||||
"extlinks2", /* 16: */
|
||||
"tmp/extlinks2", /* 17: */
|
||||
"extlinks3", /* 18: */
|
||||
"tmp/extlinks3", /* 19: */
|
||||
"extlinks4", /* 20: */
|
||||
"tmp/extlinks4", /* 21: */
|
||||
"extlinks5", /* 22: */
|
||||
"tmp/extlinks6", /* 23: */
|
||||
"extlinks7", /* 24: */
|
||||
"tmp/extlinks7", /* 25: */
|
||||
"tmp/extlinks8", /* 26: */
|
||||
"extlinks9", /* 27: */
|
||||
"tmp/extlinks9", /* 28: */
|
||||
"extlinks10", /* 29: */ /* TESTS for windows */
|
||||
"tmp/extlinks10", /* 30: */
|
||||
"tmp/extlinks11", /* 31: */
|
||||
"tmp/extlinks12", /* 32: */
|
||||
"extlinks13", /* 33: */
|
||||
"tmp/extlinks13", /* 34: */
|
||||
"tmp/extlinks14", /* 35: */
|
||||
"tmp/extlinks15", /* 36: */
|
||||
"extlinks16A", /* 37: */ /* TESTS for H5P_set_elink_fapl */
|
||||
"extlinks16B", /* 38: */
|
||||
"extlinks17", /* 39: */
|
||||
"extlinks18A", /* 40: */
|
||||
"extlinks18B", /* 41: */
|
||||
"extlinks19A", /* 42: */
|
||||
"extlinks19B", /* 43: */
|
||||
"extlinks20", /* 44: */
|
||||
NULL
|
||||
};
|
||||
|
||||
#endif // 0
|
||||
|
||||
#define TMPDIR "tmp"
|
||||
#endif
|
||||
|
||||
#define FAMILY_SIZE 1024
|
||||
#define CORE_INCREMENT 1024
|
||||
#define NUM400 400
|
||||
|
||||
/* do not do check_all_closed() for "ext*" files and "tmp/ext*" */
|
||||
#define EXTSTOP 12
|
||||
|
||||
#define LINK_BUF_SIZE 1024
|
||||
#define NAME_BUF_SIZE 1024
|
||||
#define MAX_NAME_LEN ((64*1024)+1024)
|
||||
|
||||
/* Link type IDs */
|
||||
#define UD_HARD_TYPE 201
|
||||
#define UD_CB_TYPE H5L_TYPE_MAX
|
||||
#define UD_PLIST_TYPE 128
|
||||
#define UD_CBFAIL_TYPE UD_PLIST_TYPE
|
||||
#define UD_ERROR_TYPE 189
|
||||
#define UD_BAD_TYPE1 H5L_TYPE_HARD
|
||||
#define UD_BAD_TYPE2 (H5L_TYPE_UD_MIN - 5)
|
||||
#define UD_BAD_VERS (H5L_LINK_CLASS_T_VERS + 1)
|
||||
|
||||
#define DEST_PROP_NAME "destination_group"
|
||||
#define REREG_TARGET_NAME "rereg_target"
|
||||
|
||||
#define UD_CB_LINK_NAME "ud_callback_link"
|
||||
#define NEW_UD_CB_LINK_NAME "ud_callback_link2"
|
||||
#define UD_CB_TARGET "ud_target"
|
||||
#define UD_CB_TARGET_LEN 10
|
||||
|
||||
#define LE_FILENAME "le_extlink1.h5"
|
||||
#define BE_FILENAME "be_extlink1.h5"
|
||||
|
||||
#define ELINK_CB_FAM_SIZE (hsize_t) 100
|
||||
|
||||
#define H5L_DIM1 100
|
||||
#define H5L_DIM2 100
|
||||
|
||||
/* Creation order macros */
|
||||
#define CORDER_GROUP_NAME "corder_group"
|
||||
#define CORDER_SOFT_GROUP_NAME "corder_soft_group"
|
||||
#define CORDER_NLINKS 18
|
||||
#define CORDER_ITER_STOP 3
|
||||
#define CORDER_EST_ENTRY_LEN 9
|
||||
|
||||
/* Timestamp macros */
|
||||
#define TIMESTAMP_GROUP_1 "timestamp1"
|
||||
#define TIMESTAMP_GROUP_2 "timestamp2"
|
||||
|
||||
/* Link iteration struct */
|
||||
typedef struct {
|
||||
H5_iter_order_t order; /* Direction of iteration */
|
||||
unsigned ncalled; /* # of times callback is entered */
|
||||
unsigned nskipped; /* # of links skipped */
|
||||
int stop; /* # of iterations to stop after */
|
||||
int64_t curr; /* Current creation order value */
|
||||
size_t max_visit; /* Size of "visited link" flag array */
|
||||
hbool_t *visited; /* Pointer to array of "visited link" flags */
|
||||
} link_iter_info_t;
|
||||
|
||||
/* Link visit structs */
|
||||
typedef struct {
|
||||
const char *path; /* Path to link */
|
||||
H5L_type_t type; /* Type of link */
|
||||
} link_visit_t;
|
||||
static const link_visit_t lvisit0[] = {
|
||||
{"Dataset_zero", H5L_TYPE_HARD},
|
||||
{"Group1", H5L_TYPE_HARD},
|
||||
{"Group1/Dataset_one", H5L_TYPE_HARD},
|
||||
{"Group1/Group2", H5L_TYPE_HARD},
|
||||
{"Group1/Group2/Dataset_two", H5L_TYPE_HARD},
|
||||
{"Group1/Group2/Type_two", H5L_TYPE_HARD},
|
||||
{"Group1/Group2/hard_zero", H5L_TYPE_HARD},
|
||||
{"Group1/Type_one", H5L_TYPE_HARD},
|
||||
{"Group1/hard_one", H5L_TYPE_HARD},
|
||||
{"Type_zero", H5L_TYPE_HARD},
|
||||
{"ext_dangle", H5L_TYPE_EXTERNAL},
|
||||
{"ext_one", H5L_TYPE_EXTERNAL},
|
||||
{"hard_one", H5L_TYPE_HARD},
|
||||
{"hard_two", H5L_TYPE_HARD},
|
||||
{"hard_zero", H5L_TYPE_HARD},
|
||||
{"soft_dangle", H5L_TYPE_SOFT},
|
||||
{"soft_one", H5L_TYPE_SOFT},
|
||||
{"soft_two", H5L_TYPE_SOFT}
|
||||
};
|
||||
static const link_visit_t lvisit1[] = {
|
||||
{"Dataset_one", H5L_TYPE_HARD},
|
||||
{"Group2", H5L_TYPE_HARD},
|
||||
{"Group2/Dataset_two", H5L_TYPE_HARD},
|
||||
{"Group2/Type_two", H5L_TYPE_HARD},
|
||||
{"Group2/hard_zero", H5L_TYPE_HARD},
|
||||
{"Group2/hard_zero/Dataset_zero", H5L_TYPE_HARD},
|
||||
{"Group2/hard_zero/Group1", H5L_TYPE_HARD},
|
||||
{"Group2/hard_zero/Type_zero", H5L_TYPE_HARD},
|
||||
{"Group2/hard_zero/ext_dangle", H5L_TYPE_EXTERNAL},
|
||||
{"Group2/hard_zero/ext_one", H5L_TYPE_EXTERNAL},
|
||||
{"Group2/hard_zero/hard_one", H5L_TYPE_HARD},
|
||||
{"Group2/hard_zero/hard_two", H5L_TYPE_HARD},
|
||||
{"Group2/hard_zero/hard_zero", H5L_TYPE_HARD},
|
||||
{"Group2/hard_zero/soft_dangle", H5L_TYPE_SOFT},
|
||||
{"Group2/hard_zero/soft_one", H5L_TYPE_SOFT},
|
||||
{"Group2/hard_zero/soft_two", H5L_TYPE_SOFT},
|
||||
{"Type_one", H5L_TYPE_HARD},
|
||||
{"hard_one", H5L_TYPE_HARD}
|
||||
};
|
||||
static const link_visit_t lvisit2[] = {
|
||||
{"Dataset_two", H5L_TYPE_HARD},
|
||||
{"Type_two", H5L_TYPE_HARD},
|
||||
{"hard_zero", H5L_TYPE_HARD},
|
||||
{"hard_zero/Dataset_zero", H5L_TYPE_HARD},
|
||||
{"hard_zero/Group1", H5L_TYPE_HARD},
|
||||
{"hard_zero/Group1/Dataset_one", H5L_TYPE_HARD},
|
||||
{"hard_zero/Group1/Group2", H5L_TYPE_HARD},
|
||||
{"hard_zero/Group1/Type_one", H5L_TYPE_HARD},
|
||||
{"hard_zero/Group1/hard_one", H5L_TYPE_HARD},
|
||||
{"hard_zero/Type_zero", H5L_TYPE_HARD},
|
||||
{"hard_zero/ext_dangle", H5L_TYPE_EXTERNAL},
|
||||
{"hard_zero/ext_one", H5L_TYPE_EXTERNAL},
|
||||
{"hard_zero/hard_one", H5L_TYPE_HARD},
|
||||
{"hard_zero/hard_two", H5L_TYPE_HARD},
|
||||
{"hard_zero/hard_zero", H5L_TYPE_HARD},
|
||||
{"hard_zero/soft_dangle", H5L_TYPE_SOFT},
|
||||
{"hard_zero/soft_one", H5L_TYPE_SOFT},
|
||||
{"hard_zero/soft_two", H5L_TYPE_SOFT}
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
unsigned idx; /* Index in link visit structure */
|
||||
const link_visit_t *info; /* Pointer to the link visit structure to use */
|
||||
} lvisit_ud_t;
|
||||
|
||||
|
||||
/* Object visit structs */
|
||||
typedef struct {
|
||||
const char *path; /* Path to object */
|
||||
H5O_type_t type; /* Type of object */
|
||||
} obj_visit_t;
|
||||
static const obj_visit_t ovisit0_old[] = {
|
||||
{".", H5O_TYPE_GROUP},
|
||||
{"Dataset_zero", H5O_TYPE_DATASET},
|
||||
{"Group1", H5O_TYPE_GROUP},
|
||||
{"Group1/Dataset_one", H5O_TYPE_DATASET},
|
||||
{"Group1/Group2", H5O_TYPE_GROUP},
|
||||
{"Group1/Group2/Dataset_two", H5O_TYPE_DATASET},
|
||||
{"Group1/Group2/Type_two", H5O_TYPE_NAMED_DATATYPE},
|
||||
{"Group1/Type_one", H5O_TYPE_NAMED_DATATYPE},
|
||||
{"Type_zero", H5O_TYPE_NAMED_DATATYPE}
|
||||
};
|
||||
static const obj_visit_t ovisit0_new[] = {
|
||||
{".", H5O_TYPE_GROUP},
|
||||
{"Dataset_zero", H5O_TYPE_DATASET},
|
||||
{"Group1", H5O_TYPE_GROUP},
|
||||
{"Group1/Dataset_one", H5O_TYPE_DATASET},
|
||||
{"Group1/Group2", H5O_TYPE_GROUP},
|
||||
{"Group1/Group2/Dataset_two", H5O_TYPE_DATASET},
|
||||
{"Group1/Group2/Type_two", H5O_TYPE_NAMED_DATATYPE},
|
||||
{"Group1/Type_one", H5O_TYPE_NAMED_DATATYPE},
|
||||
{"Type_zero", H5O_TYPE_NAMED_DATATYPE}
|
||||
};
|
||||
static const obj_visit_t ovisit1_old[] = {
|
||||
{".", H5O_TYPE_GROUP},
|
||||
{"Dataset_one", H5O_TYPE_DATASET},
|
||||
{"Group2", H5O_TYPE_GROUP},
|
||||
{"Group2/Dataset_two", H5O_TYPE_DATASET},
|
||||
{"Group2/Type_two", H5O_TYPE_NAMED_DATATYPE},
|
||||
{"Group2/hard_zero", H5O_TYPE_GROUP},
|
||||
{"Group2/hard_zero/Dataset_zero", H5O_TYPE_DATASET},
|
||||
{"Group2/hard_zero/Type_zero", H5O_TYPE_NAMED_DATATYPE},
|
||||
{"Type_one", H5O_TYPE_NAMED_DATATYPE}
|
||||
};
|
||||
static const obj_visit_t ovisit1_new[] = {
|
||||
{".", H5O_TYPE_GROUP},
|
||||
{"Dataset_one", H5O_TYPE_DATASET},
|
||||
{"Group2", H5O_TYPE_GROUP},
|
||||
{"Group2/Dataset_two", H5O_TYPE_DATASET},
|
||||
{"Group2/Type_two", H5O_TYPE_NAMED_DATATYPE},
|
||||
{"Group2/hard_zero", H5O_TYPE_GROUP},
|
||||
{"Group2/hard_zero/Dataset_zero", H5O_TYPE_DATASET},
|
||||
{"Group2/hard_zero/Type_zero", H5O_TYPE_NAMED_DATATYPE},
|
||||
{"Type_one", H5O_TYPE_NAMED_DATATYPE}
|
||||
};
|
||||
static const obj_visit_t ovisit2_old[] = {
|
||||
{".", H5O_TYPE_GROUP},
|
||||
{"Dataset_two", H5O_TYPE_DATASET},
|
||||
{"Type_two", H5O_TYPE_NAMED_DATATYPE},
|
||||
{"hard_zero", H5O_TYPE_GROUP},
|
||||
{"hard_zero/Dataset_zero", H5O_TYPE_DATASET},
|
||||
{"hard_zero/Group1", H5O_TYPE_GROUP},
|
||||
{"hard_zero/Group1/Dataset_one", H5O_TYPE_DATASET},
|
||||
{"hard_zero/Group1/Type_one", H5O_TYPE_NAMED_DATATYPE},
|
||||
{"hard_zero/Type_zero", H5O_TYPE_NAMED_DATATYPE}
|
||||
};
|
||||
static const obj_visit_t ovisit2_new[] = {
|
||||
{".", H5O_TYPE_GROUP},
|
||||
{"Dataset_two", H5O_TYPE_DATASET},
|
||||
{"Type_two", H5O_TYPE_NAMED_DATATYPE},
|
||||
{"hard_zero", H5O_TYPE_GROUP},
|
||||
{"hard_zero/Dataset_zero", H5O_TYPE_DATASET},
|
||||
{"hard_zero/Group1", H5O_TYPE_GROUP},
|
||||
{"hard_zero/Group1/Dataset_one", H5O_TYPE_DATASET},
|
||||
{"hard_zero/Group1/Type_one", H5O_TYPE_NAMED_DATATYPE},
|
||||
{"hard_zero/Type_zero", H5O_TYPE_NAMED_DATATYPE}
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
unsigned idx; /* Index in object visit structure */
|
||||
const obj_visit_t *info; /* Pointer to the object visit structure to use */
|
||||
} ovisit_ud_t;
|
||||
|
||||
static const char *FILENAME[] = {
|
||||
"link0",
|
||||
"link1.h5",
|
||||
"link2.h5",
|
||||
NULL
|
||||
};
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_basic_links
|
||||
*
|
||||
* Purpose: Test building a file with assorted links.
|
||||
*
|
||||
* Return: Success: 0
|
||||
*
|
||||
* Failure: -1
|
||||
*
|
||||
* Programmer: Binh-Minh Ribler
|
||||
* October 16, 2009
|
||||
*
|
||||
* Modifications:
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static void test_basic_links(hid_t fapl_id, hbool_t new_format)
|
||||
{
|
||||
hsize_t size[1] = {1};
|
||||
char filename[NAME_BUF_SIZE];
|
||||
char* tconv_buf = new char [1000];
|
||||
|
||||
// Use the file access template id to create a file access prop. list.
|
||||
FileAccPropList fapl(fapl_id);
|
||||
|
||||
try
|
||||
{
|
||||
if(new_format)
|
||||
SUBTEST("Link creation (w/new group format)")
|
||||
else
|
||||
SUBTEST("Link creation")
|
||||
|
||||
h5_fixname(FILENAME[0], fapl_id, filename, sizeof filename);
|
||||
H5File file(filename, H5F_ACC_TRUNC, FileCreatPropList::DEFAULT, fapl);
|
||||
|
||||
// Create simple dataspace
|
||||
DataSpace scalar (1, size, size);
|
||||
|
||||
// Create a group then close it by letting the object go out of scope
|
||||
{
|
||||
Group group(file.createGroup("grp1", 0));
|
||||
}
|
||||
|
||||
// Create a dataset then close it by letting the object go out of scope
|
||||
{
|
||||
DataSet dset1(file.createDataSet("dset1", PredType::NATIVE_INT, scalar));
|
||||
}
|
||||
|
||||
hid_t file_id = file.getId();
|
||||
|
||||
// Because these are not implemented in the C++ API yet, they are
|
||||
// used so CommonFG::getLinkval can be tested.
|
||||
// Create a hard link
|
||||
if(H5Lcreate_hard(
|
||||
file_id, "dset1", H5L_SAME_LOC, "grp1/hard1",
|
||||
H5P_DEFAULT, H5P_DEFAULT) < 0)
|
||||
throw Exception("test_basic_links", "H5Lcreate_hard failed");
|
||||
|
||||
// Create a symbolic link
|
||||
if(H5Lcreate_soft(
|
||||
"/dset1", file_id, "grp1/soft", H5P_DEFAULT, H5P_DEFAULT) < 0)
|
||||
throw Exception("test_basic_links", "H5Lcreate_soft failed");
|
||||
|
||||
// Create a symbolic link to something that doesn't exist
|
||||
if(H5Lcreate_soft(
|
||||
"foobar", file_id, "grp1/dangle", H5P_DEFAULT, H5P_DEFAULT) < 0)
|
||||
throw Exception("test_basic_links", "H5Lcreate_soft failed");
|
||||
|
||||
// Create a recursive symbolic link
|
||||
if(H5Lcreate_soft(
|
||||
"/grp1/recursive", file_id, "/grp1/recursive",
|
||||
H5P_DEFAULT, H5P_DEFAULT) < 0)
|
||||
throw Exception("test_basic_links", "H5Lcreate_soft failed");
|
||||
|
||||
// Verify link values before closing the file
|
||||
|
||||
H5std_string softlink_val = file.getLinkval("grp1/soft");
|
||||
verify_val(softlink_val, "/dset1", "H5File::getLinkval grp1/soft", __LINE__, __FILE__);
|
||||
|
||||
H5std_string dngllink_val = file.getLinkval("grp1/dangle");
|
||||
verify_val(dngllink_val, "foobar", "H5File::getLinkval grp1/dangle", __LINE__, __FILE__);
|
||||
|
||||
H5std_string reclink_val = file.getLinkval("grp1/recursive");
|
||||
verify_val(reclink_val, "/grp1/recursive", "H5File::getLinkval grp1/recursive", __LINE__, __FILE__);
|
||||
|
||||
} // end of try block
|
||||
catch (Exception E)
|
||||
{
|
||||
issue_fail_msg("test_basic_links()", __LINE__, __FILE__, E.getCDetailMsg());
|
||||
}
|
||||
|
||||
// Open the file and check on the links in it
|
||||
try
|
||||
{
|
||||
// Open the file above
|
||||
H5File file(filename, H5F_ACC_RDWR, FileCreatPropList::DEFAULT, fapl);
|
||||
|
||||
// Verify link existence
|
||||
if(H5Lexists(file.getId(), "dset1", H5P_DEFAULT) != TRUE)
|
||||
throw InvalidActionException("H5Lexists", "dset1 doesn't exist");
|
||||
if(H5Lexists(file.getId(), "grp1/soft", H5P_DEFAULT) != TRUE)
|
||||
throw InvalidActionException("H5Lexists", "grp1/soft doesn't exist");
|
||||
|
||||
// Verify link values
|
||||
H5std_string softlink_val = file.getLinkval("grp1/soft");
|
||||
verify_val(softlink_val, "/dset1", "H5File::getLinkval grp1/soft", __LINE__, __FILE__);
|
||||
|
||||
H5std_string reclink_val = file.getLinkval("grp1/recursive");
|
||||
verify_val(reclink_val, "/grp1/recursive", "H5File::getLinkval grp1/recursive", __LINE__, __FILE__);
|
||||
|
||||
PASSED();
|
||||
} // end of try block
|
||||
catch (Exception E)
|
||||
{
|
||||
issue_fail_msg("test_basic_links()", __LINE__, __FILE__, E.getCDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_links
|
||||
*
|
||||
* Purpose: Test links
|
||||
*
|
||||
* Return: None
|
||||
*
|
||||
* Programmer: Binh-Minh Ribler
|
||||
* October 16, 2009
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
void test_links()
|
||||
{
|
||||
hid_t fapl_id, fapl2_id; /* File access property lists */
|
||||
hbool_t new_format; /* Whether to use the new format or not */
|
||||
const char *envval;
|
||||
|
||||
envval = HDgetenv("HDF5_DRIVER");
|
||||
if(envval == NULL)
|
||||
envval = "nomatch";
|
||||
|
||||
fapl_id = h5_fileaccess();
|
||||
|
||||
// Output message about test being performed
|
||||
MESSAGE(5, ("Testing Various Links\n"));
|
||||
try
|
||||
{
|
||||
/* Copy the file access property list */
|
||||
if((fapl2_id = H5Pcopy(fapl_id)) < 0)
|
||||
throw Exception("test_links", "H5Pcopy failed");
|
||||
|
||||
/* Set the "use the latest version of the format" bounds for creating objects in the file */
|
||||
if(H5Pset_libver_bounds(fapl2_id, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
|
||||
throw Exception("test_links", "H5Pset_libver_bounds failed");
|
||||
|
||||
/* Loop over using new group format */
|
||||
for(new_format = FALSE; new_format <= TRUE; new_format++)
|
||||
{
|
||||
hid_t my_fapl_id;
|
||||
|
||||
/* Check for FAPL to use */
|
||||
if(new_format)
|
||||
my_fapl_id = fapl2_id;
|
||||
else
|
||||
my_fapl_id = fapl_id;
|
||||
|
||||
/* General tests... (on both old & new format groups */
|
||||
// FileAccPropList may be passed in instead of fapl id
|
||||
test_basic_links(my_fapl_id, new_format);
|
||||
#if 0
|
||||
// these tests are from the C test links.c and left here for future
|
||||
// implementation of H5L API
|
||||
nerrors += test_basic_links(fapl_id, new_format) < 0 ? 1 : 0;
|
||||
nerrors += cklinks(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
nerrors += new_links(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
nerrors += ck_new_links(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
nerrors += long_links(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
nerrors += toomany(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
|
||||
/* Test new H5L link creation routine */
|
||||
nerrors += test_lcpl(my_fapl, new_format);
|
||||
nerrors += test_move(my_fapl, new_format);
|
||||
nerrors += test_copy(my_fapl, new_format);
|
||||
nerrors += test_move_preserves(my_fapl, new_format);
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
nerrors += test_deprec(my_fapl, new_format);
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
#ifndef H5_CANNOT_OPEN_TWICE
|
||||
nerrors += external_link_root(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
#endif /* H5_CANNOT_OPEN_TWICE */
|
||||
nerrors += external_link_path(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
nerrors += external_link_mult(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
#ifndef H5_CANNOT_OPEN_TWICE
|
||||
nerrors += external_link_self(envval, my_fapl, new_format) < 0 ? 1 : 0;
|
||||
nerrors += external_link_pingpong(envval, my_fapl, new_format) < 0 ? 1 : 0;
|
||||
nerrors += external_link_toomany(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
#endif /* H5_CANNOT_OPEN_TWICE */
|
||||
nerrors += external_link_dangling(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
nerrors += external_link_recursive(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
nerrors += external_link_query(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
nerrors += external_link_unlink_compact(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
nerrors += external_link_unlink_dense(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
nerrors += external_link_move(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
nerrors += external_link_ride(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
#ifndef H5_CANNOT_OPEN_TWICE
|
||||
nerrors += external_link_closing(envval, my_fapl, new_format) < 0 ? 1 : 0;
|
||||
#endif /* H5_CANNOT_OPEN_TWICE */
|
||||
nerrors += external_link_endian(new_format) < 0 ? 1 : 0;
|
||||
nerrors += external_link_strong(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
|
||||
/* tests for external link */
|
||||
nerrors += external_link_env(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
nerrors += external_link_prefix(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
nerrors += external_link_abs_mainpath(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
nerrors += external_link_rel_mainpath(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
nerrors += external_link_cwd(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
nerrors += external_link_abstar(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
nerrors += external_link_abstar_cur(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
nerrors += external_link_reltar(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
nerrors += external_link_chdir(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
nerrors += external_set_elink_fapl1(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
nerrors += external_set_elink_fapl2(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
nerrors += external_set_elink_fapl3(new_format) < 0 ? 1 : 0;
|
||||
nerrors += external_set_elink_acc_flags(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
nerrors += external_set_elink_cb(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
|
||||
#ifdef H5_HAVE_WINDOW_PATH
|
||||
nerrors += external_link_win1(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
nerrors += external_link_win2(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
nerrors += external_link_win3(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
nerrors += external_link_win4(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
nerrors += external_link_win5(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
nerrors += external_link_win6(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
nerrors += external_link_win7(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
nerrors += external_link_win8(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
nerrors += external_link_win9(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
#endif
|
||||
/* These tests assume that external links are a form of UD links,
|
||||
* so assume that everything that passed for external links
|
||||
* above has already been tested for UD links.
|
||||
*/
|
||||
if(new_format == TRUE) {
|
||||
nerrors += ud_hard_links(fapl2) < 0 ? 1 : 0; /* requires new format groups */
|
||||
nerrors += ud_link_reregister(fapl2) < 0 ? 1 : 0; /* requires new format groups */
|
||||
} /* end if */
|
||||
|
||||
nerrors += ud_callbacks(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
nerrors += ud_link_errors(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
nerrors += lapl_udata(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
nerrors += lapl_nlinks(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
nerrors += linkinfo(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
|
||||
/* Misc. extra tests, useful for both new & old format files */
|
||||
nerrors += link_visit(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
nerrors += link_visit_by_name(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
nerrors += obj_visit(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
nerrors += obj_visit_by_name(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
nerrors += obj_visit_stop(my_fapl, new_format) < 0 ? 1 : 0;
|
||||
|
||||
/* Keep this test last, it's testing files that are used above */
|
||||
/* do not do this for files used by external link tests */
|
||||
nerrors += check_all_closed(my_fapl, new_format, EXTSTOP) < 0 ? 1 : 0;
|
||||
#endif // 0
|
||||
} /* end for */
|
||||
|
||||
#if 0
|
||||
/* New group revision feature tests */
|
||||
nerrors += corder_create_empty(fapl2) < 0 ? 1 : 0;
|
||||
/* XXX: when creation order indexing is fully working, go back and add checks
|
||||
* to these tests to make certain that the creation order values are
|
||||
* correct.
|
||||
*/
|
||||
nerrors += corder_create_compact(fapl2) < 0 ? 1 : 0;
|
||||
nerrors += corder_create_dense(fapl2) < 0 ? 1 : 0;
|
||||
nerrors += corder_transition(fapl2) < 0 ? 1 : 0;
|
||||
nerrors += corder_delete(fapl2) < 0 ? 1 : 0;
|
||||
nerrors += link_info_by_idx(fapl2) < 0 ? 1 : 0;
|
||||
nerrors += delete_by_idx(fapl2) < 0 ? 1 : 0;
|
||||
nerrors += link_iterate(fapl2) < 0 ? 1 : 0;
|
||||
nerrors += open_by_idx(fapl2) < 0 ? 1 : 0;
|
||||
nerrors += object_info(fapl2) < 0 ? 1 : 0;
|
||||
nerrors += group_info(fapl2) < 0 ? 1 : 0;
|
||||
nerrors += timestamps(fapl2) < 0 ? 1 : 0;
|
||||
|
||||
/* Test new API calls on old-style groups */
|
||||
nerrors += link_info_by_idx_old(fapl) < 0 ? 1 : 0;
|
||||
nerrors += delete_by_idx_old(fapl) < 0 ? 1 : 0;
|
||||
nerrors += link_iterate_old(fapl) < 0 ? 1 : 0;
|
||||
nerrors += open_by_idx_old(fapl) < 0 ? 1 : 0;
|
||||
nerrors += object_info_old(fapl) < 0 ? 1 : 0;
|
||||
nerrors += group_info_old(fapl) < 0 ? 1 : 0;
|
||||
|
||||
#endif
|
||||
/* Close 2nd FAPL */
|
||||
H5Pclose(fapl2_id);
|
||||
|
||||
h5_cleanup(FILENAME, fapl_id);
|
||||
|
||||
/* Test that external links can be used after a library reset. MUST be
|
||||
* called last so the reset doesn't interfere with the property lists. This
|
||||
* routine will delete its own file. */
|
||||
/* nerrors += external_reset_register() < 0 ? 1 : 0;
|
||||
*/
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
issue_fail_msg("test_links()", __LINE__, __FILE__, E.getCDetailMsg());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: cleanup_links
|
||||
*
|
||||
* Purpose: Cleanup temporary test files
|
||||
*
|
||||
* Return: none
|
||||
*
|
||||
* Programmer: Binh-Minh Ribler
|
||||
* October 16, 2009
|
||||
*
|
||||
* Modifications:
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
void cleanup_links()
|
||||
{
|
||||
HDremove(FILENAME[0]);
|
||||
}
|
||||
|
||||
@@ -59,17 +59,9 @@ const int SPACE1_DIM1 = 4;
|
||||
|
||||
// 2-D dataset with fixed dimensions
|
||||
const H5std_string SPACE2_NAME("Space2");
|
||||
const int SPACE2_RANK = 2;
|
||||
const int SPACE2_DIM1 = 10;
|
||||
const int SPACE2_DIM2 = 10;
|
||||
|
||||
// Larger 1-D dataset with fixed dimensions
|
||||
const H5std_string SPACE3_NAME("Space3");
|
||||
const int SPACE3_RANK = 1;
|
||||
const int SPACE3_DIM1 = 100;
|
||||
|
||||
// Element selection information
|
||||
const int POINT1_NPOINTS = 10;
|
||||
|
||||
// Compound datatype
|
||||
typedef struct s1_t {
|
||||
@@ -84,7 +76,7 @@ typedef struct s1_t {
|
||||
** Tests references to various kinds of objects
|
||||
**
|
||||
****************************************************************/
|
||||
static void test_reference_obj()
|
||||
static void test_reference_obj(void)
|
||||
{
|
||||
int i; // counting variables
|
||||
const H5std_string write_comment="Foo!"; // Comments for group
|
||||
@@ -100,9 +92,9 @@ static void test_reference_obj()
|
||||
|
||||
// Allocate write & read buffers
|
||||
int temp_size = MAX(sizeof(unsigned),sizeof(hobj_ref_t));
|
||||
wbuf=(hobj_ref_t*)malloc(temp_size*SPACE1_DIM1);
|
||||
rbuf=(hobj_ref_t*)malloc(temp_size*SPACE1_DIM1);
|
||||
tbuf=(hobj_ref_t*)malloc(temp_size*SPACE1_DIM1);
|
||||
wbuf=(hobj_ref_t*)HDmalloc(temp_size*SPACE1_DIM1);
|
||||
rbuf=(hobj_ref_t*)HDmalloc(temp_size*SPACE1_DIM1);
|
||||
tbuf=(hobj_ref_t*)HDmalloc(temp_size*SPACE1_DIM1);
|
||||
|
||||
// Create file FILE1
|
||||
file1 = new H5File (FILE1, H5F_ACC_TRUNC);
|
||||
@@ -190,7 +182,7 @@ static void test_reference_obj()
|
||||
sid1.close();
|
||||
dataset.close();
|
||||
delete file1;
|
||||
|
||||
|
||||
// Re-open the file
|
||||
file1 = new H5File(FILE1, H5F_ACC_RDWR);
|
||||
|
||||
@@ -198,16 +190,16 @@ static void test_reference_obj()
|
||||
dataset = file1->openDataSet("/Dataset3");
|
||||
|
||||
// Read selection from disk
|
||||
dataset.read(rbuf, PredType::STD_REF_OBJ);
|
||||
dataset.read(rbuf, PredType::STD_REF_OBJ);
|
||||
|
||||
// Dereference dataset object by ctor, from the location where
|
||||
// Dereference dataset object by ctor, from the location where
|
||||
// 'dataset' is located
|
||||
DataSet dset2(dataset, &rbuf[0]);
|
||||
|
||||
// Check information in the referenced dataset
|
||||
sid1 = dset2.getSpace();
|
||||
hssize_t n_elements = sid1.getSimpleExtentNpoints();
|
||||
verify_val((long)n_elements, (long)4, "DataSpace::getSimpleExtentNpoints", __LINE__, __FILE__);
|
||||
verify_val((long)n_elements, 4, "DataSpace::getSimpleExtentNpoints", __LINE__, __FILE__);
|
||||
|
||||
// Read from disk
|
||||
dset2.read(tbuf, PredType::NATIVE_UINT);
|
||||
@@ -234,14 +226,14 @@ static void test_reference_obj()
|
||||
verify_val(read_comment2, write_comment, "Group::getComment", __LINE__, __FILE__);
|
||||
group.close();
|
||||
|
||||
// Dereference group object by ctor and using dataset to specify
|
||||
// Dereference group object by ctor and using dataset to specify
|
||||
// location
|
||||
Group new_group(dataset, &rbuf[2]);
|
||||
H5std_string read_comment3 = new_group.getComment(".", 10);
|
||||
verify_val(read_comment3, write_comment, "Group::getComment", __LINE__, __FILE__);
|
||||
group.close();
|
||||
new_group.close();
|
||||
|
||||
// Dereference datatype object from the location where 'dataset'
|
||||
// Dereference datatype object from the location where 'dataset'
|
||||
// is located
|
||||
dtype1.dereference(dataset, &rbuf[3]);
|
||||
|
||||
@@ -270,9 +262,9 @@ static void test_reference_obj()
|
||||
file1->close();
|
||||
|
||||
// Free memory buffers
|
||||
free(wbuf);
|
||||
free(rbuf);
|
||||
free(tbuf);
|
||||
HDfree(wbuf);
|
||||
HDfree(rbuf);
|
||||
HDfree(tbuf);
|
||||
|
||||
PASSED();
|
||||
} // end try
|
||||
@@ -289,7 +281,7 @@ static void test_reference_obj()
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
void test_reference()
|
||||
void test_reference(void)
|
||||
{
|
||||
// Output message about test being performed
|
||||
MESSAGE(5, ("Testing References\n"));
|
||||
@@ -307,7 +299,7 @@ void test_reference()
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
void cleanup_reference()
|
||||
void cleanup_reference(void)
|
||||
{
|
||||
HDremove(FILE1.c_str());
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ static void test_classes()
|
||||
}
|
||||
PASSED();
|
||||
} // end of try block
|
||||
catch (Exception E) {
|
||||
catch (Exception E) {
|
||||
issue_fail_msg("test_classes", __LINE__, __FILE__, E.getCDetailMsg());
|
||||
}
|
||||
}
|
||||
@@ -178,8 +178,8 @@ static void test_copy()
|
||||
another_int_type = new_int_type;
|
||||
|
||||
PASSED();
|
||||
}
|
||||
catch (Exception E) {
|
||||
}
|
||||
catch (Exception E) {
|
||||
issue_fail_msg("test_copy", __LINE__, __FILE__, E.getCDetailMsg());
|
||||
}
|
||||
}
|
||||
@@ -191,12 +191,12 @@ static void test_copy()
|
||||
* Purpose: Tests query functions of compound and enumeration types.
|
||||
*
|
||||
* Return: Success: 0
|
||||
*
|
||||
*
|
||||
* Failure: number of errors
|
||||
*
|
||||
* Programmer: Binh-Minh Ribler (use C version)
|
||||
* January, 2007
|
||||
*
|
||||
*
|
||||
* Modifications:
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
@@ -289,7 +289,7 @@ static void test_query()
|
||||
issue_fail_msg("test_query", __LINE__, __FILE__, E.getCDetailMsg());
|
||||
}
|
||||
} // test_query
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_transient
|
||||
@@ -311,7 +311,7 @@ const char* filename1 = "dtypes1.h5";
|
||||
static void test_transient ()
|
||||
{
|
||||
static hsize_t ds_size[2] = {10, 20};
|
||||
|
||||
|
||||
SUBTEST("Transient datatypes");
|
||||
try {
|
||||
|
||||
@@ -345,7 +345,7 @@ static void test_transient ()
|
||||
} catch (DataTypeIException err) {}
|
||||
itype.close();
|
||||
|
||||
// Get a copy of the dataset's datatype by applying DataType::copy()
|
||||
// Get a copy of the dataset's datatype by applying DataType::copy()
|
||||
// to the dataset. The resulted datatype should be modifiable.
|
||||
itype.copy(dset);
|
||||
itype.setPrecision(256);
|
||||
@@ -393,7 +393,7 @@ static void test_named ()
|
||||
hsize_t i;
|
||||
unsigned attr_data[10][20];
|
||||
char filename[1024];
|
||||
|
||||
|
||||
SUBTEST("Named datatypes");
|
||||
try {
|
||||
// Create the file.
|
||||
@@ -416,7 +416,7 @@ static void test_named ()
|
||||
itype.commit(file, "native-int");
|
||||
|
||||
// Check that it is committed.
|
||||
if (itype.committed() <= 0)
|
||||
if (itype.committed() == false)
|
||||
cerr << "IntType::committed() returned false" << endl;
|
||||
|
||||
// We should not be able to modify a type after it has been committed.
|
||||
@@ -437,7 +437,7 @@ static void test_named ()
|
||||
|
||||
// It should be possible to define an attribute for the named type
|
||||
Attribute attr1 = itype.createAttribute("attr1", PredType::NATIVE_UCHAR, space);
|
||||
for (i=0; i<ds_size[0]*ds_size[1]; i++)
|
||||
for (i=0; i<ds_size[0]*ds_size[1]; i++)
|
||||
attr_data[0][i] = (int)i;/*tricky*/
|
||||
attr1.write(PredType::NATIVE_UINT, attr_data);
|
||||
attr1.close();
|
||||
@@ -454,7 +454,7 @@ static void test_named ()
|
||||
/*
|
||||
* Close the committed type and reopen it. It should return a named type.
|
||||
* This had something to do with the way IntType was returned and assigned
|
||||
and caused itype.committed not working correctly. So, use another_type for
|
||||
and caused itype.committed not working correctly. So, use another_type for
|
||||
now.
|
||||
itype.close();
|
||||
itype = file.openIntType("native-int");
|
||||
@@ -475,7 +475,7 @@ now.
|
||||
dset.close();
|
||||
ds_type->close();
|
||||
|
||||
// Reopen the dataset and its type, then make sure the type is
|
||||
// Reopen the dataset and its type, then make sure the type is
|
||||
// a named type.
|
||||
dset = file.openDataSet("dset1");
|
||||
ds_type = new DataType(dset.getDataType());
|
||||
@@ -497,7 +497,7 @@ now.
|
||||
if (!iscommitted)
|
||||
throw InvalidActionException("DataType::iscommitted()", "Dataset type should be named type!");
|
||||
ds_type->close();
|
||||
|
||||
|
||||
// Get the dataset datatype by applying DataType::copy() to the
|
||||
// dataset. The resulted datatype should be modifiable.
|
||||
IntType copied_type;
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
tvlstr.cpp - HDF5 C++ testing the Variable-Length String functionality
|
||||
|
||||
EXTERNAL ROUTINES/VARIABLES:
|
||||
These routines are in the test directory of the C library:
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
@@ -40,7 +39,7 @@
|
||||
#include "H5Cpp.h" // C++ API header file
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
using namespace H5;
|
||||
using namespace H5;
|
||||
#endif
|
||||
|
||||
#include "h5cpputil.h" // C++ utilility header file
|
||||
@@ -52,47 +51,48 @@ const H5std_string FILENAME("tvlstr.h5");
|
||||
const int SPACE1_RANK = 1;
|
||||
const hsize_t SPACE1_DIM1 = 4;
|
||||
|
||||
// Utility functions
|
||||
// Utility functions - not used now, later though.
|
||||
void *test_vlstr_alloc_custom(size_t size, void *info);
|
||||
void test_vlstr_free_custom(void *mem, void *info);
|
||||
|
||||
/****************************************************************
|
||||
**
|
||||
** test_vlstr_alloc_custom(): Test VL datatype custom memory
|
||||
** allocation routines. This routine just uses malloc to
|
||||
** allocate the memory and increments the amount of memory
|
||||
** allocated. It is passed into setVlenMemManager.
|
||||
** allocation routines. This routine just uses malloc to
|
||||
** allocate the memory and increments the amount of memory
|
||||
** allocated. It is passed into setVlenMemManager.
|
||||
**
|
||||
** Note: exact copy from the C version.
|
||||
**
|
||||
****************************************************************/
|
||||
void *test_vlstr_alloc_custom(size_t size, void *info)
|
||||
{
|
||||
void *ret_value=NULL; // Pointer to return
|
||||
int *mem_used=(int *)info; // Get the pointer to the memory used
|
||||
size_t extra; // Extra space needed
|
||||
void *ret_value=NULL; // Pointer to return
|
||||
size_t *mem_used=(size_t *)info; // Get the pointer to the memory used
|
||||
size_t extra; // Extra space needed
|
||||
|
||||
/*
|
||||
* This weird contortion is required on the DEC Alpha to keep the
|
||||
* alignment correct - QAK
|
||||
*/
|
||||
|
||||
|
||||
extra=MAX(sizeof(void *),sizeof(size_t));
|
||||
|
||||
if((ret_value=HDmalloc(extra+size))!=NULL) {
|
||||
*(size_t *)ret_value=size;
|
||||
*mem_used+=size;
|
||||
*(size_t *)ret_value=size;
|
||||
*mem_used+=size;
|
||||
} // end if
|
||||
ret_value=((unsigned char *)ret_value)+extra;
|
||||
ret_value = ((unsigned char *)ret_value) + extra;
|
||||
|
||||
return(ret_value);
|
||||
}
|
||||
|
||||
/****************************************************************
|
||||
**
|
||||
** test_vlstr_free_custom(): Test VL datatype custom memory
|
||||
** allocation routines. This routine just uses free to
|
||||
** release the memory and decrements the amount of memory
|
||||
** allocated. It is passed into setVlenMemManager.
|
||||
** allocation routines. This routine just uses free to
|
||||
** release the memory and decrements the amount of memory
|
||||
** allocated. It is passed into setVlenMemManager.
|
||||
**
|
||||
** Note: exact copy from the C version.
|
||||
**
|
||||
@@ -100,14 +100,14 @@ void *test_vlstr_alloc_custom(size_t size, void *info)
|
||||
void test_vlstr_free_custom(void *_mem, void *info)
|
||||
{
|
||||
unsigned char *mem;
|
||||
int *mem_used=(int *)info; // Get the pointer to the memory used
|
||||
size_t extra; // Extra space needed
|
||||
size_t *mem_used=(size_t *)info; // Get the pointer to the memory used
|
||||
size_t extra; // Extra space needed
|
||||
|
||||
/*
|
||||
* This weird contortion is required on the DEC Alpha to keep the
|
||||
* alignment correct - QAK
|
||||
*/
|
||||
|
||||
|
||||
extra=MAX(sizeof(void *),sizeof(size_t));
|
||||
|
||||
if(_mem!=NULL) {
|
||||
@@ -118,9 +118,9 @@ void test_vlstr_free_custom(void *_mem, void *info)
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_vlstrings_basic
|
||||
* Function: test_vlstring_dataset
|
||||
*
|
||||
* Purpose: Test simple VL string I/O.
|
||||
* Purpose: Test writing/reading VL strings on datasets.
|
||||
*
|
||||
* Return: None
|
||||
*
|
||||
@@ -129,98 +129,171 @@ void test_vlstr_free_custom(void *_mem, void *info)
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static void test_vlstrings_basic()
|
||||
// String for testing datasets
|
||||
static char *dynstring_ds_write=NULL;
|
||||
static char stastring_ds_write[1]={'A'};
|
||||
|
||||
// Info for a string dataset
|
||||
const H5std_string DSET1_NAME("String_ds");
|
||||
const H5std_string DSET1_DATA("String Dataset");
|
||||
|
||||
static void test_vlstring_dataset()
|
||||
{
|
||||
const char *wdata[SPACE1_DIM1]= {
|
||||
"Four score and seven years ago our forefathers brought forth on this continent a new nation,",
|
||||
"conceived in liberty and dedicated to the proposition that all men are created equal.",
|
||||
"Now we are engaged in a great civil war,",
|
||||
"testing whether that nation or any nation so conceived and so dedicated can long endure."
|
||||
// Output message about test being performed
|
||||
SUBTEST("Testing VL String on Datasets");
|
||||
|
||||
try {
|
||||
// Open the file
|
||||
H5File file1(FILENAME, H5F_ACC_TRUNC);
|
||||
|
||||
// Create a datatype to refer to.
|
||||
StrType vlst(0, H5T_VARIABLE);
|
||||
|
||||
// Open the root group.
|
||||
Group root = file1.openGroup("/");
|
||||
|
||||
// Create dataspace for the dataset.
|
||||
DataSpace ds_space (H5S_SCALAR);
|
||||
|
||||
// Create an dataset in the root group.
|
||||
DataSet dset1 = root.createDataSet(DSET1_NAME, vlst, ds_space);
|
||||
|
||||
// Write data to the dataset.
|
||||
dset1.write(DSET1_DATA, vlst);
|
||||
|
||||
// Read and verify the dataset string as a string of chars.
|
||||
char *string_ds_check;
|
||||
dset1.read(&string_ds_check, vlst);
|
||||
if(HDstrcmp(string_ds_check, DSET1_DATA.c_str())!=0)
|
||||
TestErrPrintf("Line %d: Attribute data different: DSET1_DATA=%s,string_ds_check=%s\n",__LINE__, DSET1_DATA.c_str(), string_ds_check);
|
||||
|
||||
HDfree(string_ds_check); // note: no need for std::string test
|
||||
|
||||
// Read and verify the dataset string as an std::string.
|
||||
H5std_string read_str;
|
||||
dset1.read(read_str, vlst);
|
||||
if (read_str != DSET1_DATA)
|
||||
TestErrPrintf("Line %d: Attribute data different: DSET1_DATA=%s,read_str=%s\n",__LINE__, DSET1_DATA.c_str(), read_str.c_str());
|
||||
|
||||
// Close the dataset.
|
||||
dset1.close();
|
||||
|
||||
// Test scalar type dataset with 1 value.
|
||||
dset1 = root.createDataSet("test_scalar_small", vlst, ds_space);
|
||||
|
||||
dynstring_ds_write = (char*)HDcalloc(1, sizeof(char));
|
||||
HDmemset(dynstring_ds_write, 'A', 1);
|
||||
|
||||
// Write data to the dataset, then read it back.
|
||||
dset1.write(&dynstring_ds_write, vlst);
|
||||
dset1.read(&string_ds_check, vlst);
|
||||
|
||||
// Verify data read.
|
||||
if(HDstrcmp(string_ds_check,dynstring_ds_write)!=0)
|
||||
TestErrPrintf("VL string datasets don't match!, dynstring_ds_write=%s, string_ds_check=%s\n",dynstring_ds_write,string_ds_check);
|
||||
HDfree(string_ds_check);
|
||||
dset1.close();
|
||||
|
||||
// Open dataset DSET1_NAME again.
|
||||
dset1 = root.openDataSet(DSET1_NAME);
|
||||
|
||||
// Close dataset and file
|
||||
dset1.close();
|
||||
file1.close();
|
||||
|
||||
PASSED();
|
||||
} // end try block
|
||||
|
||||
// Catch all exceptions.
|
||||
catch (Exception E) {
|
||||
issue_fail_msg("test_vlstring_dataset()", __LINE__, __FILE__, E.getCDetailMsg());
|
||||
}
|
||||
} // test_vlstring_dataset()
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_vlstring_array_dataset
|
||||
*
|
||||
* Purpose: Test writing/reading VL string array to/from datasets.
|
||||
*
|
||||
* Return: None
|
||||
*
|
||||
* Programmer: Binh-Minh Ribler
|
||||
* July, 2009
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
const H5std_string DSSTRARR_NAME("StringArray_dset");
|
||||
static void test_vlstring_array_dataset()
|
||||
{
|
||||
const char *string_ds_array[SPACE1_DIM1]= {
|
||||
"Line 1", "Line 2", "Line 3", "Line 4"
|
||||
}; // Information to write
|
||||
|
||||
// Output message about test being performed
|
||||
SUBTEST("Testing Basic VL String Functionality");
|
||||
SUBTEST("Testing VL String Array on Datasets");
|
||||
|
||||
H5File* file1 = NULL;
|
||||
H5File* file1;
|
||||
try {
|
||||
// Create file.
|
||||
file1 = new H5File (FILENAME, H5F_ACC_TRUNC);
|
||||
file1 = new H5File (FILENAME, H5F_ACC_RDWR);
|
||||
|
||||
// Create dataspace for datasets.
|
||||
hsize_t dims1[] = {SPACE1_DIM1};
|
||||
DataSpace sid1(SPACE1_RANK, dims1);
|
||||
// Create dataspace for datasets.
|
||||
hsize_t dims1[] = {SPACE1_DIM1};
|
||||
DataSpace ds_space(SPACE1_RANK, dims1);
|
||||
|
||||
// Create a datatype to refer to.
|
||||
StrType tid1(0, H5T_VARIABLE);
|
||||
StrType vlst(0, H5T_VARIABLE);
|
||||
|
||||
// Create and write a dataset.
|
||||
DataSet dataset(file1->createDataSet("Dataset1", tid1, sid1));
|
||||
dataset.write(wdata, tid1);
|
||||
DataSet dataset(file1->createDataSet(DSSTRARR_NAME, vlst, ds_space));
|
||||
dataset.write(string_ds_array, vlst);
|
||||
|
||||
// Read and verify the dataset using strings of chars as buffer.
|
||||
// Note: reading by array of H5std_string doesn't work yet.
|
||||
char *string_ds_check[SPACE1_DIM1];
|
||||
dataset.read(string_ds_check, vlst);
|
||||
|
||||
int ii;
|
||||
for (ii = 0; ii < SPACE1_DIM1; ii++)
|
||||
{
|
||||
if(HDstrcmp(string_ds_check[ii], string_ds_array[ii])!=0)
|
||||
TestErrPrintf("Line %d: Dataset data different: written=%s,read=%s\n",__LINE__, string_ds_array[ii], string_ds_check[ii]);
|
||||
|
||||
HDfree(string_ds_check[ii]);
|
||||
}
|
||||
|
||||
// Close objects that are no longer needed.
|
||||
dataset.close();
|
||||
ds_space.close();
|
||||
|
||||
//
|
||||
// Test with scalar data space.
|
||||
//
|
||||
|
||||
// Create H5S_SCALAR data space.
|
||||
DataSpace scalar_space;
|
||||
|
||||
// Create and write another dataset.
|
||||
DataSet dataset2(file1->createDataSet("Dataset2", tid1, scalar_space));
|
||||
DataSet dataset2(file1->createDataSet("Dataset2", vlst, scalar_space));
|
||||
char *wdata2 = (char*)HDcalloc(65534, sizeof(char));
|
||||
HDmemset(wdata2, 'A', 65533);
|
||||
dataset2.write(&wdata2, tid1);
|
||||
dataset2.write(&wdata2, vlst);
|
||||
|
||||
char *rdata2 = (char*)HDcalloc(65534, sizeof(char));
|
||||
HDmemset(rdata2, 0, 65533);
|
||||
dataset2.read(&rdata2, vlst);
|
||||
if (HDstrcmp(wdata2, rdata2)!=0)
|
||||
TestErrPrintf("Line %d: Dataset data different: written=%s,read=%s\n",__LINE__, wdata2, rdata2);
|
||||
|
||||
// Release resources from second dataset operation.
|
||||
scalar_space.close();
|
||||
dataset2.close();
|
||||
HDfree(wdata2);
|
||||
|
||||
// Change to the custom memory allocation routines for reading
|
||||
// VL string.
|
||||
DSetMemXferPropList xfer;
|
||||
int mem_used = 0; // Memory used during allocation
|
||||
xfer.setVlenMemManager(test_vlstr_alloc_custom, &mem_used, test_vlstr_free_custom, &mem_used);
|
||||
|
||||
// Make certain the correct amount of memory will be used.
|
||||
hsize_t vlsize = dataset.getVlenBufSize(tid1, sid1);
|
||||
|
||||
// Count the actual number of bytes used by the strings.
|
||||
int str_used; // String data in memory
|
||||
hsize_t i; // counting variable
|
||||
for (i=0,str_used=0; i<SPACE1_DIM1; i++)
|
||||
str_used+=HDstrlen(wdata[i])+1;
|
||||
|
||||
// Compare against the strings actually written.
|
||||
verify_val((int)vlsize,str_used,"DataSet::getVlenBufSize", __LINE__, __FILE__);
|
||||
|
||||
// Read dataset from disk.
|
||||
char *rdata[SPACE1_DIM1]; // Data read in
|
||||
dataset.read(rdata, tid1, DataSpace::ALL, DataSpace::ALL, xfer);
|
||||
|
||||
// Make certain the correct amount of memory has been used.
|
||||
verify_val(mem_used, str_used, "DataSet::read", __LINE__, __FILE__);
|
||||
|
||||
// Compare data read in.
|
||||
for (i=0; i<SPACE1_DIM1; i++) {
|
||||
int wlen = HDstrlen(wdata[i]);
|
||||
int rlen = HDstrlen(rdata[i]);
|
||||
if(wlen != rlen) {
|
||||
TestErrPrintf("VL data lengths don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n", (int)i, wlen, (int)i, rlen);
|
||||
continue;
|
||||
} // end if
|
||||
if( HDstrcmp(wdata[i],rdata[i]) != 0 ) {
|
||||
TestErrPrintf("VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n", (int)i, wdata[i], (int)i, rdata[i]);
|
||||
continue;
|
||||
} // end if
|
||||
} // end for
|
||||
|
||||
// Reclaim the read VL data.
|
||||
DataSet::vlenReclaim((void *)rdata, tid1, sid1, xfer);
|
||||
|
||||
// Make certain the VL memory has been freed.
|
||||
verify_val(mem_used, 0, "DataSet::vlenReclaim", __LINE__, __FILE__);
|
||||
HDfree(rdata2);
|
||||
|
||||
// Close objects and file.
|
||||
dataset.close();
|
||||
tid1.close();
|
||||
sid1.close();
|
||||
xfer.close();
|
||||
dataset2.close();
|
||||
vlst.close();
|
||||
file1->close();
|
||||
|
||||
PASSED();
|
||||
@@ -229,16 +302,15 @@ static void test_vlstrings_basic()
|
||||
// Catch all exceptions.
|
||||
catch (Exception E)
|
||||
{
|
||||
issue_fail_msg("test_vlstrings_basic()", __LINE__, __FILE__, E.getCDetailMsg());
|
||||
if (file1 != NULL) // clean up
|
||||
delete file1;
|
||||
issue_fail_msg("test_vlstring_array_dataset()", __LINE__, __FILE__, E.getCDetailMsg());
|
||||
delete file1;
|
||||
}
|
||||
} // end test_vlstrings_basic()
|
||||
} // end test_vlstring_array_dataset()
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_vlstrings_special
|
||||
*
|
||||
* Purpose: Test VL string code for special string cases, nil and
|
||||
* Purpose: Test VL string code for special string cases, nil and
|
||||
* zero-sized.
|
||||
*
|
||||
* Return: None
|
||||
@@ -266,71 +338,71 @@ static void test_vlstrings_special()
|
||||
DataSpace sid1(SPACE1_RANK, dims1);
|
||||
|
||||
// Create a datatype to refer to.
|
||||
StrType tid1(0, H5T_VARIABLE);
|
||||
StrType vlst(0, H5T_VARIABLE);
|
||||
|
||||
// Create a dataset.
|
||||
DataSet dataset(file1.createDataSet("Dataset3", tid1, sid1));
|
||||
DataSet dataset(file1.createDataSet("Dataset3", vlst, sid1));
|
||||
|
||||
// Read from the dataset before writing data.
|
||||
dataset.read(rdata, tid1);
|
||||
dataset.read(rdata, vlst);
|
||||
|
||||
// Check data read in.
|
||||
hsize_t i; // counting variable
|
||||
for (i=0; i<SPACE1_DIM1; i++)
|
||||
if(rdata[i] != NULL)
|
||||
if(rdata[i]!=NULL)
|
||||
TestErrPrintf("VL doesn't match!, rdata[%d]=%p\n",(int)i,rdata[i]);
|
||||
|
||||
// Write dataset to disk, then read it back.
|
||||
dataset.write(wdata, tid1);
|
||||
dataset.read(rdata, tid1);
|
||||
dataset.write(wdata, vlst);
|
||||
dataset.read(rdata, vlst);
|
||||
|
||||
// Compare data read in.
|
||||
for (i=0; i<SPACE1_DIM1; i++) {
|
||||
int wlen = HDstrlen(wdata[i]);
|
||||
int rlen = HDstrlen(rdata[i]);
|
||||
for (i = 0; i < SPACE1_DIM1; i++) {
|
||||
size_t wlen = HDstrlen(wdata[i]);
|
||||
size_t rlen = HDstrlen(rdata[i]);
|
||||
if(wlen != rlen) {
|
||||
TestErrPrintf("VL data lengths don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n", (int)i, wlen, (int)i, rlen);
|
||||
TestErrPrintf("VL data lengths don't match!, strlen(wdata[%d])=%u, strlen(rdata[%d])=%u\n", (int)i, (unsigned)wlen, (int)i, (unsigned)rlen);
|
||||
continue;
|
||||
} // end if
|
||||
if( HDstrcmp(wdata[i],rdata[i]) != 0 ) {
|
||||
if(HDstrcmp(wdata[i],rdata[i]) != 0) {
|
||||
TestErrPrintf("VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n", (int)i, wdata[i], (int)i, rdata[i]);
|
||||
continue;
|
||||
} // end if
|
||||
} // end for
|
||||
|
||||
// Reclaim the read VL data.
|
||||
DataSet::vlenReclaim((void *)rdata, tid1, sid1);
|
||||
DataSet::vlenReclaim((void *)rdata, vlst, sid1);
|
||||
|
||||
// Close Dataset.
|
||||
dataset.close();
|
||||
|
||||
/*
|
||||
/*
|
||||
* Create another dataset to test nil strings.
|
||||
*/
|
||||
|
||||
// Create the property list and set the fill value for the second
|
||||
// Create the property list and set the fill value for the second
|
||||
// dataset.
|
||||
DSetCreatPropList dcpl;
|
||||
char *fill = NULL; // Fill value
|
||||
dcpl.setFillValue(tid1, &fill);
|
||||
dataset = file1.createDataSet("Dataset4", tid1, sid1, dcpl);
|
||||
dcpl.setFillValue(vlst, &fill);
|
||||
dataset = file1.createDataSet("Dataset4", vlst, sid1, dcpl);
|
||||
|
||||
// Close dataset creation property list.
|
||||
dcpl.close();
|
||||
|
||||
// Read from dataset before writing data.
|
||||
dataset.read(rdata, tid1);
|
||||
dataset.read(rdata, vlst);
|
||||
|
||||
// Check data read in.
|
||||
for (i=0; i<SPACE1_DIM1; i++)
|
||||
if(rdata[i] != NULL)
|
||||
TestErrPrintf("VL doesn't match!, rdata[%d]=%p\n",(int)i, rdata[i]);
|
||||
if(rdata[i]!=NULL)
|
||||
TestErrPrintf("VL doesn't match!, rdata[%d]=%p\n",(int)i,rdata[i]);
|
||||
|
||||
// Try to write nil strings to disk.
|
||||
dataset.write(wdata2, tid1);
|
||||
dataset.write(wdata2, vlst);
|
||||
|
||||
// Read nil strings back from disk.
|
||||
dataset.read(rdata, tid1);
|
||||
dataset.read(rdata, vlst);
|
||||
|
||||
// Check data read in.
|
||||
for (i=0; i<SPACE1_DIM1; i++)
|
||||
@@ -339,7 +411,7 @@ static void test_vlstrings_special()
|
||||
|
||||
// Close objects and file.
|
||||
dataset.close();
|
||||
tid1.close();
|
||||
vlst.close();
|
||||
sid1.close();
|
||||
file1.close();
|
||||
|
||||
@@ -349,7 +421,7 @@ static void test_vlstrings_special()
|
||||
// Catch all exceptions.
|
||||
catch (Exception E)
|
||||
{
|
||||
issue_fail_msg(E.getCFuncName(), __LINE__, __FILE__, E.getCDetailMsg());
|
||||
issue_fail_msg("test_vlstrings_special()", __LINE__, __FILE__, E.getCDetailMsg());
|
||||
}
|
||||
} // test_vlstrings_special
|
||||
|
||||
@@ -369,7 +441,7 @@ const H5std_string VLSTR_TYPE("vl_string_type");
|
||||
static void test_vlstring_type()
|
||||
{
|
||||
// Output message about test being performed.
|
||||
SUBTEST("Testing VL String type");
|
||||
SUBTEST("Testing VL String Type");
|
||||
|
||||
H5File* file1 = NULL;
|
||||
try {
|
||||
@@ -377,55 +449,55 @@ static void test_vlstring_type()
|
||||
file1 = new H5File(FILENAME, H5F_ACC_RDWR);
|
||||
|
||||
// Create a datatype to refer to.
|
||||
StrType vlstr_type(PredType::C_S1);
|
||||
StrType vlst(PredType::C_S1);
|
||||
|
||||
// Change padding and verify it.
|
||||
vlstr_type.setStrpad(H5T_STR_NULLPAD);
|
||||
H5T_str_t pad = vlstr_type.getStrpad();
|
||||
vlst.setStrpad(H5T_STR_NULLPAD);
|
||||
H5T_str_t pad = vlst.getStrpad();
|
||||
verify_val(pad, H5T_STR_NULLPAD, "StrType::getStrpad", __LINE__, __FILE__);
|
||||
|
||||
// Convert to variable-length string.
|
||||
vlstr_type.setSize(H5T_VARIABLE);
|
||||
vlst.setSize(H5T_VARIABLE);
|
||||
|
||||
// Check if datatype is VL string.
|
||||
H5T_class_t type_class = vlstr_type.getClass();
|
||||
H5T_class_t type_class = vlst.getClass();
|
||||
verify_val(type_class, H5T_STRING, "DataType::getClass", __LINE__, __FILE__);
|
||||
bool is_variable_str = vlstr_type.isVariableStr();
|
||||
verify_val(is_variable_str, TRUE, "DataType::isVariableStr", __LINE__, __FILE__);
|
||||
bool is_variable_str = vlst.isVariableStr();
|
||||
verify_val(is_variable_str, true, "DataType::isVariableStr", __LINE__, __FILE__);
|
||||
|
||||
// Check default character set and padding.
|
||||
H5T_cset_t cset = vlstr_type.getCset();
|
||||
H5T_cset_t cset = vlst.getCset();
|
||||
verify_val(cset, H5T_CSET_ASCII, "StrType::getCset", __LINE__, __FILE__);
|
||||
pad = vlstr_type.getStrpad();
|
||||
pad = vlst.getStrpad();
|
||||
verify_val(pad, H5T_STR_NULLPAD, "StrType::getStrpad", __LINE__, __FILE__);
|
||||
|
||||
// Commit variable-length string datatype to storage.
|
||||
vlstr_type.commit(*file1, VLSTR_TYPE);
|
||||
vlst.commit(*file1, VLSTR_TYPE);
|
||||
|
||||
// Close datatype.
|
||||
vlstr_type.close();
|
||||
vlst.close();
|
||||
|
||||
// Try opening datatype again.
|
||||
vlstr_type = file1->openStrType(VLSTR_TYPE);
|
||||
vlst = file1->openStrType(VLSTR_TYPE);
|
||||
|
||||
// Close datatype and file.
|
||||
vlstr_type.close();
|
||||
vlst.close();
|
||||
file1->close();
|
||||
|
||||
// Open file.
|
||||
file1 = new H5File(FILENAME, H5F_ACC_RDWR);
|
||||
|
||||
// Open the variable-length string datatype just created
|
||||
vlstr_type.setId((file1->openStrType(VLSTR_TYPE)).getId());
|
||||
vlst = file1->openStrType(VLSTR_TYPE);
|
||||
|
||||
// Verify character set and padding
|
||||
cset = vlstr_type.getCset();
|
||||
cset = vlst.getCset();
|
||||
verify_val(cset, H5T_CSET_ASCII, "StrType::getCset", __LINE__, __FILE__);
|
||||
pad = vlstr_type.getStrpad();
|
||||
pad = vlst.getStrpad();
|
||||
verify_val(pad, H5T_STR_NULLPAD, "StrType::getStrpad", __LINE__, __FILE__);
|
||||
|
||||
// Close datatype and file
|
||||
vlstr_type.close();
|
||||
vlst.close();
|
||||
file1->close();
|
||||
|
||||
PASSED();
|
||||
@@ -435,6 +507,7 @@ static void test_vlstring_type()
|
||||
catch (Exception E)
|
||||
{
|
||||
issue_fail_msg("test_vlstring_type()", __LINE__, __FILE__, E.getCDetailMsg());
|
||||
delete file1;
|
||||
}
|
||||
} // end test_vlstring_type()
|
||||
|
||||
@@ -453,7 +526,7 @@ static void test_vlstring_type()
|
||||
static void test_compact_vlstring()
|
||||
{
|
||||
// Output message about test being performed
|
||||
SUBTEST("Testing VL Strings in compact dataset");
|
||||
SUBTEST("Testing VL Strings on Compact Dataset");
|
||||
|
||||
try {
|
||||
// Create file
|
||||
@@ -464,22 +537,22 @@ static void test_compact_vlstring()
|
||||
DataSpace sid1(SPACE1_RANK, dims1);
|
||||
|
||||
// Create a datatype to refer to
|
||||
StrType tid1(0, H5T_VARIABLE);
|
||||
StrType vlst(0, H5T_VARIABLE);
|
||||
|
||||
// Create dataset create property list and set layout
|
||||
DSetCreatPropList plist;
|
||||
plist.setLayout(H5D_COMPACT);
|
||||
|
||||
// Create a dataset
|
||||
DataSet dataset(file1.createDataSet("Dataset5", tid1, sid1, plist));
|
||||
DataSet dataset(file1.createDataSet("Dataset5", vlst, sid1, plist));
|
||||
|
||||
// Write dataset to disk
|
||||
const char *wdata[SPACE1_DIM1] = {"one", "two", "three", "four"};
|
||||
dataset.write(wdata, tid1);
|
||||
dataset.write(wdata, vlst);
|
||||
|
||||
// Read dataset from disk
|
||||
char *rdata[SPACE1_DIM1]; // Information read in
|
||||
dataset.read(rdata, tid1);
|
||||
dataset.read(rdata, vlst);
|
||||
|
||||
// Compare data read in
|
||||
hsize_t i;
|
||||
@@ -495,11 +568,11 @@ static void test_compact_vlstring()
|
||||
} // end for
|
||||
|
||||
// Reclaim the read VL data
|
||||
DataSet::vlenReclaim((void *)rdata, tid1, sid1);
|
||||
DataSet::vlenReclaim((void *)rdata, vlst, sid1);
|
||||
|
||||
// Close objects and file
|
||||
dataset.close();
|
||||
tid1.close();
|
||||
vlst.close();
|
||||
sid1.close();
|
||||
plist.close();
|
||||
file1.close();
|
||||
@@ -515,9 +588,9 @@ static void test_compact_vlstring()
|
||||
} // test_compact_vlstrings
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_write_vl_string_attribute
|
||||
* Function: test_vlstring_attribute
|
||||
*
|
||||
* Purpose: Test writing VL strings as attributes.
|
||||
* Purpose: Test writing/reading VL strings on attributes.
|
||||
*
|
||||
* Return: None
|
||||
*
|
||||
@@ -526,25 +599,24 @@ static void test_compact_vlstring()
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
// String for testing attributes
|
||||
static const char *string_att = "This is the string for the attribute";
|
||||
// String for writing to attribute
|
||||
static char *string_att_write=NULL;
|
||||
|
||||
// Info for a string attribute
|
||||
const H5std_string ATTRSTR_NAME("String_attr");
|
||||
const H5std_string ATTRSTR_DATA("String Attribute");
|
||||
|
||||
static void test_write_vl_string_attribute()
|
||||
static void test_vlstring_attribute()
|
||||
{
|
||||
// Output message about test being performed
|
||||
SUBTEST("Testing writing VL String as attributes");
|
||||
SUBTEST("Testing VL String on Attributes");
|
||||
|
||||
try {
|
||||
// Open the file
|
||||
H5File file1(FILENAME, H5F_ACC_RDWR);
|
||||
|
||||
// Create a datatype to refer to.
|
||||
StrType tid1(0, H5T_VARIABLE);
|
||||
StrType vlst(0, H5T_VARIABLE);
|
||||
|
||||
// Open the root group.
|
||||
Group root = file1.openGroup("/");
|
||||
@@ -553,14 +625,14 @@ static void test_write_vl_string_attribute()
|
||||
DataSpace att_space (H5S_SCALAR);
|
||||
|
||||
// Create an attribute for the root group.
|
||||
Attribute gr_attr = root.createAttribute(ATTRSTR_NAME, tid1, att_space);
|
||||
Attribute gr_attr = root.createAttribute(ATTRSTR_NAME, vlst, att_space);
|
||||
|
||||
// Write data to the attribute.
|
||||
gr_attr.write(tid1, ATTRSTR_DATA);
|
||||
gr_attr.write(vlst, ATTRSTR_DATA);
|
||||
|
||||
// Read and verify the attribute string as a string of chars.
|
||||
char *string_att_check;
|
||||
gr_attr.read(tid1, &string_att_check);
|
||||
gr_attr.read(vlst, &string_att_check);
|
||||
if(HDstrcmp(string_att_check, ATTRSTR_DATA.c_str())!=0)
|
||||
TestErrPrintf("Line %d: Attribute data different: ATTRSTR_DATA=%s,string_att_check=%s\n",__LINE__, ATTRSTR_DATA.c_str(), string_att_check);
|
||||
|
||||
@@ -568,7 +640,7 @@ static void test_write_vl_string_attribute()
|
||||
|
||||
// Read and verify the attribute string as an std::string.
|
||||
H5std_string read_str;
|
||||
gr_attr.read(tid1, read_str);
|
||||
gr_attr.read(vlst, read_str);
|
||||
if (read_str != ATTRSTR_DATA)
|
||||
TestErrPrintf("Line %d: Attribute data different: ATTRSTR_DATA=%s,read_str=%s\n",__LINE__, ATTRSTR_DATA.c_str(), read_str.c_str());
|
||||
|
||||
@@ -576,28 +648,22 @@ static void test_write_vl_string_attribute()
|
||||
gr_attr.close();
|
||||
|
||||
// Test creating a "large" sized string attribute
|
||||
gr_attr = root.createAttribute("test_scalar_large", tid1, att_space);
|
||||
gr_attr = root.createAttribute("test_scalar_large", vlst, att_space);
|
||||
|
||||
string_att_write = (char*)HDcalloc(8192, sizeof(char));
|
||||
HDmemset(string_att_write, 'A', 8191);
|
||||
|
||||
// Write data to the attribute, then read it back.
|
||||
gr_attr.write(tid1, &string_att_write);
|
||||
gr_attr.read(tid1, &string_att_check);
|
||||
gr_attr.write(vlst, &string_att_write);
|
||||
gr_attr.read(vlst, &string_att_check);
|
||||
|
||||
// Verify data read.
|
||||
if(HDstrcmp(string_att_check,string_att_write)!=0)
|
||||
TestErrPrintf("VL string attributes don't match!, string_att_write=%s, string_att_check=%s\n",string_att_write,string_att_check);
|
||||
|
||||
// Release resources.
|
||||
HDfree(string_att_check);
|
||||
gr_attr.close();
|
||||
|
||||
// Open attribute ATTRSTR_NAME again.
|
||||
gr_attr = root.openAttribute(ATTRSTR_NAME);
|
||||
|
||||
// The attribute string written is freed below, in the
|
||||
// test_read_vl_string_attribute() test
|
||||
|
||||
// Close attribute and file
|
||||
HDfree(string_att_write);
|
||||
gr_attr.close();
|
||||
file1.close();
|
||||
|
||||
@@ -606,9 +672,9 @@ static void test_write_vl_string_attribute()
|
||||
|
||||
// Catch all exceptions.
|
||||
catch (Exception E) {
|
||||
issue_fail_msg("test_string_attr()", __LINE__, __FILE__, E.getCDetailMsg());
|
||||
issue_fail_msg("test_vlstring_attribute()", __LINE__, __FILE__, E.getCDetailMsg());
|
||||
}
|
||||
} // test_string_attr()
|
||||
} // test_vlstring_attribute()
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_read_vl_string_attribute
|
||||
@@ -633,7 +699,7 @@ static void test_read_vl_string_attribute()
|
||||
H5File file1(FILENAME, H5F_ACC_RDONLY);
|
||||
|
||||
// Create a datatype to refer to.
|
||||
StrType tid1(0, H5T_VARIABLE);
|
||||
StrType vlst(0, H5T_VARIABLE);
|
||||
|
||||
// Open the root group and its attribute named ATTRSTR_NAME.
|
||||
Group root = file1.openGroup("/");
|
||||
@@ -641,7 +707,7 @@ static void test_read_vl_string_attribute()
|
||||
|
||||
// Test reading "normal" sized string attribute
|
||||
char *string_att_check;
|
||||
att.read(tid1, &string_att_check);
|
||||
att.read(vlst, &string_att_check);
|
||||
if(HDstrcmp(string_att_check,ATTRSTR_DATA.c_str())!=0)
|
||||
TestErrPrintf("VL string attributes don't match!, string_att=%s, string_att_check=%s\n",ATTRSTR_DATA.c_str(),string_att_check);
|
||||
HDfree(string_att_check);
|
||||
@@ -649,7 +715,7 @@ static void test_read_vl_string_attribute()
|
||||
|
||||
// Test reading "large" sized string attribute
|
||||
att = root.openAttribute("test_scalar_large");
|
||||
att.read(tid1, &string_att_check);
|
||||
att.read(vlst, &string_att_check);
|
||||
if(HDstrcmp(string_att_check,string_att_write)!=0)
|
||||
TestErrPrintf("VL string attributes don't match!, string_att_write=%s, string_att_check=%s\n",string_att_write,string_att_check);
|
||||
HDfree(string_att_check);
|
||||
@@ -657,7 +723,7 @@ static void test_read_vl_string_attribute()
|
||||
|
||||
// Close objects and file.
|
||||
att.close();
|
||||
tid1.close();
|
||||
vlst.close();
|
||||
root.close();
|
||||
file1.close();
|
||||
|
||||
@@ -670,8 +736,78 @@ static void test_read_vl_string_attribute()
|
||||
}
|
||||
} // test_read_vl_string_attribute
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_vlstring_array_attribute
|
||||
*
|
||||
* Purpose: Test writing/reading VL string array to/from attributes.
|
||||
*
|
||||
* Return: None
|
||||
*
|
||||
* Programmer: Binh-Minh Ribler
|
||||
* July, 2009
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
const H5std_string ATTRSTRARR_NAME("StringArray_attr");
|
||||
|
||||
static void test_vlstring_array_attribute()
|
||||
{
|
||||
const char *string_att_array[SPACE1_DIM1]= {
|
||||
"Line 1", "Line 2", "Line 3", "Line 4"
|
||||
}; // Information to write
|
||||
|
||||
// Output message about test being performed
|
||||
SUBTEST("Testing VL String Array on Attributes");
|
||||
|
||||
try {
|
||||
// Open the file
|
||||
H5File file1(FILENAME, H5F_ACC_RDWR);
|
||||
|
||||
// Create a datatype to refer to.
|
||||
StrType vlst(0, H5T_VARIABLE);
|
||||
|
||||
// Open the root group.
|
||||
Group root = file1.openGroup("/");
|
||||
|
||||
// Create dataspace for datasets.
|
||||
hsize_t dims1[] = {SPACE1_DIM1};
|
||||
DataSpace att_space(SPACE1_RANK, dims1);
|
||||
|
||||
// Create an attribute for the root group.
|
||||
Attribute gr_attr = root.createAttribute(ATTRSTRARR_NAME, vlst, att_space);
|
||||
|
||||
// Write data to the attribute.
|
||||
gr_attr.write(vlst, string_att_array);
|
||||
|
||||
// Read and verify the attribute string as a string of chars.
|
||||
// Note: reading by array of H5std_string doesn't work yet.
|
||||
char *string_att_check[SPACE1_DIM1];
|
||||
gr_attr.read(vlst, &string_att_check);
|
||||
|
||||
int ii;
|
||||
for (ii = 0; ii < SPACE1_DIM1; ii++)
|
||||
{
|
||||
if(HDstrcmp(string_att_check[ii], string_att_array[ii])!=0)
|
||||
TestErrPrintf("Line %d: Attribute data different: written=%s,read=%s\n",__LINE__, string_att_check[ii], string_att_check[ii]);
|
||||
|
||||
HDfree(string_att_check[ii]); // note: no need for std::string test
|
||||
}
|
||||
|
||||
// Close group's attribute.
|
||||
gr_attr.close();
|
||||
file1.close();
|
||||
|
||||
PASSED();
|
||||
} // end try block
|
||||
|
||||
// Catch all exceptions.
|
||||
catch (Exception E) {
|
||||
issue_fail_msg("test_vlstring_array_attribute()", __LINE__, __FILE__, E.getCDetailMsg());
|
||||
}
|
||||
} // test_vlstring_array_attribute()
|
||||
|
||||
/* Helper routine for test_vl_rewrite() */
|
||||
static void write_scalar_dset(H5File& file, DataType& type, DataSpace& space,
|
||||
static void write_scalar_dset(H5File& file, DataType& type, DataSpace& space,
|
||||
char *name, char *data)
|
||||
{
|
||||
DataSet dset;
|
||||
@@ -689,7 +825,7 @@ static void write_scalar_dset(H5File& file, DataType& type, DataSpace& space,
|
||||
}
|
||||
|
||||
/* Helper routine for test_vl_rewrite() */
|
||||
static void read_scalar_dset(H5File& file, DataType& type, DataSpace& space,
|
||||
static void read_scalar_dset(H5File& file, DataType& type, DataSpace& space,
|
||||
char *name, char *data)
|
||||
{
|
||||
char *data_read;
|
||||
@@ -814,14 +950,17 @@ void test_vlstrings()
|
||||
|
||||
// These tests use the same file
|
||||
// Test basic VL string datatype
|
||||
test_vlstrings_basic();
|
||||
test_vlstring_dataset();
|
||||
test_vlstrings_special();
|
||||
test_vlstring_type();
|
||||
test_compact_vlstring();
|
||||
|
||||
// Test using VL strings in attributes
|
||||
test_write_vl_string_attribute();
|
||||
test_read_vl_string_attribute();
|
||||
test_vlstring_attribute();
|
||||
|
||||
// Test using VL string array in attributes and datasets
|
||||
test_vlstring_array_attribute();
|
||||
test_vlstring_array_dataset();
|
||||
|
||||
// Test writing VL datasets in files with lots of unlinking
|
||||
test_vl_rewrite();
|
||||
|
||||
@@ -72,7 +72,7 @@ fi
|
||||
# `-pg'). This may or may not include debugging
|
||||
# or production flags.
|
||||
#
|
||||
# CFLAGS Flags can be added to this variable which
|
||||
# H5_CFLAGS Flags can be added to this variable which
|
||||
# might already be partially initialized. These
|
||||
# flags will always be passed to the compiler
|
||||
# and should include switches to turn on full
|
||||
@@ -81,16 +81,14 @@ fi
|
||||
# practices resulting in few if any
|
||||
# warnings.
|
||||
#
|
||||
# Warning flags do not have to be added to CFLAGS
|
||||
# Warning flags do not have to be added to H5_CFLAGS
|
||||
# variable if the compiler is the GNU gcc
|
||||
# compiler or a descendent of gcc such as EGCS or PGCC.
|
||||
#
|
||||
# The CFLAGS should contains *something* or else
|
||||
# configure will probably add `-g'. For most
|
||||
# systems this isn't a problem but some systems
|
||||
# will disable optimizations in favor of the
|
||||
# `-g'.
|
||||
#
|
||||
# AM_CFLAGS Flags added directly into this variable will
|
||||
# be propogated to the compiler wrapper scripts (h5cc,
|
||||
# h5c++, et cetera) in addition to being used to compile
|
||||
# the library.
|
||||
#
|
||||
# These flags should be set according to the compiler being used.
|
||||
# There are two ways to check the compiler. You can try using `-v' or
|
||||
@@ -101,7 +99,7 @@ fi
|
||||
|
||||
case $CC_BASENAME in
|
||||
gcc)
|
||||
CFLAGS="$CFLAGS -Wsign-compare" #Only works for some versions
|
||||
H5_CFLAGS="$H5_CFLAGS -Wsign-compare" #Only works for some versions
|
||||
DEBUG_CFLAGS="-g -fverbose-asm"
|
||||
DEBUG_CPPFLAGS=
|
||||
PROD_CFLAGS="-O3 -fomit-frame-pointer"
|
||||
@@ -111,7 +109,7 @@ case $CC_BASENAME in
|
||||
;;
|
||||
|
||||
*)
|
||||
CFLAGS="$CFLAGS -ansi"
|
||||
H5_CFLAGS="$H5_CFLAGS -ansi"
|
||||
DEBUG_CFLAGS="-g"
|
||||
DEBUG_CPPFLAGS=
|
||||
PROD_CFLAGS="-O"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
Copyright by The HDF Group (THG) and
|
||||
Copyright by The HDF Group and
|
||||
The Board of Trustees of the University of Illinois.
|
||||
All rights reserved.
|
||||
|
||||
|
||||
70
config/apple
70
config/apple
@@ -28,54 +28,30 @@ fi
|
||||
|
||||
# Figure out compiler flags
|
||||
. $srcdir/config/gnu-flags
|
||||
|
||||
# The default Fortran 90 compiler
|
||||
|
||||
. $srcdir/config/intel-flags
|
||||
if test "X-" = "X-$FC"; then
|
||||
# Assume Absoft compiler
|
||||
FC=xlf
|
||||
FC_BASENAME=xlf
|
||||
else
|
||||
case $CC_BASENAME in
|
||||
gcc*)
|
||||
FC=gfortran
|
||||
FC_BASENAME=gfortran
|
||||
;;
|
||||
icc*)
|
||||
FC=ifort
|
||||
FC_BASENAME=ifort
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
# Figure out compiler flags
|
||||
. $srcdir/config/gnu-fflags
|
||||
|
||||
. $srcdir/config/intel-fflags
|
||||
|
||||
# Neither xlf nor f95 have a working "version" command.
|
||||
# If FC is set, try to guess which one is being used by examining
|
||||
# the last element in the path to the compiler.
|
||||
|
||||
TEMP_BASENAME=`basename $FC`
|
||||
if test "xlf" = "${TEMP_BASENAME}"; then
|
||||
FC_BASENAME=xlf
|
||||
else
|
||||
FC_BASENAME=f95
|
||||
fi
|
||||
# Fortran doesn't work with shared libraries
|
||||
#
|
||||
if test "X-" != "X-$enable_fortran"; then
|
||||
echo ' Warning: shared libraries are not supported with Fortran'
|
||||
echo ' Disabling shared libraries'
|
||||
enable_shared="no"
|
||||
fi
|
||||
|
||||
case $FC_BASENAME in
|
||||
xlf)
|
||||
F9XSUFFIXFLAG="-qsuffix=f=f90 -qfree=f90"
|
||||
FCFLAGS="$FCFLAGS ${F9XSUFFIXFLAG}"
|
||||
H5_FCFLAGS="$H5_FCFLAGS -qmoddir=./ "
|
||||
FSEARCH_DIRS="-I./ -I../src"
|
||||
DEBUG_FCFLAGS="-g"
|
||||
PROD_FCFLAGS="-O"
|
||||
PROFILE_FCFLAGS="-g"
|
||||
f9x_flags_set=yes
|
||||
;;
|
||||
|
||||
f95)
|
||||
|
||||
F9XSUFFIXFLAG=""
|
||||
# We force compiler to use upper case for external names
|
||||
# (just in case since this should be a default EIP)
|
||||
H5_FCFLAGS="$H5_FCFLAGS"
|
||||
FSEARCH_DIRS=""
|
||||
DEBUG_FCFLAGS="-g"
|
||||
PROD_FCFLAGS="-O"
|
||||
PROFILE_FCFLAGS="-g -pg"
|
||||
f9x_flags_set=yes
|
||||
|
||||
# f95 doesn't support shared libraries
|
||||
echo ' warning: shared libraries are not supported for f95!'
|
||||
echo ' disabling shared libraries'
|
||||
enable_shared="no"
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
RM=rm -f
|
||||
CP=cp
|
||||
|
||||
# Hardcode SHELL to be /bin/sh. Most machines have this shell, and
|
||||
# on at least one machine configure fails to detect its existence (janus).
|
||||
# Also, when HDF5 is configured on one machine but run on another,
|
||||
# configure's automatic SHELL detection may not work on the build machine.
|
||||
SHELL=/bin/sh
|
||||
|
||||
# Some machines need a command to run executables; this is that command
|
||||
# so that our tests will run.
|
||||
# We use RUNTESTS instead of RUNSERIAL directly because it may be that
|
||||
@@ -49,7 +43,6 @@ LIBH5F_HL=$(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
|
||||
LIBH5CPP_HL=$(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
|
||||
|
||||
# Install directories that automake doesn't know about
|
||||
includedir = $(exec_prefix)/include
|
||||
docdir = $(exec_prefix)/doc
|
||||
|
||||
# Scripts used to build examples
|
||||
@@ -62,13 +55,15 @@ H5FC_PP=$(bindir)/h5pfc
|
||||
H5CPP=$(bindir)/h5c++
|
||||
|
||||
|
||||
# H5_CFLAGS holds flags that should be used as CFLAGS when building hdf5,
|
||||
# but which shouldn't be exported to h5cc for building other programs.
|
||||
# H5_CFLAGS holds flags that should be used when building hdf5,
|
||||
# but which should not be exported to h5cc for building other programs.
|
||||
# AM_CFLAGS is an automake construct which should be used by Makefiles
|
||||
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
|
||||
|
||||
CFLAGS=@CFLAGS@ @H5_CFLAGS@
|
||||
CPPFLAGS=@CPPFLAGS@ @H5_CPPFLAGS@
|
||||
FCFLAGS=@FCFLAGS@ @H5_FCFLAGS@
|
||||
CXXFLAGS=@CXXFLAGS@ @H5_CXXFLAGS@
|
||||
AM_CFLAGS=@AM_CFLAGS@ @H5_CFLAGS@
|
||||
AM_FCFLAGS=@AM_FCFLAGS@ @H5_FCFLAGS@
|
||||
AM_CXXFLAGS=@AM_CXXFLAGS@ @H5_CXXFLAGS@
|
||||
AM_CPPFLAGS=@AM_CPPFLAGS@ @H5_CPPFLAGS@
|
||||
|
||||
# The trace script; this is used on source files from the C library to
|
||||
# insert tracing macros.
|
||||
|
||||
@@ -122,10 +122,10 @@ $(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
|
||||
echo "No need to test $${tname} again."; \
|
||||
else \
|
||||
echo "============================" > $${log}; \
|
||||
if test "X$(HDF_FORTRAN)" = "Xyes"; then \
|
||||
if test "X$(FORTRAN_API)" = "Xyes"; then \
|
||||
echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
|
||||
echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
|
||||
elif test "X$(HDF_CXX)" = "Xyes"; then \
|
||||
elif test "X$(CXX_API)" = "Xyes"; then \
|
||||
echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
|
||||
echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\
|
||||
else \
|
||||
@@ -161,10 +161,10 @@ $(TEST_SCRIPT_CHKSH) $(TEST_SCRIPT_PARA_CHKSH) dummysh.chkexe_:
|
||||
echo "No need to test $${tname} again."; \
|
||||
else \
|
||||
echo "============================" > $${log}; \
|
||||
if test "X$(HDF_FORTRAN)" = "Xyes"; then \
|
||||
if test "X$(FORTRAN_API)" = "Xyes"; then \
|
||||
echo "Fortran API: Testing $${tname} $(TEST_FLAGS)"; \
|
||||
echo "Fortran API: $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
|
||||
elif test "X$(HDF_CXX)" = "Xyes"; then \
|
||||
elif test "X$(CXX_API)" = "Xyes"; then \
|
||||
echo "C++ API: Testing $${tname} $(TEST_FLAGS)"; \
|
||||
echo "C++ API: $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
|
||||
else \
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
# Disabling Dependency Tracking
|
||||
# ---------------------
|
||||
#
|
||||
# The Cray X1 machines that THG tests on seem to have trouble doing
|
||||
# The Cray X1 machines that The HDF Group tests on seem to have trouble doing
|
||||
# dependency tracking (probably because they use Cray's C++ compiler,
|
||||
# which autoconf may not recognize). Until this is fixed by autoconf
|
||||
# or a user complains, disable dependency tracking on Crays.
|
||||
@@ -68,25 +68,23 @@ RANLIB=:
|
||||
# `-pg'). This may or may not include debugging
|
||||
# or production flags.
|
||||
#
|
||||
# CFLAGS Flags can be added to this variable which
|
||||
# might already be partially initialized. These
|
||||
# flags will always be passed to the compiler
|
||||
# and should include switches to turn on full
|
||||
# warnings. HDF5 attempts to be ANSI and Posix
|
||||
# compliant and employ good programming
|
||||
# practices resulting in few if any
|
||||
# warnings.
|
||||
# H5_CFLAGS Flags can be added to this variable which
|
||||
# might already be partially initialized. These
|
||||
# flags will always be passed to the compiler
|
||||
# and should include switches to turn on full
|
||||
# warnings. HDF5 attempts to be ANSI and Posix
|
||||
# compliant and employ good programming
|
||||
# practices resulting in few if any
|
||||
# warnings.
|
||||
#
|
||||
# Warning flags do not have to be added to CFLAGS
|
||||
# variable if the compiler is the GNU gcc
|
||||
# compiler or a descendent of gcc such as EGCS or PGCC.
|
||||
# Warning flags do not have to be added to H5_CFLAGS
|
||||
# variable if the compiler is the GNU gcc
|
||||
# compiler or a descendent of gcc such as EGCS or PGCC.
|
||||
#
|
||||
# The CFLAGS should contains *something* or else
|
||||
# configure will probably add `-g'. For most
|
||||
# systems this isn't a problem but some systems
|
||||
# will disable optimizations in favor of the
|
||||
# `-g'.
|
||||
#
|
||||
# AM_CFLAGS Flags added directly into this variable will
|
||||
# be propogated to the compiler wrapper scripts (h5cc,
|
||||
# h5c++, et cetera) in addition to being used to compile
|
||||
# the library.
|
||||
#
|
||||
# These flags should be set according to the compiler being used.
|
||||
# There are two ways to check the compiler. You can try using `-v' or
|
||||
@@ -162,7 +160,7 @@ if test "X-" = "X-$f9x_flags_set"; then
|
||||
# The -em flag enables .mod files, which is what HDF5 builds.
|
||||
F9XSUFFIXFLAG=""
|
||||
FSEARCH_DIRS=""
|
||||
FCFLAGS="$FCFLAGS -em"
|
||||
H5_FCFLAGS="$H5_FCFLAGS -em"
|
||||
DEBUG_FCFLAGS="-g"
|
||||
PROD_FCFLAGS=""
|
||||
PROFILE_FCFLAGS=""
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#
|
||||
if test X = "X$cc_flags_set"; then
|
||||
cc_vendor=DEC
|
||||
cc_version="`$CC $CFLAGS -V 2>&1 |head -1`"
|
||||
cc_version="`$CC $CFLAGS $H5_CFLAGS -V 2>&1 |head -1`"
|
||||
case "$cc_version" in
|
||||
DEC*)
|
||||
cc_version="`echo $cc_version |\
|
||||
@@ -111,7 +111,7 @@ fi
|
||||
if test "X-" = "X-$f9x_flags_set"; then
|
||||
F9XSUFFIXFLAG=""
|
||||
FSEARCH_DIRS=""
|
||||
FCFLAGS="$FCFLAGS -Olimit 2048 -std1"
|
||||
H5_FCFLAGS="$H5_FCFLAGS -Olimit 2048 -std1"
|
||||
DEBUG_FCFLAGS="-Olimit 2048 -std1"
|
||||
PROD_FCFLAGS="-Olimit 2048 -std1"
|
||||
PROFILE_FCFLAGS="-Olimit 2048 -std1"
|
||||
@@ -128,7 +128,7 @@ fi
|
||||
|
||||
case $CXX_BASENAME in
|
||||
g++)
|
||||
CXXFLAGS="$CXXFLAGS -Wsign-compare" #Only works for some versions
|
||||
H5_CXXFLAGS="$H5_CXXFLAGS -Wsign-compare" #Only works for some versions
|
||||
DEBUG_CXXFLAGS="-g -fverbose-asm"
|
||||
DEBUG_CPPFLAGS=
|
||||
PROD_CXXFLAGS="-O3 -fomit-frame-pointer"
|
||||
@@ -138,7 +138,7 @@ case $CXX_BASENAME in
|
||||
;;
|
||||
|
||||
*)
|
||||
CXXFLAGS="$CXXFLAGS -tlocal -D__USE_STD_IOSTREAM"
|
||||
H5_CXXFLAGS="$H5_CXXFLAGS -tlocal -D__USE_STD_IOSTREAM"
|
||||
DEBUG_CXXFLAGS="-g"
|
||||
DEBUG_CPPFLAGS=
|
||||
PROD_CXXFLAGS="-O"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user