diff options
Diffstat (limited to 'modules/hdf5/includes')
-rwxr-xr-x | modules/hdf5/includes/HDF5Objects.h | 31 | ||||
-rwxr-xr-x | modules/hdf5/includes/dynlib_hdf5_scilab.h | 28 | ||||
-rwxr-xr-x | modules/hdf5/includes/gw_hdf5.h | 60 | ||||
-rwxr-xr-x | modules/hdf5/includes/h5_attributeConstants.h | 53 | ||||
-rwxr-xr-x | modules/hdf5/includes/h5_fileManagement.h | 24 | ||||
-rwxr-xr-x | modules/hdf5/includes/h5_readDataFromFile.h | 81 | ||||
-rwxr-xr-x | modules/hdf5/includes/h5_readDataFromFile_v1.h | 77 | ||||
-rwxr-xr-x | modules/hdf5/includes/h5_writeDataToFile.h | 57 | ||||
-rwxr-xr-x | modules/hdf5/includes/import_from_hdf5_v1.hxx | 13 | ||||
-rwxr-xr-x | modules/hdf5/includes/listvar_in_hdf5_v1.hxx | 13 |
10 files changed, 437 insertions, 0 deletions
diff --git a/modules/hdf5/includes/HDF5Objects.h b/modules/hdf5/includes/HDF5Objects.h new file mode 100755 index 000000000..def807870 --- /dev/null +++ b/modules/hdf5/includes/HDF5Objects.h @@ -0,0 +1,31 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + */ + +#ifndef __HDF5OBJECTS_H__ +#define __HDF5OBJECTS_H__ + +#define H5_NO_DEPRECATED_SYMBOLS +#undef H5_USE_16_API + +#define H5Eset_auto_vers 2 +#include <hdf5.h> +#include <hdf5_hl.h> + +#undef H5_NO_DEPRECATED_SYMBOLS + +//#define __HDF5OBJECTS_DEBUG__ +//#define __HDF5ERROR_PRINT__ + +#define __SCILAB_MLIST_H5OBJECT__ "H5Object" +#define __SCILAB_HDF5_MAX_DIMS__ 64 + +#endif // __HDF5OBJECTS_H__ diff --git a/modules/hdf5/includes/dynlib_hdf5_scilab.h b/modules/hdf5/includes/dynlib_hdf5_scilab.h new file mode 100755 index 000000000..9baa8ffee --- /dev/null +++ b/modules/hdf5/includes/dynlib_hdf5_scilab.h @@ -0,0 +1,28 @@ +/* +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) DIGITEO - 2009 - Allan CORNET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +*/ + +/*--------------------------------------------------------------------------*/ +#ifndef __DYNLIB_HDF5_SCILAB_H__ +#define __DYNLIB_HDF5_SCILAB_H__ + +#ifdef _MSC_VER +#ifdef HDF5_SCILAB_EXPORTS +#define HDF5_SCILAB_IMPEXP __declspec(dllexport) +#else +#define HDF5_SCILAB_IMPEXP __declspec(dllimport) +#endif +#else +#define HDF5_SCILAB_IMPEXP +#endif + +#endif /* __DYNLIB_HDF5_SCILAB_H__ */ +/*--------------------------------------------------------------------------*/ diff --git a/modules/hdf5/includes/gw_hdf5.h b/modules/hdf5/includes/gw_hdf5.h new file mode 100755 index 000000000..190c88f2f --- /dev/null +++ b/modules/hdf5/includes/gw_hdf5.h @@ -0,0 +1,60 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2009 - DIGITEO - Allan CORNET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + */ +/*--------------------------------------------------------------------------*/ +#ifndef __GW_HDF5_H__ +#define __GW_HDF5_H__ +/*--------------------------------------------------------------------------*/ +#include "dynlib_hdf5_scilab.h" +/*--------------------------------------------------------------------------*/ +HDF5_SCILAB_IMPEXP int gw_hdf5(void); +/*--------------------------------------------------------------------------*/ +HDF5_SCILAB_IMPEXP int sci_export_to_hdf5(char *fname, unsigned long fname_len); +HDF5_SCILAB_IMPEXP int sci_import_from_hdf5(char *fname, unsigned long fname_len); +HDF5_SCILAB_IMPEXP int sci_listvar_in_hdf5(char *fname, unsigned long fname_len); +HDF5_SCILAB_IMPEXP int sci_is_hdf5_file(char *fname, unsigned long fname_len); +HDF5_SCILAB_IMPEXP int sci_h5dump(char *fname, unsigned long fname_len); +HDF5_SCILAB_IMPEXP int sci_h5open(char *fname, unsigned long fname_len); +HDF5_SCILAB_IMPEXP int sci_h5close(char *fname, unsigned long fname_len); +HDF5_SCILAB_IMPEXP int sci_h5read(char *fname, unsigned long fname_len); +HDF5_SCILAB_IMPEXP int sci_h5ls(char *fname, unsigned long fname_len); +HDF5_SCILAB_IMPEXP int sci_percent_H5Object_p(char *fname, unsigned long fname_len); +HDF5_SCILAB_IMPEXP int sci_percent_H5Object_e(char *fname, unsigned long fname_len); +HDF5_SCILAB_IMPEXP int sci_h5group(char *fname, unsigned long fname_len); +HDF5_SCILAB_IMPEXP int sci_h5rm(char *fname, unsigned long fname_len); +HDF5_SCILAB_IMPEXP int sci_h5dataset(char *fname, unsigned long fname_len); +HDF5_SCILAB_IMPEXP int sci_h5write(char *fname, unsigned long fname_len); +HDF5_SCILAB_IMPEXP int sci_h5attr(char *fname, unsigned long fname_len); +HDF5_SCILAB_IMPEXP int sci_h5ln(char *fname, unsigned long fname_len); +HDF5_SCILAB_IMPEXP int sci_h5readattr(char *fname, unsigned long fname_len); +HDF5_SCILAB_IMPEXP int sci_h5flush(char *fname, unsigned long fname_len); +HDF5_SCILAB_IMPEXP int sci_h5cp(char *fname, unsigned long fname_len); +HDF5_SCILAB_IMPEXP int sci_h5isFile(char *fname, unsigned long fname_len); +HDF5_SCILAB_IMPEXP int sci_h5isGroup(char *fname, unsigned long fname_len); +HDF5_SCILAB_IMPEXP int sci_h5isSet(char *fname, unsigned long fname_len); +HDF5_SCILAB_IMPEXP int sci_h5isAttr(char *fname, unsigned long fname_len); +HDF5_SCILAB_IMPEXP int sci_h5isSpace(char *fname, unsigned long fname_len); +HDF5_SCILAB_IMPEXP int sci_h5isType(char *fname, unsigned long fname_len); +HDF5_SCILAB_IMPEXP int sci_h5isRef(char *fname, unsigned long fname_len); +HDF5_SCILAB_IMPEXP int sci_h5isList(char *fname, unsigned long fname_len); +HDF5_SCILAB_IMPEXP int sci_h5mount(char *fname, unsigned long fname_len); +HDF5_SCILAB_IMPEXP int sci_h5umount(char *fname, unsigned long fname_len); +HDF5_SCILAB_IMPEXP int sci_h5mv(char *fname, unsigned long fname_len); +HDF5_SCILAB_IMPEXP int sci_h5get(char *fname, unsigned long fname_len); +HDF5_SCILAB_IMPEXP int sci_h5label(char *fname, unsigned long fname_len); +HDF5_SCILAB_IMPEXP int sci_h5exists(char *fname, unsigned long fname_len); +HDF5_SCILAB_IMPEXP int sci_h5isCompound(char *fname, unsigned long fname_len); +HDF5_SCILAB_IMPEXP int sci_percent_H5Object_fieldnames(char *fname, unsigned long fname_len); +HDF5_SCILAB_IMPEXP int sci_h5isArray(char *fname, unsigned long fname_len); +HDF5_SCILAB_IMPEXP int sci_h5isVlen(char *fname, unsigned long fname_len); +/*--------------------------------------------------------------------------*/ +#endif /* __GW_HDF5_H__ */ +/*--------------------------------------------------------------------------*/ diff --git a/modules/hdf5/includes/h5_attributeConstants.h b/modules/hdf5/includes/h5_attributeConstants.h new file mode 100755 index 000000000..c701827c3 --- /dev/null +++ b/modules/hdf5/includes/h5_attributeConstants.h @@ -0,0 +1,53 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2012 - Scilab Enterprises - Antoine ELIAS + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + */ + +#ifndef __H5_ATTRIBUTECONSTATS_H__ +#define __H5_ATTRIBUTECONSTATS_H__ + +#define SOD_FILE_VERSION 2 + +static const char g_SCILAB_CLASS[] = "SCILAB_Class"; +static const char g_SCILAB_CLASS_EMPTY[] = "SCILAB_empty"; +static const char g_SCILAB_CLASS_VARNAME[] = "SCILAB_varname"; +static const char g_SCILAB_CLASS_COMPLEX[] = "SCILAB_complex"; +static const char g_SCILAB_CLASS_PREC[] = "SCILAB_precision"; +static const char g_SCILAB_CLASS_ROWS[] = "SCILAB_rows"; +static const char g_SCILAB_CLASS_COLS[] = "SCILAB_cols"; +static const char g_SCILAB_CLASS_ITEMS[] = "SCILAB_items"; +static const char g_SCILAB_CLASS_SOD_VERSION[] = "SCILAB_sod_version"; +static const char g_SCILAB_CLASS_SCI_VERSION[] = "SCILAB_scilab_version"; + + +static const char g_SCILAB_CLASS_DOUBLE[] = "double"; +static const char g_SCILAB_CLASS_STRING[] = "string"; +static const char g_SCILAB_CLASS_BOOLEAN[] = "boolean"; +static const char g_SCILAB_CLASS_INT[] = "integer"; +static const char g_SCILAB_CLASS_POLY[] = "polynomial"; +static const char g_SCILAB_CLASS_SPARSE[] = "sparse"; +static const char g_SCILAB_CLASS_BSPARSE[] = "boolean sparse"; +static const char g_SCILAB_CLASS_LIST[] = "list"; +static const char g_SCILAB_CLASS_TLIST[] = "tlist"; +static const char g_SCILAB_CLASS_MLIST[] = "mlist"; +static const char g_SCILAB_CLASS_VOID[] = "void"; +static const char g_SCILAB_CLASS_UNDEFINED[] = "undefined"; + +//integer precision +#define SCI_INT8 1 +#define SCI_INT16 2 +#define SCI_INT32 4 +#define SCI_INT64 8 +#define SCI_UINT8 11 +#define SCI_UINT16 12 +#define SCI_UINT32 14 +#define SCI_UINT64 18 + +#endif /* !__H5_ATTRIBUTECONSTATS_H__ */ diff --git a/modules/hdf5/includes/h5_fileManagement.h b/modules/hdf5/includes/h5_fileManagement.h new file mode 100755 index 000000000..9c2c3a795 --- /dev/null +++ b/modules/hdf5/includes/h5_fileManagement.h @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2012 - Scilab Enterprises - Antoine ELIAS + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + */ + +#ifndef __H5_FILEMANAGEMENT_H__ +#define __H5_FILEMANAGEMENT_H__ + +#include "dynlib_hdf5_scilab.h" + +HDF5_SCILAB_IMPEXP void HDF5cleanup(void); +HDF5_SCILAB_IMPEXP int createHDF5File(char *name); +HDF5_SCILAB_IMPEXP int openHDF5File(char *name, int _iAppendMode); +HDF5_SCILAB_IMPEXP void closeHDF5File(int file); +HDF5_SCILAB_IMPEXP int isHDF5File(char* _pstFilename); + +#endif /* !__H5_FILEMANAGEMENT_H__ */ diff --git a/modules/hdf5/includes/h5_readDataFromFile.h b/modules/hdf5/includes/h5_readDataFromFile.h new file mode 100755 index 000000000..e204494e8 --- /dev/null +++ b/modules/hdf5/includes/h5_readDataFromFile.h @@ -0,0 +1,81 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2012 - Scilab Enterprises - Antoine ELIAS + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + */ + +#ifndef __H5_READDATATOFILE_H__ +#define __H5_READDATATOFILE_H__ + +#include <hdf5.h> +#include "dynlib_hdf5_scilab.h" + + +#define unknow_type -2 +#define sci_undefined -1 +#define sci_void 0 + +char* getScilabVersionAttribute(int _iFile); +int getSODFormatAttribute(int _iFile); + +HDF5_SCILAB_IMPEXP int isComplexData(int _iDatasetId); + +HDF5_SCILAB_IMPEXP int getVariableNames(int _iFile, char **pstNameList); + +HDF5_SCILAB_IMPEXP int getDataSetId(int _iFile); + +HDF5_SCILAB_IMPEXP int getDataSetIdFromName(int _iFile, char *_pstName); +HDF5_SCILAB_IMPEXP void closeDataSet(int _id); + +HDF5_SCILAB_IMPEXP int getDatasetInfo(int _iDatasetId, int* _iComplex, int* _iDims, int* _piDims); +HDF5_SCILAB_IMPEXP int getDatasetDims(int _iDatasetId, int *_piRows, int *_piCols); +HDF5_SCILAB_IMPEXP int getListDims(int _iDatasetId, int *_piItem); + +HDF5_SCILAB_IMPEXP int getScilabTypeFromDataSet(int _iDatasetId); + +HDF5_SCILAB_IMPEXP int getDatasetPrecision(int _iDatasetId, int* _piPrec); + +HDF5_SCILAB_IMPEXP int getSparseDimension(int _iDatasetId, int* _piRows, int * _piCols, int* _piNbItem); + +HDF5_SCILAB_IMPEXP int readEmptyMatrix(int _iDatasetId); + +HDF5_SCILAB_IMPEXP int readDoubleMatrix(int _iDatasetId, double *_pdblData); +HDF5_SCILAB_IMPEXP int readDoubleComplexMatrix(int _iDatasetId, double *_pdblReal, double *_pdblImg); + +HDF5_SCILAB_IMPEXP int readStringMatrix(int _iDatasetId, char **_pstData); +HDF5_SCILAB_IMPEXP int freeStringMatrix(int _iDatasetId, char** _pstData); + +HDF5_SCILAB_IMPEXP int readBooleanMatrix(int _iDatasetId, int* _piData); + +HDF5_SCILAB_IMPEXP int readPolyMatrix(int _iDatasetId, char* _pstVarname, int _iDims, int* _piDims, int* _piNbCoef, double **_pdblData); +HDF5_SCILAB_IMPEXP int readPolyComplexMatrix(int _iDatasetId, char* _pstVarname, int _iDims, int* _piDims, int* _piNbCoef, double **_pdblReal, double **_pdblImg); + +HDF5_SCILAB_IMPEXP int readInteger8Matrix(int _iDatasetId, char* _pcData); +HDF5_SCILAB_IMPEXP int readInteger16Matrix(int _iDatasetId, short* _psData); +HDF5_SCILAB_IMPEXP int readInteger32Matrix(int _iDatasetId, int* _piData); +HDF5_SCILAB_IMPEXP int readInteger64Matrix(int _iDatasetId, long long* _pllData); + +HDF5_SCILAB_IMPEXP int readUnsignedInteger8Matrix(int _iDatasetId, unsigned char* _pucData); +HDF5_SCILAB_IMPEXP int readUnsignedInteger16Matrix(int _iDatasetId, unsigned short* _pusData); +HDF5_SCILAB_IMPEXP int readUnsignedInteger32Matrix(int _iDatasetId, unsigned int* _puiData); +HDF5_SCILAB_IMPEXP int readUnsignedInteger64Matrix(int _iDatasetId, unsigned long long* _pullData); + +HDF5_SCILAB_IMPEXP int readSparseComplexMatrix(int _iDatasetId, int _iRows, int _iCols, int _iNbItem, int* _piNbItemRow, int* _piColPos, double *_pdblReal, double *_pdblImg); +HDF5_SCILAB_IMPEXP int readSparseMatrix(int _iDatasetId, int _iRows, int _iCols, int _iNbItem, int* _piNbItemRow, int* _piColPos, double *_pdblReal); + +HDF5_SCILAB_IMPEXP int readBooleanSparseMatrix(int _iDatasetId, int _iRows, int _iCols, int _iNbItem, int* _piNbItemRow, int* _piColPos); + +HDF5_SCILAB_IMPEXP int getListItemReferences(int _iDatasetId, hobj_ref_t** _piItemRef); + +HDF5_SCILAB_IMPEXP int getListItemDataset(int _iDatasetId, void* _piItemRef, int _iItemPos, int* _piItemDataset); + +HDF5_SCILAB_IMPEXP int deleteListItemReferences(int _iDatasetId, void* _piItemRef); + +HDF5_SCILAB_IMPEXP void reset_item_count(); +#endif /* !__H5_READDATATOFILE_H__ */ diff --git a/modules/hdf5/includes/h5_readDataFromFile_v1.h b/modules/hdf5/includes/h5_readDataFromFile_v1.h new file mode 100755 index 000000000..b06575bc8 --- /dev/null +++ b/modules/hdf5/includes/h5_readDataFromFile_v1.h @@ -0,0 +1,77 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2012 - Scilab Enterprises - Antoine ELIAS + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + */ + +#ifndef __H5_READDATATOFILE_V1_H__ +#define __H5_READDATATOFILE_V1_H__ + +#include <hdf5.h> +#include "dynlib_hdf5_scilab.h" + + +#define unknow_type -2 +#define sci_undefined -1 +#define sci_void 0 + +HDF5_SCILAB_IMPEXP int isComplexData_v1(int _iDatasetId); + +HDF5_SCILAB_IMPEXP int getVariableNames_v1(int _iFile, char **pstNameList); + +HDF5_SCILAB_IMPEXP int getDataSetId_v1(int _iFile); + +HDF5_SCILAB_IMPEXP int getDataSetIdFromName_v1(int _iFile, char *_pstName); +HDF5_SCILAB_IMPEXP void closeDataSet_v1(int _id); + +HDF5_SCILAB_IMPEXP int getDatasetDims_v1(int _iDatasetId, int *_piRows, int *_piCols); +HDF5_SCILAB_IMPEXP int getListDims_v1(int _iDatasetId, int *_piItem); + +HDF5_SCILAB_IMPEXP int getScilabTypeFromDataSet_v1(int _iDatasetId); + +HDF5_SCILAB_IMPEXP int getDatasetPrecision_v1(int _iDatasetId, int* _piPrec); + +HDF5_SCILAB_IMPEXP int getSparseDimension_v1(int _iDatasetId, int* _piRows, int * _piCols, int* _piNbItem); + +HDF5_SCILAB_IMPEXP int readEmptyMatrix_v1(int _iDatasetId); + +HDF5_SCILAB_IMPEXP int readDoubleMatrix_v1(int _iDatasetId, int _iRows, int _iCols, double *_pdblData); +HDF5_SCILAB_IMPEXP int readDoubleComplexMatrix_v1(int _iDatasetId, int _iRows, int _iCols, double *_pdblReal, double *_pdblImg); + +HDF5_SCILAB_IMPEXP int readStringMatrix_v1(int _iDatasetId, int _iRows, int _iCols, char **_pstData); + +HDF5_SCILAB_IMPEXP int readBooleanMatrix_v1(int _iDatasetId, int _iRows, int _iCols, int* _piData); + +HDF5_SCILAB_IMPEXP int readPolyMatrix_v1(int _iDatasetId, char* _pstVarname, int _iRows, int _iCols, int* _piNbCoef, double **_pdblData); +HDF5_SCILAB_IMPEXP int readPolyComplexMatrix_v1(int _iDatasetId, char* _pstVarname, int _iRows, int _iCols, int* _piNbCoef, double **_pdblReal, double **_pdblImg); + +HDF5_SCILAB_IMPEXP int readInteger8Matrix_v1(int _iDatasetId, int _iRows, int _iCols, char* _pcData); +HDF5_SCILAB_IMPEXP int readInteger16Matrix_v1(int _iDatasetId, int _iRows, int _iCols, short* _psData); +HDF5_SCILAB_IMPEXP int readInteger32Matrix_v1(int _iDatasetId, int _iRows, int _iCols, int* _piData); +HDF5_SCILAB_IMPEXP int readInteger64Matrix_v1(int _iDatasetId, int _iRows, int _iCols, long long* _pllData); + +HDF5_SCILAB_IMPEXP int readUnsignedInteger8Matrix_v1(int _iDatasetId, int _iRows, int _iCols, unsigned char* _pucData); +HDF5_SCILAB_IMPEXP int readUnsignedInteger16Matrix_v1(int _iDatasetId, int _iRows, int _iCols, unsigned short* _pusData); +HDF5_SCILAB_IMPEXP int readUnsignedInteger32Matrix_v1(int _iDatasetId, int _iRows, int _iCols, unsigned int* _puiData); +HDF5_SCILAB_IMPEXP int readUnsignedInteger64Matrix_v1(int _iDatasetId, int _iRows, int _iCols, unsigned long long* _pullData); + +HDF5_SCILAB_IMPEXP int readSparseComplexMatrix_v1(int _iDatasetId, int _iRows, int _iCols, int _iNbItem, int* _piNbItemRow, int* _piColPos, double *_pdblReal, double *_pdblImg); +HDF5_SCILAB_IMPEXP int readSparseMatrix_v1(int _iDatasetId, int _iRows, int _iCols, int _iNbItem, int* _piNbItemRow, int* _piColPos, double *_pdblReal); + +HDF5_SCILAB_IMPEXP int readBooleanSparseMatrix_v1(int _iDatasetId, int _iRows, int _iCols, int _iNbItem, int* _piNbItemRow, int* _piColPos); + +HDF5_SCILAB_IMPEXP int getListItemReferences_v1(int _iDatasetId, hobj_ref_t** _piItemRef); + +HDF5_SCILAB_IMPEXP int getListItemDataset_v1(int _iDatasetId, void* _piItemRef, int _iItemPos, int* _piItemDataset); + +HDF5_SCILAB_IMPEXP int deleteListItemReferences_v1(int _iDatasetId, void* _piItemRef); + +HDF5_SCILAB_IMPEXP void reset_item_count(); + +#endif /* !__H5_READDATATOFILE_V1_H__ */ diff --git a/modules/hdf5/includes/h5_writeDataToFile.h b/modules/hdf5/includes/h5_writeDataToFile.h new file mode 100755 index 000000000..ab55730a8 --- /dev/null +++ b/modules/hdf5/includes/h5_writeDataToFile.h @@ -0,0 +1,57 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2012 - Scilab Enterprises - Antoine ELIAS + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + */ + +#ifndef __H5_WRITEDATATOFILE_H__ +#define __H5_WRITEDATATOFILE_H__ + +#include "dynlib_hdf5_scilab.h" + +HDF5_SCILAB_IMPEXP int updateFileVersion(int _iFile); +HDF5_SCILAB_IMPEXP int updateScilabVersion(int _iFile); + +HDF5_SCILAB_IMPEXP char* createGroupName(char* _pstGroupName); +HDF5_SCILAB_IMPEXP char* createPathName(char* _pstGroupName, int _iIndex); +HDF5_SCILAB_IMPEXP int deleteHDF5Var(int _iFile, char* _pstName); + +HDF5_SCILAB_IMPEXP int writeDoubleMatrix(int _iFile, char* _pstDatasetName, int _iDims, int* _piDims, double *_pdblData); +HDF5_SCILAB_IMPEXP int writeDoubleComplexMatrix(int _iFile, char* _pstDatasetName, int _iDims, int* _piDims, double *_pdblReal, double *_pdblImg); + +HDF5_SCILAB_IMPEXP int writeStringMatrix(int _iFile, char* _pstDatasetName, int _iDims, int* _piDims, char **_pstData); + +HDF5_SCILAB_IMPEXP int writeBooleanMatrix(int _iFile, char* _pstDatasetName, int _iDims, int* _piDims, int *_piData); + +HDF5_SCILAB_IMPEXP int writePolyMatrix(int _iFile, char* _pstDatasetName, char* _pstVarName, int _iDims, int* _piDims, int* _piNbCoef, double** _pdblData); +HDF5_SCILAB_IMPEXP int writePolyComplexMatrix(int _iFile, char* _pstDatasetName, char* _pstVarName, int _iDims, int* _piDims, int* _piNbCoef, double** _pdblReal, double** _pdblImg); + +HDF5_SCILAB_IMPEXP int writeInteger8Matrix(int _iFile, char* _pstDatasetName, int _iDims, int* _piDims, char* _piData8); +HDF5_SCILAB_IMPEXP int writeInteger16Matrix(int _iFile, char* _pstDatasetName, int _iDims, int* _piDims, short* _piData16); +HDF5_SCILAB_IMPEXP int writeInteger32Matrix(int _iFile, char* _pstDatasetName, int _iDims, int* _piDims, int* _piData32); +HDF5_SCILAB_IMPEXP int writeInteger64Matrix(int _iFile, char* _pstDatasetName, int _iDims, int* _piDims, long long* _piData64); + +HDF5_SCILAB_IMPEXP int writeUnsignedInteger8Matrix(int _iFile, char* _pstDatasetName, int _iDims, int* _piDims, unsigned char* _piData8); +HDF5_SCILAB_IMPEXP int writeUnsignedInteger16Matrix(int _iFile, char* _pstDatasetName, int _iDims, int* _piDims, unsigned short* _piData16); +HDF5_SCILAB_IMPEXP int writeUnsignedInteger32Matrix(int _iFile, char* _pstDatasetName, int _iDims, int* _piDims, unsigned int* _piData32); +HDF5_SCILAB_IMPEXP int writeUnsignedInteger64Matrix(int _iFile, char* _pstDatasetName, int _iDims, int* _piDims, unsigned long long* _piData64); + +HDF5_SCILAB_IMPEXP int writeSparseMatrix(int _iFile, char* _pstDatasetName, int _iRows, int _iCols, int _iNbItem, int* _piNbItemRow, int* _piColPos, double* _pdblReal); +HDF5_SCILAB_IMPEXP int writeSparseComplexMatrix(int _iFile, char* _pstDatasetName, int _iRows, int _iCols, int _iNbItem, int* _piNbItemRow, int* _piColPos, double* _pdblReal, double* _pdblImg); + +HDF5_SCILAB_IMPEXP int writeBooleanSparseMatrix(int _iFile, char* _pstDatasetName, int _iRows, int _iCols, int _iNbItem, int* _piNbItemRow, int* _piColPos); + +HDF5_SCILAB_IMPEXP int writeVoid(int _iFile, char* _pstDatasetName); +HDF5_SCILAB_IMPEXP int writeUndefined(int _iFile, char* _pstDatasetName); + +HDF5_SCILAB_IMPEXP void* openList(int _iFile, char* pstDatasetName, int _iNbItem); +HDF5_SCILAB_IMPEXP int addItemInList(int _iFile, void* _pvList, int _iPos, char* _pstItemName); +HDF5_SCILAB_IMPEXP int closeList(int _iFile, void* _pvList, char* _pstListName, int _iNbItem, int _iVarType); + +#endif /* !__H5_WRITEDATATOFILE_H__ */ diff --git a/modules/hdf5/includes/import_from_hdf5_v1.hxx b/modules/hdf5/includes/import_from_hdf5_v1.hxx new file mode 100755 index 000000000..29ccc9b28 --- /dev/null +++ b/modules/hdf5/includes/import_from_hdf5_v1.hxx @@ -0,0 +1,13 @@ +/* +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Antoine ELIAS +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +*/ + +int sci_import_from_hdf5_v1(char *fname, unsigned long fname_len); diff --git a/modules/hdf5/includes/listvar_in_hdf5_v1.hxx b/modules/hdf5/includes/listvar_in_hdf5_v1.hxx new file mode 100755 index 000000000..b7e1bc32d --- /dev/null +++ b/modules/hdf5/includes/listvar_in_hdf5_v1.hxx @@ -0,0 +1,13 @@ +/* +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Antoine ELIAS +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +*/ + +int sci_listvar_in_hdf5_v1(char *fname, unsigned long fname_len); |