H5Apublic.h

00001 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
00002  * Copyright by The HDF Group.                                               *
00003  * Copyright by the Board of Trustees of the University of Illinois.         *
00004  * All rights reserved.                                                      *
00005  *                                                                           *
00006  * This file is part of HDF5.  The full HDF5 copyright notice, including     *
00007  * terms governing use, modification, and redistribution, is contained in    *
00008  * the files COPYING and Copyright.html.  COPYING can be found at the root   *
00009  * of the source code distribution tree; Copyright.html can be found at the  *
00010  * root level of an installed copy of the electronic HDF5 document set and   *
00011  * is linked from the top-level documents page.  It can also be found at     *
00012  * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
00013  * access to either file, you may request a copy from help@hdfgroup.org.     *
00014  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
00015 
00016 /*
00017  * This file contains public declarations for the H5A module.
00018  */
00019 #ifndef _H5Apublic_H
00020 #define _H5Apublic_H
00021 
00022 /* Public headers needed by this file */
00023 #include "H5Ipublic.h"          /* IDs                                  */
00024 #include "H5Opublic.h"          /* Object Headers                       */
00025 #include "H5Tpublic.h"          /* Datatypes                            */
00026 
00027 #ifdef __cplusplus
00028 extern "C" {
00029 #endif
00030 
00031 /* Information struct for attribute (for H5Aget_info/H5Aget_info_by_idx) */
00032 typedef struct {
00033     hbool_t             corder_valid;   /* Indicate if creation order is valid */
00034     H5O_msg_crt_idx_t   corder;         /* Creation order                 */
00035     H5T_cset_t          cset;           /* Character set of attribute name */
00036     hsize_t             data_size;      /* Size of raw data               */
00037 } H5A_info_t;
00038 
00039 /* Typedef for H5Aiterate2() callbacks */
00040 typedef herr_t (*H5A_operator2_t)(hid_t location_id/*in*/,
00041     const char *attr_name/*in*/, const H5A_info_t *ainfo/*in*/, void *op_data/*in,out*/);
00042 
00043 /* Public function prototypes */
00044 H5_DLL hid_t   H5Acreate2(hid_t loc_id, const char *attr_name, hid_t type_id,
00045     hid_t space_id, hid_t acpl_id, hid_t aapl_id);
00046 H5_DLL hid_t   H5Acreate_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
00047     hid_t type_id, hid_t space_id, hid_t acpl_id, hid_t aapl_id, hid_t lapl_id);
00048 H5_DLL hid_t   H5Aopen(hid_t obj_id, const char *attr_name, hid_t aapl_id);
00049 H5_DLL hid_t   H5Aopen_by_name(hid_t loc_id, const char *obj_name,
00050     const char *attr_name, hid_t aapl_id, hid_t lapl_id);
00051 H5_DLL hid_t   H5Aopen_by_idx(hid_t loc_id, const char *obj_name,
00052     H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t aapl_id,
00053     hid_t lapl_id);
00054 H5_DLL herr_t  H5Awrite(hid_t attr_id, hid_t type_id, const void *buf);
00055 H5_DLL herr_t  H5Aread(hid_t attr_id, hid_t type_id, void *buf);
00056 H5_DLL herr_t  H5Aclose(hid_t attr_id);
00057 H5_DLL hid_t   H5Aget_space(hid_t attr_id);
00058 H5_DLL hid_t   H5Aget_type(hid_t attr_id);
00059 H5_DLL hid_t   H5Aget_create_plist(hid_t attr_id);
00060 H5_DLL ssize_t H5Aget_name(hid_t attr_id, size_t buf_size, char *buf);
00061 H5_DLL ssize_t H5Aget_name_by_idx(hid_t loc_id, const char *obj_name,
00062     H5_index_t idx_type, H5_iter_order_t order, hsize_t n,
00063     char *name /*out*/, size_t size, hid_t lapl_id);
00064 H5_DLL hsize_t H5Aget_storage_size(hid_t attr_id);
00065 H5_DLL herr_t  H5Aget_info(hid_t attr_id, H5A_info_t *ainfo /*out*/);
00066 H5_DLL herr_t  H5Aget_info_by_name(hid_t loc_id, const char *obj_name,
00067     const char *attr_name, H5A_info_t *ainfo /*out*/, hid_t lapl_id);
00068 H5_DLL herr_t  H5Aget_info_by_idx(hid_t loc_id, const char *obj_name,
00069     H5_index_t idx_type, H5_iter_order_t order, hsize_t n,
00070     H5A_info_t *ainfo /*out*/, hid_t lapl_id);
00071 H5_DLL herr_t  H5Arename(hid_t loc_id, const char *old_name, const char *new_name);
00072 H5_DLL herr_t  H5Arename_by_name(hid_t loc_id, const char *obj_name,
00073     const char *old_attr_name, const char *new_attr_name, hid_t lapl_id);
00074 H5_DLL herr_t  H5Aiterate2(hid_t loc_id, H5_index_t idx_type,
00075     H5_iter_order_t order, hsize_t *idx, H5A_operator2_t op, void *op_data);
00076 H5_DLL herr_t  H5Aiterate_by_name(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
00077     H5_iter_order_t order, hsize_t *idx, H5A_operator2_t op, void *op_data,
00078     hid_t lapd_id);
00079 H5_DLL herr_t  H5Adelete(hid_t loc_id, const char *name);
00080 H5_DLL herr_t  H5Adelete_by_name(hid_t loc_id, const char *obj_name,
00081     const char *attr_name, hid_t lapl_id);
00082 H5_DLL herr_t  H5Adelete_by_idx(hid_t loc_id, const char *obj_name,
00083     H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t lapl_id);
00084 H5_DLL htri_t H5Aexists(hid_t obj_id, const char *attr_name);
00085 H5_DLL htri_t H5Aexists_by_name(hid_t obj_id, const char *obj_name,
00086     const char *attr_name, hid_t lapl_id);
00087 
00088 /* Symbols defined for compatibility with previous versions of the HDF5 API.
00089  *
00090  * Use of these symbols is deprecated.
00091  */
00092 #ifndef H5_NO_DEPRECATED_SYMBOLS
00093 
00094 /* Macros */
00095 
00096 
00097 /* Typedefs */
00098 
00099 /* Typedef for H5Aiterate1() callbacks */
00100 typedef herr_t (*H5A_operator1_t)(hid_t location_id/*in*/,
00101     const char *attr_name/*in*/, void *operator_data/*in,out*/);
00102 
00103 
00104 /* Function prototypes */
00105 H5_DLL hid_t   H5Acreate1(hid_t loc_id, const char *name, hid_t type_id,
00106     hid_t space_id, hid_t acpl_id);
00107 H5_DLL hid_t   H5Aopen_name(hid_t loc_id, const char *name);
00108 H5_DLL hid_t   H5Aopen_idx(hid_t loc_id, unsigned idx);
00109 H5_DLL int     H5Aget_num_attrs(hid_t loc_id);
00110 H5_DLL herr_t  H5Aiterate1(hid_t loc_id, unsigned *attr_num, H5A_operator1_t op,
00111     void *op_data);
00112 
00113 #endif /* H5_NO_DEPRECATED_SYMBOLS */
00114 
00115 #ifdef __cplusplus
00116 }
00117 #endif
00118 
00119 #endif /* _H5Apublic_H */
00120