Fesapi  0.13.0.0
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
COMMON_NS::HdfProxy Class Reference
Inheritance diagram for COMMON_NS::HdfProxy:
COMMON_NS::AbstractHdfProxy COMMON_NS::EpcExternalPartReference COMMON_NS::AbstractObject PRODML2_0_NS::HdfProxy RESQML2_0_1_NS::HdfProxy

Public Member Functions

 ~HdfProxy ()
 
void open ()
 
bool isOpened () const
 
void close ()
 
int getHdfDatatypeInDataset (const std::string &groupName) const
 
int getHdfDatatypeClassInDataset (const std::string &datasetName) const
 
void writeItemizedListOfList (const std::string &groupName, const std::string &name, const int &cumulativeLengthDatatype, void *cumulativeLength, const unsigned long long &cumulativeLengthSize, const int &elementsDatatype, void *elements, const unsigned long long &elementsSize)
 
unsigned int getDimensionCount (const std::string &datasetName)
 
signed long long getElementCount (const std::string &datasetName)
 
void setCompressionLevel (const unsigned int &newCompressionLevel)
 
void writeArrayNdOfFloatValues (const std::string &groupName, const std::string &name, float *floatValues, unsigned long long *numValuesInEachDimension, const unsigned int &numDimensions)
 
void writeArrayNdOfDoubleValues (const std::string &groupName, const std::string &name, double *dblValues, unsigned long long *numValuesInEachDimension, const unsigned int &numDimensions)
 
void writeArrayNdOfCharValues (const std::string &groupName, const std::string &name, char *intValues, unsigned long long *numValuesInEachDimension, const unsigned int &numDimensions)
 
void writeArrayNdOfIntValues (const std::string &groupName, const std::string &name, int *intValues, unsigned long long *numValuesInEachDimension, const unsigned int &numDimensions)
 
void writeArrayNdOfGSoapULong64Values (const std::string &groupName, const std::string &name, ULONG64 *ulong64Values, unsigned long long *numValuesInEachDimension, const unsigned int &numDimensions)
 
void writeArrayNd (const std::string &groupName, const std::string &name, const int &datatype, void *values, unsigned long long *numValuesInEachDimension, const unsigned int &numDimensions)
 
void createArrayNd (const std::string &groupName, const std::string &name, const int &datatype, unsigned long long *numValuesInEachDimension, const unsigned int &numDimensions)
 
void writeArrayNdSlab (const std::string &groupName, const std::string &name, const int &datatype, void *values, unsigned long long *numValuesInEachDimension, unsigned long long *offsetValuesInEachDimension, const unsigned int &numDimensions)
 
void writeGroupAttributes (const std::string &groupName, const std::vector< std::string > &attributeNames, const std::vector< std::string > &values)
 
void writeGroupAttribute (const std::string &groupName, const std::string &attributeName, const std::vector< std::string > &values)
 
void writeGroupAttributes (const std::string &groupName, const std::vector< std::string > &attributeNames, const std::vector< double > &values)
 
void writeGroupAttributes (const std::string &groupName, const std::vector< std::string > &attributeNames, const std::vector< int > &values)
 
void writeDatasetAttributes (const std::string &datasetName, const std::vector< std::string > &attributeNames, const std::vector< std::string > &values)
 
void writeDatasetAttribute (const std::string &datasetName, const std::string &attributeName, const std::vector< std::string > &values)
 
void writeDatasetAttributes (const std::string &datasetName, const std::vector< std::string > &attributeNames, const std::vector< double > &values)
 
void writeDatasetAttributes (const std::string &datasetName, const std::vector< std::string > &attributeNames, const std::vector< int > &values)
 
std::string readStringAttribute (const std::string &obj_name, const std::string &attr_name) const
 
std::vector< std::string > readStringArrayAttribute (const std::string &obj_name, const std::string &attr_name) const
 
double readDoubleAttribute (const std::string &obj_name, const std::string &attr_name) const
 
LONG64 readLongAttribute (const std::string &obj_name, const std::string &attr_name) const
 
void readArrayNdOfDoubleValues (const std::string &datasetName, double *values)
 
void readArrayNdOfDoubleValues (const std::string &datasetName, double *values, unsigned long long *numValuesInEachDimension, unsigned long long *offsetInEachDimension, const unsigned int &numDimensions)
 
void readArrayNdOfDoubleValues (const std::string &datasetName, double *values, unsigned long long *blockCountPerDimension, unsigned long long *offsetInEachDimension, unsigned long long *strideInEachDimension, unsigned long long *blockSizeInEachDimension, const unsigned int &numDimensions)
 
void readArrayNdOfDoubleValues (int dataset, int filespace, void *values, unsigned long long slabSize)
 
void readArrayNdOfFloatValues (const std::string &datasetName, float *values)
 
void readArrayNdOfFloatValues (const std::string &datasetName, float *values, unsigned long long *numValuesInEachDimension, unsigned long long *offsetInEachDimension, const unsigned int &numDimensions)
 
void readArrayNdOfGSoapLong64Values (const std::string &datasetName, LONG64 *values)
 
void readArrayNdOfGSoapULong64Values (const std::string &datasetName, ULONG64 *values)
 
