From b47448390e604cb300bd28acbf0733eb9254b820 Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Tue, 24 May 2011 15:30:03 +0000 Subject: [PATCH] extern "C" wrapper added --- src/include/H5Block_readwrite.h | 9 ++++++++- src/include/h5core/h5_attach.h | 7 +++++++ src/include/h5core/h5_attribs.h | 8 ++++++++ src/include/h5core/h5_core.h | 9 +++++++++ src/include/h5core/h5_errorhandling.h | 7 +++++++ src/include/h5core/h5_hdf5.h | 8 ++++++++ src/include/h5core/h5_openclose.h | 8 ++++++++ src/include/h5core/h5_readwrite.h | 8 ++++++++ src/include/h5core/h5_syscall.h | 9 +++++++++ src/include/h5core/h5_types.h | 8 ++++++++ src/include/h5core/h5b_attribs.h | 8 ++++++++ src/include/h5core/h5b_model.h | 7 +++++++ src/include/h5core/h5b_readwrite.h | 8 ++++++++ src/include/h5core/h5t_adjacencies.h | 8 ++++++++ src/include/h5core/h5t_inquiry.h | 9 +++++++++ src/include/h5core/h5t_map.h | 8 ++++++++ src/include/h5core/h5t_model.h | 8 ++++++++ src/include/h5core/h5t_ref_elements.h | 8 ++++++++ src/include/h5core/h5t_retrieve.h | 9 +++++++++ src/include/h5core/h5t_storemesh.h | 9 +++++++++ src/include/h5core/h5t_tags.h | 8 ++++++++ src/include/h5core/h5u_model.h | 8 ++++++++ src/include/h5core/h5u_readwrite.h | 8 ++++++++ 23 files changed, 186 insertions(+), 1 deletion(-) diff --git a/src/include/H5Block_readwrite.h b/src/include/H5Block_readwrite.h index 107dd03..25a41f0 100644 --- a/src/include/H5Block_readwrite.h +++ b/src/include/H5Block_readwrite.h @@ -1,7 +1,10 @@ - #ifndef __H5BLOCK_READWRITE_H #define __H5BLOCK_READWRITE_H +#ifdef __cplusplus +extern "C" { +#endif + h5_err_t H5Block3dWriteScalarFieldFloat64 ( h5_file_t *const f, @@ -198,4 +201,8 @@ H5BlockReadFieldAttribInt32 ( h5_int32_t *buffer ); +#ifdef __cplusplus +} +#endif + #endif diff --git a/src/include/h5core/h5_attach.h b/src/include/h5core/h5_attach.h index 563ea69..6c2a851 100644 --- a/src/include/h5core/h5_attach.h +++ b/src/include/h5core/h5_attach.h @@ -1,6 +1,10 @@ #ifndef __H5_ATTACH_H #define __H5_ATTACH_H +#ifdef __cplusplus +extern "C" { +#endif + h5_err_t h5_add_attachment ( h5_file_t* const f, @@ -39,5 +43,8 @@ h5_delete_attachment ( h5_file_t* const f, const char* const name ); +#ifdef __cplusplus +} +#endif #endif diff --git a/src/include/h5core/h5_attribs.h b/src/include/h5core/h5_attribs.h index 5963e63..40c127f 100644 --- a/src/include/h5core/h5_attribs.h +++ b/src/include/h5core/h5_attribs.h @@ -1,6 +1,10 @@ #ifndef __H5CORE_ATTRIBS_H #define __H5CORE_ATTRIBS_H +#ifdef __cplusplus +extern "C" { +#endif + #define H5_ATTRIB_FILE 0 #define H5_ATTRIB_STEP 1 #define H5_ATTRIB_FIELD 2 @@ -41,4 +45,8 @@ h5_get_num_attribs ( const char mode ); +#ifdef __cplusplus +} +#endif + #endif diff --git a/src/include/h5core/h5_core.h b/src/include/h5core/h5_core.h index cae1fa1..715e58b 100644 --- a/src/include/h5core/h5_core.h +++ b/src/include/h5core/h5_core.h @@ -1,6 +1,10 @@ #ifndef __H5_CORE_H #define __H5_CORE_H +#ifdef __cplusplus +extern "C" { +#endif + #define UNUSED_ARGUMENT(x) (void)x #define H5_DEBUG_USER (1<<2) @@ -183,6 +187,11 @@ done: \ } #define ON_ERROR +#ifdef __cplusplus +} +#endif + + #include "h5_types.h" #include "h5_errno.h" diff --git a/src/include/h5core/h5_errorhandling.h b/src/include/h5core/h5_errorhandling.h index adb584f..e3fdced 100644 --- a/src/include/h5core/h5_errorhandling.h +++ b/src/include/h5core/h5_errorhandling.h @@ -3,6 +3,10 @@ #include +#ifdef __cplusplus +extern "C" { +#endif + enum h5_rtypes { e_int = 0, e_ssize_t, @@ -298,5 +302,8 @@ h5_debug ( } } +#ifdef __cplusplus +} +#endif #endif diff --git a/src/include/h5core/h5_hdf5.h b/src/include/h5core/h5_hdf5.h index 4f59a89..b27d4c4 100644 --- a/src/include/h5core/h5_hdf5.h +++ b/src/include/h5core/h5_hdf5.h @@ -1,6 +1,10 @@ #ifndef __H5_HDF5_H #define __H5_HDF5_H +#ifdef __cplusplus +extern "C" { +#endif + ssize_t hdf5_get_num_groups ( const hid_t loc_id @@ -38,4 +42,8 @@ hdf5_get_objname ( hid_t id ); +#ifdef __cplusplus +} +#endif + #endif diff --git a/src/include/h5core/h5_openclose.h b/src/include/h5core/h5_openclose.h index c218f04..843ffde 100644 --- a/src/include/h5core/h5_openclose.h +++ b/src/include/h5core/h5_openclose.h @@ -1,6 +1,10 @@ #ifndef __H5_OPENCLOSE_H #define __H5_OPENCLOSE_H +#ifdef __cplusplus +extern "C" { +#endif + h5_file_t * h5_open_file ( const char *filename, @@ -91,4 +95,8 @@ h5_filehandlefor2c ( const h5_int64_t *ptr ); +#ifdef __cplusplus +} +#endif + #endif diff --git a/src/include/h5core/h5_readwrite.h b/src/include/h5core/h5_readwrite.h index 76210f1..ef571d6 100644 --- a/src/include/h5core/h5_readwrite.h +++ b/src/include/h5core/h5_readwrite.h @@ -1,6 +1,10 @@ #ifndef __H5_READWRITE_H #define __H5_READWRITE_H +#ifdef __cplusplus +extern "C" { +#endif + h5_int64_t h5_set_step ( h5_file_t * const f, @@ -46,4 +50,8 @@ h5_end_throttle ( h5_file_t *f ); +#ifdef __cplusplus +} +#endif + #endif diff --git a/src/include/h5core/h5_syscall.h b/src/include/h5core/h5_syscall.h index 1e998bd..634f853 100644 --- a/src/include/h5core/h5_syscall.h +++ b/src/include/h5core/h5_syscall.h @@ -1,6 +1,10 @@ #ifndef __H5_SYSCALL_H #define __H5_SYSCALL_H +#ifdef __cplusplus +extern "C" { +#endif + void* h5_alloc ( void* ptr, @@ -17,4 +21,9 @@ h5_err_t h5_free ( void* ptr ); + +#ifdef __cplusplus +} +#endif + #endif diff --git a/src/include/h5core/h5_types.h b/src/include/h5core/h5_types.h index 747c9e7..23a0fc7 100644 --- a/src/include/h5core/h5_types.h +++ b/src/include/h5core/h5_types.h @@ -4,6 +4,10 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif + /* file modes: H5_O_RDONLY: only reading allowed @@ -99,4 +103,8 @@ typedef enum h5_oid h5_oid_t; #define H5_TRIANGLE_MESH (H5_OID_TRIANGLE) #define H5_TETRAHEDRAL_MESH (H5_OID_TETRAHEDRON) +#ifdef __cplusplus +} +#endif + #endif diff --git a/src/include/h5core/h5b_attribs.h b/src/include/h5core/h5b_attribs.h index 257732d..508f3ad 100644 --- a/src/include/h5core/h5b_attribs.h +++ b/src/include/h5core/h5b_attribs.h @@ -1,6 +1,10 @@ #ifndef __H5B_ATTRIBS_H #define __H5B_ATTRIBS_H +#ifdef __cplusplus +extern "C" { +#endif + h5_err_t h5_write_field_attrib ( h5_file_t *const f, /*!< IN: file handle */ @@ -37,4 +41,8 @@ h5b_get_field_attrib_info ( h5_size_t *attrib_nelem /*!< OUT: number of elements */ ); +#ifdef __cplusplus +} +#endif + #endif diff --git a/src/include/h5core/h5b_model.h b/src/include/h5core/h5b_model.h index a62c93e..95fa079 100644 --- a/src/include/h5core/h5b_model.h +++ b/src/include/h5core/h5b_model.h @@ -1,6 +1,10 @@ #ifndef __H5B_MODEL_H #define __H5B_MODEL_H +#ifdef __cplusplus +extern "C" { +#endif + h5_err_t h5bpriv_release_hyperslab ( h5_file_t *const f /*!< IN: file handle */ @@ -146,5 +150,8 @@ h5b_get_field_info ( h5_int64_t *const type /*!< OUT: datatype */ ); +#ifdef __cplusplus +} +#endif #endif diff --git a/src/include/h5core/h5b_readwrite.h b/src/include/h5core/h5b_readwrite.h index c11f9f7..9bb9029 100644 --- a/src/include/h5core/h5b_readwrite.h +++ b/src/include/h5core/h5b_readwrite.h @@ -1,6 +1,10 @@ #ifndef __H5B_READWRITE_H #define __H5B_READWRITE_H +#ifdef __cplusplus +extern "C" { +#endif + h5_err_t h5b_write_scalar_data ( h5_file_t *const f, /*!< IN: file handle */ @@ -37,4 +41,8 @@ h5b_read_vector3d_data ( const hid_t type /*!< IN: data type */ ); +#ifdef __cplusplus +} +#endif + #endif diff --git a/src/include/h5core/h5t_adjacencies.h b/src/include/h5core/h5t_adjacencies.h index da46152..3892e6f 100644 --- a/src/include/h5core/h5t_adjacencies.h +++ b/src/include/h5core/h5t_adjacencies.h @@ -1,6 +1,10 @@ #ifndef __H5T_ADJACENCIES_H #define __H5T_ADJACENCIES_H +#ifdef __cplusplus +extern "C" { +#endif + h5_err_t h5t_get_adjacencies ( h5_file_t * const f, @@ -23,4 +27,8 @@ h5t_find_te2 ( h5_loc_idlist_t** retval ); +#ifdef __cplusplus +} +#endif + #endif diff --git a/src/include/h5core/h5t_inquiry.h b/src/include/h5core/h5t_inquiry.h index 83c8d26..85c31d0 100644 --- a/src/include/h5core/h5t_inquiry.h +++ b/src/include/h5core/h5t_inquiry.h @@ -1,6 +1,10 @@ #ifndef __H5T_INQUIRY_H #define __H5T_INQUIRY_H +#ifdef __cplusplus +extern "C" { +#endif + h5_ssize_t h5t_get_num_tetmeshes ( h5_file_t * const f @@ -32,4 +36,9 @@ h5t_lvl_idx_t h5t_get_level ( h5_file_t * const f ); + +#ifdef __cplusplus +} +#endif + #endif diff --git a/src/include/h5core/h5t_map.h b/src/include/h5core/h5t_map.h index e6cb512..de063eb 100644 --- a/src/include/h5core/h5t_map.h +++ b/src/include/h5core/h5t_map.h @@ -1,6 +1,10 @@ #ifndef __H5T_MAP_H #define __H5T_MAP_H +#ifdef __cplusplus +extern "C" { +#endif + h5_loc_idx_t h5t_map_global_vertex_idx2local ( h5_file_t* const f, @@ -97,4 +101,8 @@ h5t_get_vertex_indices_of_entity2 ( h5_loc_idx_t* vertex_indices ); +#ifdef __cplusplus +} +#endif + #endif diff --git a/src/include/h5core/h5t_model.h b/src/include/h5core/h5t_model.h index 175a5f9..dec47de 100644 --- a/src/include/h5core/h5t_model.h +++ b/src/include/h5core/h5t_model.h @@ -1,6 +1,10 @@ #ifndef __H5T_MODEL_H #define __H5T_MODEL_H +#ifdef __cplusplus +extern "C" { +#endif + h5_err_t h5t_open_tetrahedral_mesh ( h5_file_t * const f, const h5_id_t id @@ -29,4 +33,8 @@ h5_err_t h5t_close_mesh ( h5_file_t * const f ); +#ifdef __cplusplus +} +#endif + #endif diff --git a/src/include/h5core/h5t_ref_elements.h b/src/include/h5core/h5t_ref_elements.h index 74b7075..4346d5f 100644 --- a/src/include/h5core/h5t_ref_elements.h +++ b/src/include/h5core/h5t_ref_elements.h @@ -1,6 +1,10 @@ #ifndef __H5T_REFERENCE_ELEMENTS_H #define __H5T_REFERENCE_ELEMENTS_H +#ifdef __cplusplus +extern "C" { +#endif + #define H5T_MAX_DIM 3 #define H5T_MAX_FACES 6 // edges in tetrahedron #define H5T_MAX_VERTICES 4 // tetrahedron @@ -18,4 +22,8 @@ typedef struct { extern const h5t_ref_elem_t h5t_tet_ref_elem; extern const h5t_ref_elem_t h5t_tri_ref_elem; +#ifdef __cplusplus +} +#endif + #endif diff --git a/src/include/h5core/h5t_retrieve.h b/src/include/h5core/h5t_retrieve.h index 29b9f71..e134aba 100644 --- a/src/include/h5core/h5t_retrieve.h +++ b/src/include/h5core/h5t_retrieve.h @@ -1,6 +1,10 @@ #ifndef __H5T_RETRIEVE_H #define __H5T_RETRIEVE_H +#ifdef __cplusplus +extern "C" { +#endif + struct h5t_tagset; union h5t_iterator; @@ -100,4 +104,9 @@ h5t_get_vertex_coords_by_id ( h5_loc_id_t vertex_id, h5_float64_t P[3] ); + +#ifdef __cplusplus +} +#endif + #endif diff --git a/src/include/h5core/h5t_storemesh.h b/src/include/h5core/h5t_storemesh.h index 92c6713..4e081ce 100644 --- a/src/include/h5core/h5t_storemesh.h +++ b/src/include/h5core/h5t_storemesh.h @@ -1,6 +1,10 @@ #ifndef __H5T_STOREMESH_H #define __H5T_STOREMESH_H +#ifdef __cplusplus +extern "C" { +#endif + h5t_lvl_idx_t h5t_add_level ( h5_file_t * const f @@ -77,4 +81,9 @@ h5_err_t h5t_post_refine ( h5_file_t* const f ); + +#ifdef __cplusplus +} +#endif + #endif diff --git a/src/include/h5core/h5t_tags.h b/src/include/h5core/h5t_tags.h index 0dc143a..e2fd12c 100644 --- a/src/include/h5core/h5t_tags.h +++ b/src/include/h5core/h5t_tags.h @@ -1,6 +1,10 @@ #ifndef __H5T_TAGS_H #define __H5T_TAGS_H +#ifdef __cplusplus +extern "C" { +#endif + typedef struct h5t_tagset h5t_tagset_t; typedef struct h5t_tagcontainer h5t_tagcontainer_t; @@ -97,4 +101,8 @@ h5t_get_mtagset_names_of_entity ( const h5_size_t dim ); +#ifdef __cplusplus +} +#endif + #endif diff --git a/src/include/h5core/h5u_model.h b/src/include/h5core/h5u_model.h index 606e712..a029f15 100644 --- a/src/include/h5core/h5u_model.h +++ b/src/include/h5core/h5u_model.h @@ -1,6 +1,10 @@ #ifndef __H5U_MODEL_H #define __H5U_MODEL_H +#ifdef __cplusplus +extern "C" { +#endif + h5_ssize_t h5u_get_num_particles ( h5_file_t *const f @@ -77,5 +81,9 @@ h5u_get_chunk ( h5_size_t *size ); +#ifdef __cplusplus +} +#endif + #endif diff --git a/src/include/h5core/h5u_readwrite.h b/src/include/h5core/h5u_readwrite.h index 9035e62..96d4c1a 100644 --- a/src/include/h5core/h5u_readwrite.h +++ b/src/include/h5core/h5u_readwrite.h @@ -1,6 +1,10 @@ #ifndef __H5U_READWRITE_H #define __H5U_READWRITE_H +#ifdef __cplusplus +extern "C" { +#endif + h5_int64_t h5u_read_data ( h5_file_t *f, @@ -17,5 +21,9 @@ h5u_write_data ( const hid_t type ); +#ifdef __cplusplus +} +#endif + #endif