#include "HDFOI.hxx"
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <stdio.h>
#include <string>
Macros | |
#define | dir_separator '/' |
#define | MAX_STRING_SIZE 65535 |
#define | MAX_ID_SIZE 20 |
#define | NB_FLOAT_IN_ROW 3 |
#define | NB_INTEGER_IN_ROW 9 |
#define | ASCIIHDF_ID "ASCIIHDF" |
#define | ATTRIBUTE_ID "ATTRIBUTE" |
#define | DATASET_ID "DATASET" |
#define | GROUP_ID "GROUP" |
#define | ASCIIHDF_ID_END "ASCIIHDF_END" |
#define | ATTRIBUTE_ID_END "ATTRIBUTE_END" |
#define | DATASET_ID_END "DATASET_END" |
#define | GROUP_ID_END "GROUP_END" |
Functions | |
void | Move (const std::string &fName, const std::string &fNameDst) |
bool | Exists (const std::string thePath) |
bool | CreateAttributeFromASCII (HDFinternalObject *father, FILE *fp) |
bool | CreateDatasetFromASCII (HDFcontainerObject *father, FILE *fp) |
bool | CreateGroupFromASCII (HDFcontainerObject *father, FILE *fp) |
void | SaveAttributeInASCIIfile (HDFattribute *hdf_attribute, FILE *fp, int ident) |
void | SaveGroupInASCIIfile (HDFgroup *hdf_group, FILE *fp, int ident) |
void | SaveDatasetInASCIIfile (HDFdataset *hdf_dataset, FILE *fp, int ident) |
std::string | GetTmpDir () |
char * | makeName (char *name) |
char * | restoreName (char *name) |
void | write_float64 (FILE *fp, hdf_float64 *value) |
void | read_float64 (FILE *fp, hdf_float64 *value) |
void | WriteSimpleData (FILE *fp, HDFdataset *hdf_dataset, hdf_type type, long size) |
#define ASCIIHDF_ID "ASCIIHDF" |
Referenced by HDFascii::ConvertFromASCIIToHDF(), HDFascii::ConvertFromHDFToASCII(), and HDFascii::isASCII().
#define ASCIIHDF_ID_END "ASCIIHDF_END" |
Referenced by HDFascii::ConvertFromASCIIToHDF(), and HDFascii::ConvertFromHDFToASCII().
#define ATTRIBUTE_ID "ATTRIBUTE" |
#define ATTRIBUTE_ID_END "ATTRIBUTE_END" |
Referenced by CreateAttributeFromASCII(), and SaveAttributeInASCIIfile().
#define DATASET_ID "DATASET" |
Referenced by HDFascii::ConvertFromASCIIToHDF(), CreateGroupFromASCII(), and SaveDatasetInASCIIfile().
#define DATASET_ID_END "DATASET_END" |
Referenced by CreateDatasetFromASCII(), and SaveDatasetInASCIIfile().
#define dir_separator '/' |
Referenced by GetTmpDir().
#define GROUP_ID "GROUP" |
Referenced by HDFascii::ConvertFromASCIIToHDF(), CreateGroupFromASCII(), and SaveGroupInASCIIfile().
#define GROUP_ID_END "GROUP_END" |
Referenced by CreateGroupFromASCII(), and SaveGroupInASCIIfile().
#define MAX_ID_SIZE 20 |
#define MAX_STRING_SIZE 65535 |
#define NB_FLOAT_IN_ROW 3 |
Referenced by WriteSimpleData().
#define NB_INTEGER_IN_ROW 9 |
Referenced by WriteSimpleData().
bool CreateAttributeFromASCII | ( | HDFinternalObject * | father, |
FILE * | fp | ||
) |
References ATTRIBUTE_ID_END, HDFattribute::CloseOnDisk(), HDFattribute::CreateOnDisk(), HDF_FLOAT64, HDF_INT32, HDF_INT64, HDF_NAME_MAX_LEN, HDF_STRING, MAX_ID_SIZE, read_float64(), restoreName(), and HDFattribute::WriteOnDisk().
Referenced by HDFascii::ConvertFromASCIIToHDF(), CreateDatasetFromASCII(), and CreateGroupFromASCII().
bool CreateDatasetFromASCII | ( | HDFcontainerObject * | father, |
FILE * | fp | ||
) |
References ATTRIBUTE_ID, HDFarray::CloseOnDisk(), HDFdataset::CloseOnDisk(), CreateAttributeFromASCII(), HDFarray::CreateOnDisk(), HDFdataset::CreateOnDisk(), DATASET_ID_END, HDFobject::GetId(), HDF_ARRAY, HDF_CHAR, HDF_FLOAT64, HDF_INT32, HDF_INT64, HDF_NAME_MAX_LEN, HDF_STRING, MAX_ID_SIZE, read_float64(), restoreName(), HDFdataset::SetArrayId(), and HDFdataset::WriteOnDisk().
Referenced by HDFascii::ConvertFromASCIIToHDF(), and CreateGroupFromASCII().
bool CreateGroupFromASCII | ( | HDFcontainerObject * | father, |
FILE * | fp | ||
) |
bool Exists | ( | const std::string | thePath | ) |
std::string GetTmpDir | ( | ) |
References dir_separator, and Exists().
Referenced by HDFascii::ConvertFromASCIIToHDF().
Referenced by SaveAttributeInASCIIfile(), SaveDatasetInASCIIfile(), and SaveGroupInASCIIfile().
void Move | ( | const std::string & | fName, |
const std::string & | fNameDst | ||
) |
Referenced by HDFascii::ConvertFromASCIIToHDF(), and HDFascii::ConvertFromHDFToASCII().
void read_float64 | ( | FILE * | fp, |
hdf_float64 * | value | ||
) |
Referenced by CreateAttributeFromASCII(), and CreateDatasetFromASCII().
Referenced by CreateAttributeFromASCII(), CreateDatasetFromASCII(), and CreateGroupFromASCII().
void SaveAttributeInASCIIfile | ( | HDFattribute * | hdf_attribute, |
FILE * | fp, | ||
int | ident | ||
) |
References ATTRIBUTE_ID, ATTRIBUTE_ID_END, HDFattribute::CloseOnDisk(), HDFobject::GetName(), HDFattribute::GetSize(), HDFattribute::GetType(), HDF_FLOAT64, HDF_INT32, HDF_INT64, HDF_STRING, makeName(), HDFattribute::OpenOnDisk(), HDFattribute::ReadFromDisk(), and write_float64().
Referenced by HDFascii::ConvertFromHDFToASCII(), SaveDatasetInASCIIfile(), and SaveGroupInASCIIfile().
void SaveDatasetInASCIIfile | ( | HDFdataset * | hdf_dataset, |
FILE * | fp, | ||
int | ident | ||
) |
References HDFdataset::CloseOnDisk(), DATASET_ID, DATASET_ID_END, HDFdataset::GetAttributeName(), HDFarray::GetDataType(), HDFarray::GetDim(), HDFdataset::GetDim(), HDFobject::GetName(), HDFdataset::GetOrder(), HDFdataset::GetSize(), HDFdataset::GetType(), HDF_ARRAY, makeName(), HDFdataset::nAttributes(), HDFarray::nDim(), HDFdataset::nDim(), HDFdataset::OpenOnDisk(), SaveAttributeInASCIIfile(), and WriteSimpleData().
Referenced by HDFascii::ConvertFromHDFToASCII(), and SaveGroupInASCIIfile().
void SaveGroupInASCIIfile | ( | HDFgroup * | hdf_group, |
FILE * | fp, | ||
int | ident | ||
) |
References HDFgroup::CloseOnDisk(), HDFgroup::GetAttributeName(), HDFobject::GetName(), GROUP_ID, GROUP_ID_END, HDF_DATASET, HDF_GROUP, HDF_NAME_MAX_LEN, HDFgroup::InternalObjectIndentify(), HDFgroup::InternalObjectType(), makeName(), HDFgroup::nAttributes(), HDFgroup::nInternalObjects(), HDFgroup::OpenOnDisk(), SaveAttributeInASCIIfile(), and SaveDatasetInASCIIfile().
Referenced by HDFascii::ConvertFromHDFToASCII().
void write_float64 | ( | FILE * | fp, |
hdf_float64 * | value | ||
) |
Referenced by SaveAttributeInASCIIfile(), and WriteSimpleData().
void WriteSimpleData | ( | FILE * | fp, |
HDFdataset * | hdf_dataset, | ||
hdf_type | type, | ||
long | size | ||
) |
References HDF_CHAR, HDF_FLOAT64, HDF_INT32, HDF_INT64, HDF_STRING, NB_FLOAT_IN_ROW, NB_INTEGER_IN_ROW, HDFdataset::ReadFromDisk(), and write_float64().
Referenced by SaveDatasetInASCIIfile().