void readArrayNdOfLongValues (const std::string &datasetName, long *values)
 
void readArrayNdOfLongValues (const std::string &datasetName, long *values, unsigned long long *numValuesInEachDimension, unsigned long long *offsetInEachDimension, const unsigned int &numDimensions)
 
void readArrayNdOfULongValues (const std::string &datasetName, unsigned long *values)
 
void readArrayNdOfIntValues (const std::string &datasetName, int *values)
 
void readArrayNdOfIntValues (const std::string &datasetName, int *values, unsigned long long *numValuesInEachDimension, unsigned long long *offsetInEachDimension, const unsigned int &numDimensions)
 
void readArrayNdOfUIntValues (const std::string &datasetName, unsigned int *values)
 
void readArrayNdOfShortValues (const std::string &datasetName, short *values)
 
void readArrayNdOfUShortValues (const std::string &datasetName, unsigned short *values)
 
void readArrayNdOfCharValues (const std::string &datasetName, char *values)
 
void readArrayNdOfUCharValues (const std::string &datasetName, unsigned char *values)
 
std::vector< unsigned long long > readArrayDimensions (const std::string &datasetName)
 
bool exist (const std::string &absolutePathInHdfFile) const
 
- Public Member Functions inherited from COMMON_NS::EpcExternalPartReference
 EpcExternalPartReference (const std::string &packageDirAbsolutePath, const std::string &externalFilePath)
 
 EpcExternalPartReference (gsoap_resqml2_0_1::_eml20__EpcExternalPartReference *fromGsoap, const std::string &packageDirAbsolutePath, const std::string &externalFilePath)
 
 EpcExternalPartReference (gsoap_eml2_1::_eml21__EpcExternalPartReference *fromGsoap, const std::string &packageDirAbsolutePath, const std::string &externalFilePath)
 
 ~EpcExternalPartReference ()
 
std::string getRelativePath () const
 
virtual std::string getXmlTag () const
 
- Public Member Functions inherited from COMMON_NS::AbstractObject
bool isPartial () const
 
std::string getUuid () const
 
std::string getTitle () const
 
std::string getEditor () const
 
time_t getCreation () const
 
tm getCreationAsTimeStructure () const
 
std::string getOriginator () const
 
std::string getDescription () const
 
time_t getLastUpdate () const
 
tm getLastUpdateAsTimeStructure () const
 
std::string getFormat () const
 
std::string getDescriptiveKeywords () const
 
std::string getVersionString () const
 
void setTitle (const std::string &title)
 
void setEditor (const std::string &editor)
 
void setCreation (const time_t &creation)
 
void setCreation (const tm &creation)
 
void setOriginator (const std::string &originator)
 
void setDescription (const std::string &description)
 
void setLastUpdate (const time_t &lastUpdate)
 
void setLastUpdate (const tm &lastUpdate)
 
void setFormat (const std::string &format)
 
void setDescriptiveKeywords (const std::string &descriptiveKeywords)
 
void setVersionString (const std::string &versionString)
 
void setMetadata (const std::string &title, const std::string &editor, const time_t &creation, const std::string &originator, const std::string &description, const time_t &lastUpdate, const std::string &format, const std::string &descriptiveKeywords)
 
void serializeIntoStream (std::ostream *stream)
 
gsoap_resqml2_0_1::eml20__AbstractCitedDataObject * getGsoapProxy () const
 
soap * getGsoapContext () const
 
int getGsoapType () const
 
gsoap_resqml2_0_1::eml20__DataObjectReference * newResqmlReference () const
 
gsoap_eml2_1::eml21__DataObjectReference * newEmlReference () const
 
gsoap_resqml2_0_1::resqml2__ContactElementReference * newResqmlContactElementReference () const
 
COMMON_NS::EpcDocumentgetEpcDocument () const
 
virtual std::string getXmlNamespace () const
 
virtual std::string getResqmlVersion () const
 
virtual std::string getContentType () const
 
virtual std::string getPartNameInEpcDocument () const
 
std::string serializeIntoString ()
 
void addAlias (const std::string &authority, const std::string &title)
 
unsigned int getAliasCount () const
 
std::string getAliasAuthorityAtIndex (const unsigned int &index) const
 
std::string getAliasTitleAtIndex (const unsigned int &index) const
 
const std::vector< RESQML2_NS::Activity * > & getActivitySet () const
 
unsigned int getActivityCount () const
 
RESQML2_NS::ActivitygetActivity (const unsigned int &index) const
 
void pushBackExtraMetadata (const std::string &key, const std::string &value)
 
std::tr1::unordered_map< std::string, std::string > getExtraMetadataSet () const
 
std::vector< std::string > getExtraMetadata (const std::string &key) const
 
unsigned int getExtraMetadataCount () const
 
std::string getExtraMetadataKeyAtIndex (const unsigned int &index) const
 
std::string getExtraMetadataStringValueAtIndex (const unsigned int &index) const
 

Protected Member Functions

 HdfProxy (gsoap_resqml2_0_1::_eml20__EpcExternalPartReference *fromGsoap, const std::string &packageDirAbsolutePath, const std::string &externalFilePath)
 
 HdfProxy (gsoap_eml2_1::_eml21__EpcExternalPartReference *fromGsoap, const std::string &packageDirAbsolutePath, const std::string &externalFilePath)
 
 HdfProxy (const std::string &packageDirAbsolutePath, const std::string &externalFilePath)
 
