23 #if !defined (octave_ls_hdf5_h)
24 #define octave_ls_hdf5_h 1
26 #if defined (HAVE_HDF5)
53 if (mode & std::ios::in)
54 file_id = H5Fopen (name, H5F_ACC_RDONLY, H5P_DEFAULT);
55 else if (mode & std::ios::out)
57 if (mode & std::ios::app && H5Fis_hdf5 (name) > 0)
58 file_id = H5Fopen (name, H5F_ACC_RDWR, H5P_DEFAULT);
60 file_id = H5Fcreate (name, H5F_ACC_TRUNC, H5P_DEFAULT,
64 std::ios::setstate (std::ios::badbit);
74 std::ios::setstate (std::ios::badbit);
79 void open (
const char *name,
int mode,
int)
83 if (mode & std::ios::in)
84 file_id = H5Fopen (name, H5F_ACC_RDONLY, H5P_DEFAULT);
85 else if (mode & std::ios::out)
87 if (mode & std::ios::app && H5Fis_hdf5 (name) > 0)
88 file_id = H5Fopen (name, H5F_ACC_RDWR, H5P_DEFAULT);
90 file_id = H5Fcreate (name, H5F_ACC_TRUNC, H5P_DEFAULT,
94 std::ios::setstate (std::ios::badbit);
113 void open (
const char *name,
int mode = std::ios::in|std::ios::binary,
128 void open (
const char *name,
int mode = std::ios::out|std::ios::binary,
139 : name (), global (false), tc (), doc () { }
156 #if HAVE_HDF5_INT2FLOAT_CONVERSIONS
172 const std::string& name,
const std::string& doc,
173 bool mark_as_global,
bool save_as_floats);
182 read_hdf5_data (std::istream& is,
const std::string& filename,
bool& global,
188 const std::string& name,
const std::string& doc,
189 bool mark_as_global,
bool save_as_floats);
204 const char *attr_name,
void *buf);
206 #ifdef USE_64_BIT_IDX_T
207 #define H5T_NATIVE_IDX H5T_NATIVE_LONG
209 #define H5T_NATIVE_IDX H5T_NATIVE_INT