attachment implementation

This commit is contained in:
2011-03-24 09:07:12 +00:00
parent 4b0d303ceb
commit e4e78f713c
17 changed files with 457 additions and 140 deletions
+50
View File
@@ -0,0 +1,50 @@
#ifndef __H5_ATTACH_H
#define __H5_ATTACH_H
h5_err_t
h5_write_attachment (
h5_file_t* const f,
const char* const name,
const hid_t type,
const char* const content,
const h5_size_t size
);
h5_ssize_t
h5_get_num_attachments (
h5_file_t* const f
);
h5_err_t
h5_get_attachment_info_by_idx (
h5_file_t* const f,
const h5_size_t idx, // IN
char* const name, // OUT
h5_size_t len_name, // IN
h5_int64_t* const type, // OUT
h5_size_t* const npoints // OUT
);
h5_err_t
h5_get_attachment_info_by_name (
h5_file_t* const f,
const char* const name, // IN
h5_int64_t* const type, // OUT
h5_size_t* const npoints // OUT
);
h5_err_t
h5_read_attachment (
h5_file_t* const f,
const char* const name,
const hid_t type,
void* const content
);
h5_err_t
h5_delete_attachment (
h5_file_t* const f,
const char* const name
);
#endif
+15 -6
View File
@@ -14,13 +14,13 @@
#define H5_DEBUG_ALL (-1)
extern char* h5_rfmts[];
#define __FUNC_ENTER(type) \
#define __FUNC_ENTER(type) \
h5_call_stack_push (__func__,e_##type); \
type ret_value = (type)H5_ERR;
#define __FUNC_ARGS0(mask) \
#define __FUNC_ARGS0(mask) \
if (h5_debug_level & mask ) { \
h5_debug ("(void)"); \
h5_debug ("(void)"); \
}
#define __FUNC_ARGS1(fmt, a1, mask) \
@@ -69,7 +69,7 @@ extern char* h5_rfmts[];
__FUNC_ARGS4(fmt, a1, a2, a3, a4, mask);
#define __FUNC_ENTER5(type, fmt, a1, a2, a3, a4, a5, mask) \
__FUNC_ENTER(type); \
__FUNC_ENTER(type); \
__FUNC_ARGS5(fmt, a1, a2, a3, a4, a5, mask);
#define __FUNC_LEAVE(expr) { \
@@ -80,8 +80,8 @@ extern char* h5_rfmts[];
#define __FUNC_RETURN(expr, mask) \
ret_value = expr; \
goto done; \
done: \
if (h5_debug_level & mask ) { \
done: \
if (h5_debug_level & mask ) { \
char fmt[256]; \
snprintf (fmt, sizeof(fmt), "return: %s", \
h5_rfmts[h5_call_stack_get_type()]); \
@@ -109,6 +109,14 @@ done: \
H5_API_ENTER(type); \
__FUNC_ARGS3(fmt, a1,a2,a3, H5_DEBUG_API)
#define H5_API_ENTER4(type, fmt, a1, a2, a3, a4) \
H5_API_ENTER(type); \
__FUNC_ARGS4(fmt, a1,a2,a3, a4, H5_DEBUG_API)
#define H5_API_ENTER5(type, fmt, a1, a2, a3, a4, a5) \
H5_API_ENTER(type); \
__FUNC_ARGS5(fmt, a1,a2,a3, a4, a5, H5_DEBUG_API)
#define H5_API_LEAVE(expr) __FUNC_LEAVE(expr)
#define H5_API_RETURN(expr) __FUNC_RETURN(expr, H5_DEBUG_API);
@@ -135,6 +143,7 @@ done: \
#include "h5_types.h"
#include "h5_errno.h"
#include "h5_attach.h"
#include "h5_attribs.h"
#include "h5_hdf5.h"
#include "h5_maps.h"
-10
View File
@@ -33,16 +33,6 @@ hdf5_get_name_of_dataset_by_idx (
size_t len
);
h5_err_t
hdf5_get_dataset_info_by_idx (
const hid_t loc_id,
const hsize_t idx,
char* const name,
const size_t len_name,
h5_int64_t* const type,
hsize_t* const npoints
);
const char *
hdf5_get_objname (
hid_t id