18 if ( ( attr_id = ::H5Aopen_name( obj_id, attr_name ) ) < 0 )
return -1;
19 if ( ::H5Aread( attr_id, mem_type_id, data ) < 0 ) {
20 ::H5Aclose( attr_id );
23 if ( ::H5Aclose( attr_id ) < 0 )
return -1;
27 inline herr_t
find_attr( hid_t loc_id,
const char *name,
void *op_data) {
29 char *attr_name = (
char*)op_data;
30 if( ::strcmp( name, attr_name ) == 0 ) ret = 1;
36 unsigned int attr_num;
43 if ( ( attr_id = ::H5Aopen_name( loc_id, attr_name ) ) < 0 )
return -1;
46 if ( (attr_type = ::H5Aget_type( attr_id )) < 0 ) {
47 ::H5Tclose( attr_type );
48 ::H5Aclose( attr_id );
52 if ( ::H5Aread( attr_id, attr_type, attr_out ) < 0 ) {
53 ::H5Tclose( attr_type );
54 ::H5Aclose( attr_id );
58 if ( ::H5Tclose( attr_type ) < 0 ) {
59 ::H5Tclose( attr_type );
60 ::H5Aclose( attr_id );
64 if ( ::H5Aclose( attr_id ) < 0 )
return -1;