void readArrayNdOfValues (const std::string &datasetName, void *values, const int &datatype)
 
void readArrayNdOfValues (const std::string &datasetName, void *values, unsigned long long *numValuesInEachDimension, unsigned long long *offsetInEachDimension, const unsigned int &numDimensions, const int &datatype)
 
void readArrayNdOfValues (const std::string &datasetName, void *values, unsigned long long *blockCountPerDimension, unsigned long long *offsetInEachDimension, unsigned long long *strideInEachDimension, unsigned long long *blockSizeInEachDimension, const unsigned int &numDimensions, const int &datatype)
 
void selectArrayNdOfValues (const std::string &datasetName, unsigned long long *blockCountPerDimension, unsigned long long *offsetInEachDimension, unsigned long long *strideInEachDimension, unsigned long long *blockSizeInEachDimension, const unsigned int &numDimensions, bool newSelection, int &dataset, int &filespace)
 
void readArrayNdOfValues (int dataset, int filespace, void *values, unsigned long long slabSize, const int &datatype)
 
virtual int openOrCreateRootGroup ()
 
int openOrCreateGroupInRootGroup (const std::string &groupName)
 
- Protected Member Functions inherited from COMMON_NS::AbstractHdfProxy
 AbstractHdfProxy (const std::string &packageDirAbsolutePath, const std::string &externalFilePath)
 
 AbstractHdfProxy (gsoap_resqml2_0_1::_eml20__EpcExternalPartReference *fromGsoap, const std::string &packageDirAbsolutePath, const std::string &externalFilePath)
 
 AbstractHdfProxy (gsoap_eml2_1::_eml21__EpcExternalPartReference *fromGsoap, const std::string &packageDirAbsolutePath, const std::string &externalFilePath)
 
void initGsoapProxy (soap *soapContext, const std::string &guid, const std::string &title, const EmlVersion &emlVersion)
 
- Protected Member Functions inherited from COMMON_NS::EpcExternalPartReference
std::vector< epc::RelationshipgetAllEpcRelationships () const
 
void importRelationshipSetFromEpc (COMMON_NS::EpcDocument *epcDoc)
 
- Protected Member Functions inherited from COMMON_NS::AbstractObject
 AbstractObject ()
 Indicate whether methods update the XML (gSoap) or only the C++ classes of the API.
 
 AbstractObject (gsoap_resqml2_0_1::eml20__DataObjectReference *partialObject)
 
 AbstractObject (gsoap_resqml2_0_1::eml20__AbstractCitedDataObject *proxy)
 
 AbstractObject (gsoap_eml2_1::eml21__AbstractObject *proxy)
 
void initMandatoryMetadata ()
 
void setMetadata (const std::string &guid, const std::string &title, const std::string &editor, const time_t &creation, const std::string &originator, const std::string &description, const time_t &lastUpdate, const std::string &format, const std::string &descriptiveKeywords)
 
void cannotBePartial () const
 
void changeToPartialObject ()
 

Protected Attributes

int hdfFile
 
unsigned int compressionLevel
 
- Protected Attributes inherited from COMMON_NS::EpcExternalPartReference
std::vector< RESQML2_NS::AbstractRepresentation * > representationSourceObject
 
std::vector< RESQML2_NS::AbstractProperty * > propertySourceObject
 All the representations that use this external reference.
 
std::vector< PRODML2_0_NS::DasAcquisition * > dasAcquisitionSourceObject
 All the properties that use this external reference.
 
std::string packageDirectoryAbsolutePath
 All the DAS acquisition that use this external reference.
 
std::string relativeFilePath
 The directory where the EPC document is stored.
 
- Protected Attributes inherited from COMMON_NS::AbstractObject
gsoap_resqml2_0_1::eml20__AbstractCitedDataObject * gsoapProxy2_0_1
 
gsoap_eml2_1::eml21__AbstractObject * gsoapProxy2_1
 
COMMON_NS::EpcDocumentepcDocument
 
std::vector< RESQML2_NS::Activity * > activitySet
 
bool updateXml
 

Additional Inherited Members

- Static Public Attributes inherited from COMMON_NS::EpcExternalPartReference
static const char * XML_TAG = "EpcExternalPartReference"
 
- Protected Types inherited from COMMON_NS::AbstractObject
enum  EmlVersion { TWO_DOT_ZERO = 0, TWO_DOT_ONE = 1 }
 
- Static Protected Member Functions inherited from COMMON_NS::AbstractObject
static void addActivityToResqmlObject (RESQML2_NS::Activity *activity, AbstractObject *resqmlObject)
 

Constructor & Destructor Documentation

HdfProxy::HdfProxy ( const std::string &  packageDirAbsolutePath,
const std::string &  externalFilePath 
)
protected

Creates an instance of this class in a gsoap context. The directory where the EPC document is stored. Must end with a slash or back-slash The relative file path of the associated HDF file. It is relative to the location of the package

COMMON_NS::HdfProxy::~HdfProxy ( )
inline

Destructor. Close the hdf file.

