Back to index

salome-kernel  6.5.0
HDFtypes.h
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 /*----------------------------------------------------------------------------------
00024   SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
00025   File   : HDFtypes.h
00026   Module : SALOME
00027 ----------------------------------------------------------------------------------*/
00028 
00029 #ifndef HDFTYPES_H
00030 #define HDFTYPES_H
00031 
00032 #include <hdf5.h>
00033 
00034 /* max length of a HDF object */
00035 #define HDF_NAME_MAX_LEN  100
00036 
00037 /* HDF 5 types */
00038 typedef size_t         hdf_size_type;
00039 typedef H5T_class_t    hdf_class_type;
00040 typedef hsize_t        hdf_size;
00041 typedef hid_t          hdf_idt;
00042 typedef herr_t         hdf_err;
00043 typedef hbool_t        hdf_bool;
00044 typedef H5T_order_t    hdf_byte_order;
00045 
00046 typedef char           hdf_char;
00047 typedef int            hdf_int32;
00048 typedef long           hdf_int64;
00049 typedef double         hdf_float64;
00050 
00051 /* Access Mode */
00052 typedef enum {HDF_RDONLY,HDF_RDWR} hdf_access_mode; 
00053 
00054 /* Values types for HDF datasets and attributes */
00055 typedef enum {HDF_NONE,HDF_STRING, HDF_INT32, HDF_INT64, HDF_FLOAT64, HDF_CHAR, HDF_ARRAY} hdf_type;
00056 /* - HDF_STRING   : C string 
00057    - HDF_INT32    : 32 bits integer 
00058    - HDF_INT64    : 64 bits integer
00059    - HDF_FLOAT64  : IEEE  64 bits float
00060    - HDF_ARRAY    : Array
00061 */
00062 
00063 /* HDF object types */
00064 typedef enum {HDF_OBJECT,HDF_FILE,HDF_GROUP,HDF_DATASET,
00065               HDF_ATTRIBUTE, HDF_ARRAY_TYPE } hdf_object_type;
00066 
00067 #endif /* HDFTYPES_H */