From 6661eca765411dba99ecfb5fc015485d535cfba8 Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Fri, 25 Mar 2011 14:53:31 +0000 Subject: [PATCH] added extern "C" wrapper for C++ --- src/include/H5.h | 7 +++++++ src/include/H5Block.h | 9 +++++++++ src/include/H5Block_readwrite.h | 8 ++++++++ src/include/H5Fed.h | 8 +++++++- src/include/H5Fed_adjacency.h | 8 ++++++++ src/include/H5Fed_inquiry.h | 9 +++++++++ src/include/H5Fed_retrieve.h | 9 +++++++++ src/include/H5Fed_store.h | 8 ++++++++ src/include/H5Fed_tags.h | 9 +++++++++ src/include/H5Part.h | 7 +++++++ src/include/H5_attachments.h | 8 ++++++++ src/include/H5_attribs.h | 7 +++++++ src/include/H5hut.h | 8 -------- src/include/h5core/h5_types.h | 1 - 14 files changed, 96 insertions(+), 10 deletions(-) diff --git a/src/include/H5.h b/src/include/H5.h index ebc7f0a..4877f60 100644 --- a/src/include/H5.h +++ b/src/include/H5.h @@ -16,6 +16,10 @@ #ifndef __H5_H #define __H5_H +#ifdef __cplusplus +extern "C" { +#endif + h5_file_t * H5OpenFile ( const char * filename, @@ -129,5 +133,8 @@ H5SetThrottle ( int factor ); #endif +#ifdef __cplusplus +} +#endif #endif diff --git a/src/include/H5Block.h b/src/include/H5Block.h index a3d4d53..02df32e 100644 --- a/src/include/H5Block.h +++ b/src/include/H5Block.h @@ -1,6 +1,10 @@ #ifndef __H5BLOCK_H #define __H5BLOCK_H +#ifdef __cplusplus +extern "C" { +#endif + h5_int64_t H5Block3dHasView ( h5_file_t *const f /*!< IN: File handle */ @@ -188,5 +192,10 @@ H5Block3dSetFieldSpacing ( const h5_float64_t y_spacing, const h5_float64_t z_spacing ); + +#ifdef __cplusplus +} +#endif + #endif diff --git a/src/include/H5Block_readwrite.h b/src/include/H5Block_readwrite.h index 98fd592..f421bb3 100644 --- a/src/include/H5Block_readwrite.h +++ b/src/include/H5Block_readwrite.h @@ -2,6 +2,10 @@ #ifndef __H5BLOCK_READWRITE_H #define __H5BLOCK_READWRITE_H +#ifdef __cplusplus +extern "C" { +#endif + h5_err_t H5Block3dWriteScalarFieldFloat64 ( h5_file_t *f, @@ -198,4 +202,8 @@ H5BlockReadFieldAttribInt32 ( h5_int32_t *buffer ); +#ifdef __cplusplus +} +#endif + #endif diff --git a/src/include/H5Fed.h b/src/include/H5Fed.h index dfc6aee..b0dea4e 100644 --- a/src/include/H5Fed.h +++ b/src/include/H5Fed.h @@ -25,6 +25,10 @@ #include "H5Fed_store.h" #include "H5Fed_tags.h" +#ifdef __cplusplus +extern "C" { +#endif + /****** General routines *****************************************************/ h5_err_t @@ -51,7 +55,9 @@ H5FedLinkMeshToStep ( const h5_id_t mesh_id ); - +#ifdef __cplusplus +} +#endif #endif diff --git a/src/include/H5Fed_adjacency.h b/src/include/H5Fed_adjacency.h index 7d6de55..c52a262 100644 --- a/src/include/H5Fed_adjacency.h +++ b/src/include/H5Fed_adjacency.h @@ -1,6 +1,10 @@ #ifndef __H5FED_ADJACENCY_H #define __H5FED_ADJACENCY_H +#ifdef __cplusplus +extern "C" { +#endif + h5_err_t H5FedGetAdjacencies ( h5_file_t* const f, @@ -15,4 +19,8 @@ H5FedReleaseListOfAdjacencies ( h5_loc_idlist_t **list ); +#ifdef __cplusplus +} +#endif + #endif diff --git a/src/include/H5Fed_inquiry.h b/src/include/H5Fed_inquiry.h index e97ce5d..4a7aa50 100644 --- a/src/include/H5Fed_inquiry.h +++ b/src/include/H5Fed_inquiry.h @@ -18,6 +18,10 @@ #ifndef __H5FED_INQUIRY_H #define __H5FED_INQUIRY_H +#ifdef __cplusplus +extern "C" { +#endif + h5_ssize_t H5FedGetNumMeshes ( h5_file_t * const f, const h5_oid_t type_id ); h5_ssize_t H5FedGetNumLevels ( h5_file_t * const f ); h5t_lvl_idx_t H5FedGetLevel ( h5_file_t * const f ); @@ -27,4 +31,9 @@ h5_ssize_t H5FedGetNumVerticesTotal ( h5_file_t * const f ); h5_ssize_t H5FedGetNumElements ( h5_file_t * const f ); h5_ssize_t H5FedGetNumElementsCnode ( h5_file_t * const f, const h5_id_t cnode ); h5_ssize_t H5FedGetNumElementsTotal ( h5_file_t * const f ); + +#ifdef __cplusplus +} +#endif + #endif diff --git a/src/include/H5Fed_retrieve.h b/src/include/H5Fed_retrieve.h index dd8397b..f19ea84 100644 --- a/src/include/H5Fed_retrieve.h +++ b/src/include/H5Fed_retrieve.h @@ -15,6 +15,10 @@ #ifndef __H5FED_RETRIEVE_H #define __H5FED_RETRIEVE_H +#ifdef __cplusplus +extern "C" { +#endif + h5t_iterator_t* H5FedBeginTraverseEntities ( h5_file_t* const f, @@ -82,4 +86,9 @@ H5FedGetVertexIndicesOfEntity ( h5_loc_id_t entity_id, h5_loc_idx_t* const vertex_indices ); + +#ifdef __cplusplus +} +#endif + #endif diff --git a/src/include/H5Fed_store.h b/src/include/H5Fed_store.h index 4797db9..9b5f3ce 100644 --- a/src/include/H5Fed_store.h +++ b/src/include/H5Fed_store.h @@ -19,6 +19,10 @@ #ifndef __H5FED_STORE_H #define __H5FED_STORE_H +#ifdef __cplusplus +extern "C" { +#endif + h5_id_t H5FedAddMesh ( h5_file_t * const f, @@ -82,4 +86,8 @@ H5FedEndRefineElements ( h5_file_t * const f ); +#ifdef __cplusplus +} +#endif + #endif diff --git a/src/include/H5Fed_tags.h b/src/include/H5Fed_tags.h index 81e9653..ea59e6a 100644 --- a/src/include/H5Fed_tags.h +++ b/src/include/H5Fed_tags.h @@ -1,5 +1,10 @@ #ifndef __H5FED_TAGS_H #define __H5FED_TAGS_H + +#ifdef __cplusplus +extern "C" { +#endif + h5_err_t H5FedAddMTagset ( h5_file_t* const f, @@ -44,4 +49,8 @@ H5FedRemoveMTag ( const h5_loc_id_t id ); +#ifdef __cplusplus +} +#endif + #endif diff --git a/src/include/H5Part.h b/src/include/H5Part.h index c7844bc..9c0632f 100644 --- a/src/include/H5Part.h +++ b/src/include/H5Part.h @@ -1,6 +1,10 @@ #ifndef __H5PART_H #define __H5PART_H +#ifdef __cplusplus +extern "C" { +#endif + h5_err_t H5PartSetNumParticles ( h5_file_t *f, /*!< [in] Handle to open file */ @@ -141,5 +145,8 @@ H5PartSetCanonicalView ( h5_file_t *f /*!< [in] Handle to open file */ ); +#ifdef __cplusplus +} +#endif #endif diff --git a/src/include/H5_attachments.h b/src/include/H5_attachments.h index 9137203..44ce3e6 100644 --- a/src/include/H5_attachments.h +++ b/src/include/H5_attachments.h @@ -1,6 +1,10 @@ #ifndef __H5_ATTACHMENTS_H #define __H5_ATTACHMENTS_H +#ifdef __cplusplus +extern "C" { +#endif + h5_ssize_t H5GetNumAttachments ( h5_file_t* const f @@ -105,4 +109,8 @@ H5DeleteAttachment ( const char* const name ); +#ifdef __cplusplus +} +#endif + #endif diff --git a/src/include/H5_attribs.h b/src/include/H5_attribs.h index 5dcdbab..f03bc78 100644 --- a/src/include/H5_attribs.h +++ b/src/include/H5_attribs.h @@ -1,6 +1,10 @@ #ifndef __H5_ATTRIBS_H #define __H5_ATTRIBS_H +#ifdef __cplusplus +extern "C" { +#endif + h5_err_t H5WriteFileAttribString ( h5_file_t *const f, /*!< [in] Handle to open file */ @@ -183,5 +187,8 @@ H5GetStepAttribInfo ( h5_size_t *attrib_nelem /*!< [out] Number of elements */ ); +#ifdef __cplusplus +} +#endif #endif diff --git a/src/include/H5hut.h b/src/include/H5hut.h index c4400b7..d7d36b1 100644 --- a/src/include/H5hut.h +++ b/src/include/H5hut.h @@ -1,10 +1,6 @@ #ifndef __H5HUT_H #define __H5HUT_H -#ifdef __cplusplus -extern "C" { -#endif - #include "h5core/h5_core.h" #include "H5.h" #include "H5_attribs.h" @@ -14,8 +10,4 @@ extern "C" { #include "H5Block_readwrite.h" #include "H5Fed.h" -#ifdef __cplusplus -} -#endif - #endif diff --git a/src/include/h5core/h5_types.h b/src/include/h5core/h5_types.h index 5152a60..6be4a30 100644 --- a/src/include/h5core/h5_types.h +++ b/src/include/h5core/h5_types.h @@ -1,7 +1,6 @@ #ifndef __H5_TYPES_H #define __H5_TYPES_H -#include #include /*