Member Function Documentation

void HdfProxy::close ( )
virtual

Close the file

Implements COMMON_NS::AbstractHdfProxy.

void HdfProxy::createArrayNd ( const std::string &  groupName,
const std::string &  name,
const int &  datatype,
unsigned long long *  numValuesInEachDimension,
const unsigned int &  numDimensions 
)
virtual

Create an array (potentially with multi dimensions) of a specific datatype into the HDF file. Values are not yet written to this array.

Parameters
groupNameThe name of the group where to create the array of double values. This name must not contain '/' character and must be directly contained in RESQML group.
nameThe name of the array (potentially with multi dimensions) of a specific datatype hdf dataset. It must not exist.
datatypeThe specific datatype of the values to write.
numValuesInEachDimensionNumber of values in each dimension of the array to write. They are ordered from fastest index to slowest index.
numDimensionsThe number of the dimensions of the array to write.

Implements COMMON_NS::AbstractHdfProxy.

bool HdfProxy::exist ( const std::string &  absolutePathInHdfFile) const
virtual

Check wether an absolute path exists in the hdf file or not.

Implements COMMON_NS::AbstractHdfProxy.

unsigned int HdfProxy::getDimensionCount ( const std::string &  datasetName)
virtual

Get the number of dimensions in an HDF dataset of the proxy.

Parameters
datasetNameThe absolute name of the dataset we want to get the number of dimensions.

Implements COMMON_NS::AbstractHdfProxy.

hssize_t HdfProxy::getElementCount ( const std::string &  datasetName)
virtual

Get the number of elements in an HDF dataset of the proxy. The number of elements is get from all dimensions.

Parameters
datasetNameThe absolute name of the dataset we want to get the number of elements.

Implements COMMON_NS::AbstractHdfProxy.

int HdfProxy::getHdfDatatypeClassInDataset ( const std::string &  datasetName) const
virtual

Get the used datatype class in a dataset To compare with H5T_INTEGER, H5T_FLOAT , H5T_STRING , etc...

Implements COMMON_NS::AbstractHdfProxy.

int HdfProxy::getHdfDatatypeInDataset ( const std::string &  datasetName) const
virtual

Get the used (native) datatype in a dataset To compare with H5T_NATIVE_INT, H5T_NATIVE_UINT, H5T_NATIVE_FLOAT, etc...

Implements COMMON_NS::AbstractHdfProxy.

bool COMMON_NS::HdfProxy::isOpened ( ) const
inlinevirtual

Check if the Hdf file is open or not

Implements COMMON_NS::AbstractHdfProxy.

void HdfProxy::open ( )
virtual

Open the file for reading and writing. Does never overwrite an existing file but append to it if it already exists.

Implements COMMON_NS::AbstractHdfProxy.

int HdfProxy::openOrCreateGroupInRootGroup ( const std::string &  groupName)
protected

Check if an hdf group named as groupName exists in the root group. If it exists, it returns the latter. If not, it creates this group and then returns it. Please close the group after having called and used this group.

int HdfProxy::openOrCreateRootGroup ( )
protectedvirtual

Allow to force a root group for all newly created groups in inherited hdf proxies.

std::vector< hsize_t > HdfProxy::readArrayDimensions ( const std::string &  datasetName)
virtual

Read the dimensions of an array stored in a specific dataset

Parameters
datasetNameThe absolute dataset name where to read the array dimensions

Implements COMMON_NS::AbstractHdfProxy.

void HdfProxy::readArrayNdOfCharValues ( const std::string &  datasetName,
char *  values 
)
virtual

Read an array Nd of char values stored in a specific dataset.

Parameters
datasetNameThe absolute dataset name where to read the values
valuesThe values must be pre-allocated.

Implements COMMON_NS::AbstractHdfProxy.

void HdfProxy::readArrayNdOfDoubleValues ( const std::string &  datasetName,
double *  values 
)
virtual

Read an array Nd of double values stored in a specific dataset

Parameters
datasetNameThe absolute dataset name where to read the values
valuesThe values must be pre-allocated.

Implements COMMON_NS::AbstractHdfProxy.

void COMMON_NS::HdfProxy::readArrayNdOfDoubleValues ( const std::string &  datasetName,
double *  values,
unsigned long long *  numValuesInEachDimension,
unsigned long long *  offsetInEachDimension,
const unsigned int &  numDimensions 
)
virtual

Find the array associated with datasetName and read from it.

Parameters
datasetNameThe name of the array (potentially with multi dimensions).
values1d array output of double values ordered firstly by fastest direction.
numValuesInEachDimensionNumber of values in each dimension of the array to read. They are ordered from fastest index to slowest index.
offsetValuesInEachDimensionOffset values in each dimension of the array to read. They are ordered from fastest index to slowest index.
numDimensionsThe number of the dimensions of the array to read.

Implements COMMON_NS::AbstractHdfProxy.

void COMMON_NS::HdfProxy::readArrayNdOfDoubleValues ( const std::string &  datasetName,
double *  values,
unsigned long long *  blockCountPerDimension,
unsigned long long *  offsetInEachDimension,
unsigned long long *  strideInEachDimension,
unsigned long long *  blockSizeInEachDimension,
const unsigned int &  numDimensions 
)
virtual

Find the array associated with datasetName and read from it.

Parameters
datasetNameThe name of the array (potentially with multi dimensions).
values1d array output of double values ordered firstly by fastest direction.
blockCountPerDimensionNumber of blocks to select from the dataspace, in each dimension. They are ordered from fastest index to slowest index.
offsetInEachDimensionOffset values in each dimension of the array to read. They are ordered from fastest index to slowest index.
strideInEachDimensionNumber of elements to move from one block to another in each dimension. They are ordered from fastest index to slowest index.
blockSizeInEachDimensionSize of selected blocks in each dimension. They are ordered from fastest index to slowest index.
numDimensionsThe number of the dimensions of the array to read.

Implements COMMON_NS::AbstractHdfProxy.

void HdfProxy::readArrayNdOfDoubleValues ( int  dataset,
int  filespace,
void *  values,
unsigned long long  slabSize 
)
virtual

Considering a given dataset, read the double values corresponding to an existing selected region.

Parameters
datasetID of the dataset to read from.
filespaceID of the selected region.
values1d array output of double values ordered firstly by fastest direction.
slabSizeNumber of values to read.

Implements COMMON_NS::AbstractHdfProxy.

void HdfProxy::readArrayNdOfFloatValues ( const std::string &  datasetName,
float *  values 
)
virtual

Read an array Nd of float values stored in a specific dataset.

Parameters
datasetNameThe absolute dataset name where to read the values
valuesThe values must be pre-allocated.

Implements COMMON_NS::AbstractHdfProxy.

void COMMON_NS::HdfProxy::readArrayNdOfFloatValues ( const std::string &  datasetName,
float *  values,
unsigned long long *  numValuesInEachDimension,
unsigned long long *  offsetInEachDimension,
const unsigned int &  numDimensions 
)
virtual

Find the array associated with datasetName and read from it.

Parameters
datasetNameThe name of the array (potentially with multi dimensions).
values1d array output of float values ordered firstly by fastest direction.
numValuesInEachDimensionNumber of values in each dimension of the array to read. They are ordered from fastest index to slowest index.
offsetValuesInEachDimensionOffset values in each dimension of the array to read. They are ordered from fastest index to slowest index.
numDimensionsThe number of the dimensions of the array to read.

Implements COMMON_NS::AbstractHdfProxy.

void HdfProxy::readArrayNdOfGSoapLong64Values ( const std::string &  datasetName,
LONG64 *  values 
)
virtual

TODO : check all possible size of LONG64 on all different platforms

Implements COMMON_NS::AbstractHdfProxy.

void HdfProxy::readArrayNdOfGSoapULong64Values ( const std::string &  datasetName,
ULONG64 *  values 
)
virtual

TODO : check all possible size of ULONG64 on all different platforms

Implements COMMON_NS::AbstractHdfProxy.

void HdfProxy::readArrayNdOfIntValues ( const std::string &  datasetName,
int *  values 
)
virtual

Read an array Nd of int values stored in a specific dataset.

Parameters
datasetNameThe absolute dataset name where to read the values
valuesThe values must be pre-allocated.

Implements COMMON_NS::AbstractHdfProxy.

void COMMON_NS::HdfProxy::readArrayNdOfIntValues ( const std::string &  datasetName,
int *  values,
unsigned long long *  numValuesInEachDimension,
unsigned long long *  offsetInEachDimension,
const unsigned int &  numDimensions 
)
virtual

Find the array associated with datasetName and read from it.

Parameters
datasetNameThe name of the array (potentially with multi dimensions).
values1d array output of int values ordered firstly by fastest direction.
numValuesInEachDimensionNumber of values in each dimension of the array to read. They are ordered from fastest index to slowest index.
offsetValuesInEachDimensionOffset values in each dimension of the array to read. They are ordered from fastest index to slowest index.
numDimensionsThe number of the dimensions of the array to read.

Implements COMMON_NS::AbstractHdfProxy.

void HdfProxy::readArrayNdOfLongValues ( const std::string &  datasetName,
long *  values 
)
virtual

Read an array Nd of long values stored in a specific dataset.

Parameters
datasetNameThe absolute dataset name where to read the values
valuesThe values must be pre-allocated.

Implements COMMON_NS::AbstractHdfProxy.

void COMMON_NS::HdfProxy::readArrayNdOfLongValues ( const std::string &  datasetName,
long *  values,
unsigned long long *  numValuesInEachDimension,
unsigned long long *  offsetInEachDimension,
const unsigned int &  numDimensions 
)
virtual

Find the array associated with datasetName and read from it.

Parameters
datasetNameThe name of the array (potentially with multi dimensions).
values1d array output of long values ordered firstly by fastest direction.
numValuesInEachDimensionNumber of values in each dimension of the array to read. They are ordered from fastest index to slowest index.
offsetValuesInEachDimensionOffset values in each dimension of the array to read. They are ordered from fastest index to slowest index.
numDimensionsThe number of the dimensions of the array to read.

Implements COMMON_NS::AbstractHdfProxy.

void HdfProxy::readArrayNdOfShortValues ( const std::string &  datasetName,
short *  values 
)
virtual

Read an array Nd of short values stored in a specific dataset Don"t forget to delete the allocated pointer when no more necessary.

Parameters
datasetNameThe absolute dataset name where to read the values
valuesThe values must be pre-allocated.

Implements COMMON_NS::AbstractHdfProxy.

void HdfProxy::readArrayNdOfUCharValues ( const std::string &  datasetName,
unsigned char *  values 
)
virtual

Read an array Nd of unsigned char values stored in a specific dataset.

Parameters
datasetNameThe absolute dataset name where to read the values

Implements COMMON_NS::AbstractHdfProxy.

void HdfProxy::readArrayNdOfUIntValues ( const std::string &  datasetName,
unsigned int *  values 
)
virtual

Read an array Nd of unsigned int values stored in a specific dataset Don"t forget to delete the allocated pointer when no more necessary.

Parameters
datasetNameThe absolute dataset name where to read the values

Implements COMMON_NS::AbstractHdfProxy.

void HdfProxy::readArrayNdOfULongValues ( const std::string &  datasetName,
unsigned long *  values 
)
virtual

Read an array Nd of unsigned long values stored in a specific dataset.

Parameters
datasetNameThe absolute dataset name where to read the values
valuesThe values must be pre-allocated.

Implements COMMON_NS::AbstractHdfProxy.

void HdfProxy::readArrayNdOfUShortValues ( const std::string &  datasetName,
unsigned short *  values 
)
virtual

Read an array Nd of unsigned short values stored in a specific dataset.

Parameters
datasetNameThe absolute dataset name where to read the values
valuesThe values must be pre-allocated.

Implements COMMON_NS::AbstractHdfProxy.

void COMMON_NS::HdfProxy::readArrayNdOfValues ( const std::string &  datasetName,
void *  values,
const int &  datatype 
)
protected

Read an array Nd of float values stored in a specific dataset.

Parameters
datasetNameThe absolute dataset name where to read the values
valuesThe values must be pre-allocated.
datatypeThe hdf datatype of the values to read. If the values are not stored in this particular datatype, then hdf library will try to do a conversion.
void COMMON_NS::HdfProxy::readArrayNdOfValues ( const std::string &  datasetName,
void *  values,
unsigned long long *  numValuesInEachDimension,
unsigned long long *  offsetInEachDimension,
const unsigned int &  numDimensions,
const int &  datatype 
)
protected

Find the array associated with datasetName and read a portion of it.

Parameters
datasetNameThe name of the array (potentially with multi dimensions).
values1d array output of double values ordered firstly by fastest direction.
numValuesInEachDimensionNumber of values in each dimension of the array to read. They are ordered from fastest index to slowest index.
offsetValuesInEachDimensionOffset values in each dimension of the array to read. They are ordered from fastest index to slowest index.
numDimensionsThe number of the dimensions of the array to read.
datatypeThe hdf datatype of the values to read. If the values are not stored in this particular datatype, then hdf library will try to do a conversion.
void COMMON_NS::HdfProxy::readArrayNdOfValues ( const std::string &  datasetName,
void *  values,
unsigned long long *  blockCountPerDimension,
unsigned long long *  offsetInEachDimension,
unsigned long long *  strideInEachDimension,
unsigned long long *  blockSizeInEachDimension,
const unsigned int &  numDimensions,
const int &  datatype 
)
protected

Find the array associated with datasetName and read from it.

Parameters
datasetNameThe name of the array (potentially with multi dimensions).
values1d array output of values ordered firstly by fastest direction.
blockCountPerDimensionNumber of blocks to select from the dataspace, in each dimension. They are ordered from fastest index to slowest index.
offsetInEachDimensionOffset values in each dimension of the array to read. They are ordered from fastest index to slowest index.
strideInEachDimensionNumber of elements to move from one block to another in each dimension. They are ordered from fastest index to slowest index.
blockSizeInEachDimensionSize of selected blocks in each dimension. They are ordered from fastest index to slowest index.
numDimensionsThe number of the dimensions of the array to read.
datatypeThe hdf datatype of the values to read. If the values are not stored in this particular datatype, then hdf library will try to do a conversion.
void HdfProxy::readArrayNdOfValues ( int  dataset,
int  filespace,
void *  values,
unsigned long long  slabSize,
const int &  datatype 
)
protected

Considering a given dataset, read the double values corresponding to an existing selected region.

Parameters
datasetID of the dataset to read from.
filespaceID of the selected region.
values1d array output of double values ordered firstly by fastest direction.
slabSizeNumber of values to read.
datatypeThe hdf datatype of the values to read. If the values are not stored in this particular datatype, then hdf library will try to do a conversion.
double HdfProxy::readDoubleAttribute ( const std::string &  obj_name,
const std::string &  attr_name 
) const
virtual

Read a double which is stored as an HDF attribute in a file, group or dataset

Parameters
obj_nameuse '.' if the attribute to read is on the file otherwise the full path

Implements COMMON_NS::AbstractHdfProxy.

LONG64 HdfProxy::readLongAttribute ( const std::string &  obj_name,
const std::string &  attr_name 
) const
virtual

Read a long which is stored as an HDF attribute in a file, group or dataset

Parameters
obj_nameuse '.' if the attribute to read is on the file otherwise the full path

Implements COMMON_NS::AbstractHdfProxy.

std::string HdfProxy::readStringAttribute ( const std::string &  obj_name,
const std::string &  attr_name 
) const
virtual

Read a string which is stored as an HDF attribute in a file, group or dataset

Parameters
obj_nameuse '.' if the attribute to read is on the file otherwise the full path

Implements COMMON_NS::AbstractHdfProxy.

void HdfProxy::selectArrayNdOfValues ( const std::string &  datasetName,
unsigned long long *  blockCountPerDimension,
unsigned long long *  offsetInEachDimension,
unsigned long long *  strideInEachDimension,
unsigned long long *  blockSizeInEachDimension,
const unsigned int &  numDimensions,
bool  newSelection,
int &  dataset,
int &  filespace 
)
protectedvirtual

Considering a given dataset, this method selects an hyperslab region to add to an existing selected region or to add to a new selected region. The dataset is not closed within this method.

Parameters
datasetNameThe name of the array (potentially with multi dimensions).
blockCountPerDimensionNumber of blocks to select from the dataspace, in each dimension. They are ordered from fastest index to slowest index.
offsetInEachDimensionOffset values in each dimension of the array to read. They are ordered from fastest index to slowest index.
strideInEachDimensionNumber of elements to move from one block to another in each dimension. They are ordered from fastest index to slowest index.
blockSizeInEachDimensionSize of selected blocks in each dimension. They are ordered from fastest index to slowest index.
numDimensionsThe number of the dimensions of the array to select.
newSelectiontrue if creating a new selected region else false.
datasetInput dataset ID if adding a new hyperslab region to an existing selected region, output dataset ID if creating a new selected region.
filespaceInput selected region ID if adding a new hyperslab region to an existing selected region, output selected region ID if creating a new selected region.

Implements COMMON_NS::AbstractHdfProxy.

void COMMON_NS::HdfProxy::setCompressionLevel ( const unsigned int &  newCompressionLevel)
inlinevirtual

Set the new compression level which will be used for all data to be written

Parameters
compressionLevelLower compression levels are faster but result in less compression. Range [0..9] is allowed.

Implements COMMON_NS::AbstractHdfProxy.

void HdfProxy::writeArrayNd ( const std::string &  groupName,
const std::string &  name,
const int &  datatype,
void *  values,
unsigned long long *  numValuesInEachDimension,
const unsigned int &  numDimensions 
)
virtual

Write an array (potentially with multi dimensions) of a specific datatype into the HDF file by means of a single dataset.

Parameters
groupNameThe name of the group where to create the array of values. This name must not contain '/' character and must be directly contained in RESQML group.
nameThe name of the array (potentially with multi dimensions) of a specific datatype hdf dataset. It must not already exist.
datatypeThe specific datatype of the values to write.
values1d array of specific datatype ordered firstly by fastest direction.
numValuesInEachDimensionNumber of values in each dimension of the array to write. They are ordered from fastest index to slowest index.
numDimensionsThe number of the dimensions of the array to write

Implements COMMON_NS::AbstractHdfProxy.

void HdfProxy::writeArrayNdOfCharValues ( const std::string &  groupName,
const std::string &  name,
char *  intValues,
unsigned long long *  numValuesInEachDimension,
const unsigned int &  numDimensions 
)
virtual

Write an array (potentially with multi dimensions) of char values into the HDF file by means of a single dataset.

Parameters
groupNameThe name of the group where to create the array of int values. This name must not contain '/' character and must be directly contained in RESQML group.
nameThe name of the array of int values hdf dataset. It must not already exist.
intValues1d array of char values ordered firstly by fastest direction.
numValuesInEachDimensionNumber of values in each dimension of the array to write. They are ordered from fastest index to slowest index.
numDimensionsThe number of the dimensions of the array to write

Implements COMMON_NS::AbstractHdfProxy.

void HdfProxy::writeArrayNdOfDoubleValues ( const std::string &  groupName,
const std::string &  name,
double *  dblValues,
unsigned long long *  numValuesInEachDimension,
const unsigned int &  numDimensions 
)
virtual

Write an array (potentially with multi dimensions) of double values into the HDF file by means of a single dataset.

Parameters
groupNameThe name of the group where to create the array of double values. This name must not contain '/' character and must be directly contained in RESQML group.
nameThe name of the array of double values hdf dataset. It must not already exist.
dblValues1d array of double values ordered firstly by fastest direction.
numValuesInEachDimensionNumber of values in each dimension of the array to write. They are ordered from fastest index to slowest index.
numDimensionsThe number of the dimensions of the array to write

Implements COMMON_NS::AbstractHdfProxy.

void HdfProxy::writeArrayNdOfGSoapULong64Values ( const std::string &  groupName,
const std::string &  name,
ULONG64 *  ulong64Values,
unsigned long long *  numValuesInEachDimension,
const unsigned int &  numDimensions 
)
virtual

Write an array (potentially with multi dimensions) of gSoap unsigned long 64 values into the HDF file by means of a single dataset.

Parameters
groupNameThe name of the group where to create the array of int values. This name must not contain '/' character and must be directly contained in RESQML group.
nameThe name of the array of gSoap unsigned long 64 values hdf dataset. It must not already exist.
ulong64Values1d array of gSoap unsigned long 64 values ordered firstly by fastest direction.
numValuesInEachDimensionNumber of values in each dimension of the array to write. They are ordered from fastest index to slowest index.
numDimensionsThe number of the dimensions of the array to write

Implements COMMON_NS::AbstractHdfProxy.

void HdfProxy::writeArrayNdOfIntValues ( const std::string &  groupName,
const std::string &  name,
int *  intValues,
unsigned long long *  numValuesInEachDimension,
const unsigned int &  numDimensions 
)
virtual

Write an array (potentially with multi dimensions) of int values into the HDF file by means of a single dataset.

Parameters
groupNameThe name of the group where to create the array of int values. This name must not contain '/' character and must be directly contained in RESQML group.
nameThe name of the array of int values hdf dataset. It must not already exist.
intValues1d array of int values ordered firstly by fastest direction.
numValuesInEachDimensionNumber of values in each dimension of the array to write. They are ordered from fastest index to slowest index.
numDimensionsThe number of the dimensions of the array to write

Implements COMMON_NS::AbstractHdfProxy.

void HdfProxy::writeArrayNdSlab ( const std::string &  groupName,
const std::string &  name,
const int &  datatype,
void *  values,
unsigned long long *  numValuesInEachDimension,
unsigned long long *  offsetValuesInEachDimension,
const unsigned int &  numDimensions 
)
virtual

Find the array associated with groupName and name and write to it.

Parameters
groupNameThe name of the group associated with the array.
nameThe name of the array (potentially with multi dimensions).
datatypeThe specific datatype of the values to write.
values1d array of specific datatype ordered firstly by fastest direction.
numValuesInEachDimensionNumber of values in each dimension of the array to write. They are ordered from fastest index to slowest index.
offsetValuesInEachDimensionOffset values in each dimension of the array to write. They are ordered from fastest index to slowest index.
numDimensionsThe number of the dimensions of the array to write.

Implements COMMON_NS::AbstractHdfProxy.

void HdfProxy::writeDatasetAttribute ( const std::string &  datasetName,
const std::string &  attributeName,
const std::vector< std::string > &  values 
)
virtual

Write a single attribute which contain an array of strings

Implements COMMON_NS::AbstractHdfProxy.

void HdfProxy::writeDatasetAttributes ( const std::string &  datasetName,
const std::vector< std::string > &  attributeNames,
const std::vector< std::string > &  values 
)
virtual

Write some string attributes into a dataset

Implements COMMON_NS::AbstractHdfProxy.

void HdfProxy::writeDatasetAttributes ( const std::string &  datasetName,
const std::vector< std::string > &  attributeNames,
const std::vector< double > &  values 
)
virtual

Write some double attributes into a dataset

Implements COMMON_NS::AbstractHdfProxy.

void HdfProxy::writeDatasetAttributes ( const std::string &  datasetName,
const std::vector< std::string > &  attributeNames,
const std::vector< int > &  values 
)
virtual

Write some int attributes into a dataset

Implements COMMON_NS::AbstractHdfProxy.

void HdfProxy::writeGroupAttribute ( const std::string &  groupName,
const std::string &  attributeName,
const std::vector< std::string > &  values 
)
virtual

Write a single attribute which contain an array of strings

Implements COMMON_NS::AbstractHdfProxy.

void HdfProxy::writeGroupAttributes ( const std::string &  groupName,
const std::vector< std::string > &  attributeNames,
const std::vector< std::string > &  values 
)
virtual

Write some string attributes into a group

Implements COMMON_NS::AbstractHdfProxy.

void HdfProxy::writeGroupAttributes ( const std::string &  groupName,
const std::vector< std::string > &  attributeNames,
const std::vector< double > &  values 
)
virtual

Write some double attributes into a group

Implements COMMON_NS::AbstractHdfProxy.

void HdfProxy::writeGroupAttributes ( const std::string &  groupName,
const std::vector< std::string > &  attributeNames,
const std::vector< int > &  values 
)
virtual

Write some int attributes into a group

Implements COMMON_NS::AbstractHdfProxy.

void HdfProxy::writeItemizedListOfList ( const std::string &  groupName,
const std::string &  name,
const int &  cumulativeLengthDatatype,
void *  cumulativeLength,
const unsigned long long &  cumulativeLengthSize,
const int &  elementsDatatype,
void *  elements,
const unsigned long long &  elementsSize 
)
virtual

Write an itemized list of list into the HDF file by means of a single group containing 2 datasets.

Parameters
groupNameThe name of the group where to create the itemized list of list. This name must not contain '/' character and must be directly contained in RESQML group.
nameThe name of the itemized list of list hdf group.
cumulativeLengthDatatypeThe datatype of the cumulative length to write.
cumulativeLength1d array of positive integers containing for each list the sum of all the previous list lengths including the current one
cumulativeLengthSizeSize of the cumulativeLength array.
elementsDatatypeThe datatype of the elements to write.
elements1d array of elements containing the aggregation of individual list content.
elementsSizeSize of the elements array.

Implements COMMON_NS::AbstractHdfProxy.


The documentation for this class was generated from the following files: