Fesapi  2.0.0.0
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
Public Member Functions | Static Public Attributes | List of all members
ETP_NS::EtpHdfProxy Class Reference
Inheritance diagram for ETP_NS::EtpHdfProxy:
eml2::AbstractHdfProxy eml2::EpcExternalPartReference common::AbstractObject

Public Member Functions

 EtpHdfProxy (common::DataObjectRepository *repo, const std::string &guid, const std::string &title, const std::string &packageDirAbsolutePath, const std::string &externalFilePath, common::DataObjectRepository::openingMode hdfPermissionAccess)
 
 EtpHdfProxy (gsoap_resqml2_0_1::_eml20__EpcExternalPartReference *fromGsoap)
 
 EtpHdfProxy (gsoap_eml2_1::_eml21__EpcExternalPartReference *fromGsoap)
 
 EtpHdfProxy (gsoap_resqml2_0_1::eml20__DataObjectReference *partialObject)
 
 EtpHdfProxy (const common::DataObjectReference &dor)
 
 ~EtpHdfProxy ()=default
 
std::shared_ptr< DataArrayBlockingSessiongetSession ()
 
void setSession (boost::asio::io_context &ioc, const std::string &host, const std::string &port, const std::string &target)
 
void open ()
 
bool isOpened () const
 
void close ()
 
common::AbstractObject::hdfDatatypeEnum getHdfDatatypeInDataset (const std::string &groupName)
 
int getHdfDatatypeClassInDataset (const std::string &datasetName)
 
void writeItemizedListOfList (const std::string &groupName, const std::string &name, hdf5_hid_t cumulativeLengthDatatype, const void *cumulativeLength, unsigned long long cumulativeLengthSize, hdf5_hid_t elementsDatatype, const void *elements, unsigned long long elementsSize)
 
unsigned int getDimensionCount (const std::string &datasetName)
 
std::vector< unsigned long long > getElementCountPerDimension (const std::string &datasetName)
 
signed long long getElementCount (const std::string &datasetName)
 
void setCompressionLevel (unsigned int newCompressionLevel)
 
void writeArrayNdOfFloatValues (const std::string &groupName, const std::string &name, const float *floatValues, const unsigned long long *numValuesInEachDimension, unsigned int numDimensions)
 
void writeArrayNdOfDoubleValues (const std::string &groupName, const std::string &name, const double *dblValues, const unsigned long long *numValuesInEachDimension, unsigned int numDimensions)
 
void writeArrayNdOfCharValues (const std::string &groupName, const std::string &name, const char *intValues, const unsigned long long *numValuesInEachDimension, unsigned int numDimensions)
 
void writeArrayNdOfIntValues (const std::string &groupName, const std::string &name, const int *intValues, const unsigned long long *numValuesInEachDimension, unsigned int numDimensions)
 
void writeArrayNdOfInt64Values (const std::string &groupName, const std::string &name, const int64_t *values, const unsigned long long *numValuesInEachDimension, unsigned int numDimensions)
 
void writeArrayNdOfUInt64Values (const std::string &groupName, const std::string &name, const uint64_t *values, const unsigned long long *numValuesInEachDimension, unsigned int numDimensions)
 
void writeArrayNd (const std::string &groupName, const std::string &name, hdf5_hid_t datatype, const void *values, const unsigned long long *numValuesInEachDimension, unsigned int numDimensions)
 
void createArrayNd (const std::string &groupName, const std::string &name, hdf5_hid_t datatype, const unsigned long long *numValuesInEachDimension, unsigned int numDimensions)
 
void writeArrayNdSlab (const std::string &groupName, const std::string &name, hdf5_hid_t datatype, const void *values, const unsigned long long *numValuesInEachDimension, const unsigned long long *offsetValuesInEachDimension, 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
 
int64_t 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 const *numValuesInEachDimension, unsigned long long const *offsetInEachDimension, unsigned int numDimensions)
 
void readArrayNdOfDoubleValues (const std::string &datasetName, double *values, unsigned long long const *blockCountPerDimension, unsigned long long const *offsetInEachDimension, unsigned long long const *strideInEachDimension, unsigned long long const *blockSizeInEachDimension, unsigned int numDimensions)
 
void selectArrayNdOfValues (const std::string &datasetName, unsigned long long const *blockCountPerDimension, unsigned long long const *offsetInEachDimension, unsigned long long const *strideInEachDimension, unsigned long long const *blockSizeInEachDimension, unsigned int numDimensions, bool newSelection, hdf5_hid_t &dataset, hdf5_hid_t &filespace)
 
void readArrayNdOfDoubleValues (hdf5_hid_t dataset, hdf5_hid_t 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 const *numValuesInEachDimension, unsigned long long const *offsetInEachDimension, unsigned int numDimensions)
 
void readArrayNdOfInt64Values (const std::string &datasetName, int64_t *values)
 
void readArrayNdOfInt64Values (const std::string &datasetName, int64_t *values, unsigned long long const *numValuesInEachDimension, unsigned long long const *offsetInEachDimension, unsigned int numDimensions)
 
void readArrayNdOfUInt64Values (const std::string &datasetName, uint64_t *values)
 
void readArrayNdOfIntValues (const std::string &datasetName, int *values)
 
void readArrayNdOfIntValues (const std::string &datasetName, int *values, unsigned long long const *numValuesInEachDimension, unsigned long long const *offsetInEachDimension, 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
 
bool isCompressed (const std::string &datasetName)
 
std::string getXmlNamespace () const
 
- Public Member Functions inherited from eml2::AbstractHdfProxy
virtual ~AbstractHdfProxy ()=default
 
void setRootPath (const std::string &rootPath)
 
void setRelativePath (const std::string &relPath)
 
void setOpeningMode (common::DataObjectRepository::openingMode openingMode_)
 
const std::string & getRelativePath () const
 
void initGsoapProxy (common::DataObjectRepository *repo, const std::string &guid, const std::string &title, unsigned int emlVersion)
 
- Public Member Functions inherited from eml2::EpcExternalPartReference
virtual ~EpcExternalPartReference ()=default
 
virtual std::string getXmlTag () const final
 
- Public Member Functions inherited from common::AbstractObject
bool isPartial () const
 
virtual bool isTopLevelElement () 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 getVersion () const
 
void setTitle (const std::string &title)
 
void setEditor (const std::string &editor)
 
void setCreation (time_t creation)
 
void setCreation (const tm &creation)
 
void setOriginator (const std::string &originator)
 
void setDescription (const std::string &description)
 
void setLastUpdate (time_t lastUpdate)
 
void setLastUpdate (const tm &lastUpdate)
 
void setDescriptiveKeywords (const std::string &descriptiveKeywords)
 
void setVersion (const std::string &version)
 
void setMetadata (const std::string &title, const std::string &editor, time_t creation, const std::string &originator, const std::string &description, time_t lastUpdate, const std::string &descriptiveKeywords)
 
void serializeIntoStream (std::ostream *stream)
 
void setGsoapProxy (gsoap_resqml2_0_1::eml20__AbstractCitedDataObject *gsoapProxy)
 
void setGsoapProxy (gsoap_eml2_1::eml21__AbstractObject *gsoapProxy)
 
gsoap_resqml2_0_1::eml20__AbstractCitedDataObject * getEml20GsoapProxy () const
 
gsoap_eml2_1::eml21__AbstractObject * getEml21GsoapProxy () const
 
gsoap_eml2_2::eml22__AbstractObject * getEml22GsoapProxy () const
 
void setGsoapProxy (gsoap_eml2_2::eml22__AbstractObject *gsoapProxy)
 
gsoap_eml2_3::eml23__AbstractObject * getEml23GsoapProxy () const
 
void setGsoapProxy (gsoap_eml2_3::eml23__AbstractObject *gsoapProxy)
 
soap * getGsoapContext () const
 
int getGsoapType () const
 
gsoap_resqml2_0_1::eml20__DataObjectReference * newResqmlReference () const
 
gsoap_eml2_1::eml21__DataObjectReference * newEmlReference () const
 
gsoap_eml2_2::eml22__DataObjectReference * newEml22Reference () const
 
gsoap_eml2_3::eml23__DataObjectReference * newEml23Reference () const
 
gsoap_resqml2_0_1::resqml20__ContactElementReference * newContactElementReference2_0_1 () const
 
gsoap_eml2_3::resqml22__ContactElement * newContactElementReference2_2 () const
 
common::DataObjectRepositorygetRepository () const
 
virtual std::string getXmlNamespaceVersion () const
 
virtual std::string getContentType () const
 
virtual std::string getQualifiedType () 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 (unsigned int index) const
 
std::string getAliasTitleAtIndex (unsigned int index) const
 
std::vector< eml2::Activity * > getActivitySet () const
 
unsigned int getActivityCount () const
 
eml2::ActivitygetActivity (unsigned int index) const
 
void pushBackExtraMetadata (const std::string &key, const std::string &value)
 
std::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 (unsigned int index) const
 
std::string getExtraMetadataStringValueAtIndex (unsigned int index) const
 

Static Public Attributes

static const char * XML_NS
 
- Static Public Attributes inherited from eml2::EpcExternalPartReference
static const char * XML_TAG
 

Additional Inherited Members

- Public Types inherited from common::AbstractObject
enum  hdfDatatypeEnum {
  UNKNOWN = 0 , DOUBLE = 1 , FLOAT = 2 , LONG_64 = 3 ,
  ULONG_64 = 4 , INT = 5 , UINT = 6 , SHORT = 7 ,
  USHORT = 8 , CHAR = 9 , UCHAR = 10
}
 
- Static Public Member Functions inherited from common::AbstractObject
static void setFormat (const std::string &vendor, const std::string &applicationName, const std::string &applicationVersionNumber)
 

Constructor & Destructor Documentation

◆ EtpHdfProxy() [1/3]

ETP_NS::EtpHdfProxy::EtpHdfProxy ( common::DataObjectRepository repo,
const std::string &  guid,
const std::string &  title,
const std::string &  packageDirAbsolutePath,
const std::string &  externalFilePath,
common::DataObjectRepository::openingMode  hdfPermissionAccess 
)
inline

Serialization context

◆ EtpHdfProxy() [2/3]

ETP_NS::EtpHdfProxy::EtpHdfProxy ( gsoap_resqml2_0_1::_eml20__EpcExternalPartReference *  fromGsoap)
inline

Deserialization context

◆ EtpHdfProxy() [3/3]

ETP_NS::EtpHdfProxy::EtpHdfProxy ( gsoap_resqml2_0_1::eml20__DataObjectReference *  partialObject)
inline

Only for partial transfer

◆ ~EtpHdfProxy()

ETP_NS::EtpHdfProxy::~EtpHdfProxy ( )
default

Destructor. Close the hdf file.

Member Function Documentation

◆ close()

void ETP_NS::EtpHdfProxy::close ( )
inlinevirtual

Close the file

Implements eml2::AbstractHdfProxy.

◆ createArrayNd()

void ETP_NS::EtpHdfProxy::createArrayNd ( const std::string &  groupName,
const std::string &  name,
hdf5_hid_t  datatype,
const unsigned long long *  numValuesInEachDimension,
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 eml2::AbstractHdfProxy.

◆ exist()

bool ETP_NS::EtpHdfProxy::exist ( const std::string &  absolutePathInHdfFile) const
virtual

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

Implements eml2::AbstractHdfProxy.

◆ getDimensionCount()

unsigned int ETP_NS::EtpHdfProxy::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 eml2::AbstractHdfProxy.

◆ getElementCount()

signed long long ETP_NS::EtpHdfProxy::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 eml2::AbstractHdfProxy.

◆ getElementCountPerDimension()

std::vector<unsigned long long> ETP_NS::EtpHdfProxy::getElementCountPerDimension ( const std::string &  datasetName)
virtual

Get the number of elements in each dimension in an HDF dataset of the proxy.

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

Implements eml2::AbstractHdfProxy.

◆ getHdfDatatypeClassInDataset()

int ETP_NS::EtpHdfProxy::getHdfDatatypeClassInDataset ( const std::string &  datasetName)
virtual

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

Implements eml2::AbstractHdfProxy.

◆ getHdfDatatypeInDataset()

common::AbstractObject::hdfDatatypeEnum ETP_NS::EtpHdfProxy::getHdfDatatypeInDataset ( const std::string &  datasetName)
virtual

Gets the native datatype of a dataset

Parameters
datasetNameName of the dataset.
Returns
The native HDF5 datatype identifier of the dataset if successful, otherwise returns a negative value.

Implements eml2::AbstractHdfProxy.

◆ getXmlNamespace()

std::string ETP_NS::EtpHdfProxy::getXmlNamespace ( ) const
inlinevirtual

Get the standard XML namespace for serializing this data object.

Implements common::AbstractObject.

◆ isCompressed()

bool ETP_NS::EtpHdfProxy::isCompressed ( const std::string &  datasetName)
virtual

Check wether a dataset is compressed or not.

Implements eml2::AbstractHdfProxy.

◆ isOpened()

bool ETP_NS::EtpHdfProxy::isOpened ( ) const
inlinevirtual

It is opened if the ETP session is opened

Implements eml2::AbstractHdfProxy.

◆ open()

void ETP_NS::EtpHdfProxy::open ( )
virtual

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

Implements eml2::AbstractHdfProxy.

◆ readArrayDimensions()

std::vector<unsigned long long> ETP_NS::EtpHdfProxy::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 eml2::AbstractHdfProxy.

◆ readArrayNdOfCharValues()

void ETP_NS::EtpHdfProxy::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 eml2::AbstractHdfProxy.

◆ readArrayNdOfDoubleValues() [1/4]

void ETP_NS::EtpHdfProxy::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 eml2::AbstractHdfProxy.

◆ readArrayNdOfDoubleValues() [2/4]

void ETP_NS::EtpHdfProxy::readArrayNdOfDoubleValues ( const std::string &  datasetName,
double *  values,
unsigned long long const *  blockCountPerDimension,
unsigned long long const *  offsetInEachDimension,
unsigned long long const *  strideInEachDimension,
unsigned long long const *  blockSizeInEachDimension,
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 eml2::AbstractHdfProxy.

◆ readArrayNdOfDoubleValues() [3/4]

void ETP_NS::EtpHdfProxy::readArrayNdOfDoubleValues ( const std::string &  datasetName,
double *  values,
unsigned long long const *  numValuesInEachDimension,
unsigned long long const *  offsetInEachDimension,
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 eml2::AbstractHdfProxy.

◆ readArrayNdOfDoubleValues() [4/4]

void ETP_NS::EtpHdfProxy::readArrayNdOfDoubleValues ( hdf5_hid_t  dataset,
hdf5_hid_t  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 eml2::AbstractHdfProxy.

◆ readArrayNdOfFloatValues() [1/2]

void ETP_NS::EtpHdfProxy::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 eml2::AbstractHdfProxy.

◆ readArrayNdOfFloatValues() [2/2]

void ETP_NS::EtpHdfProxy::readArrayNdOfFloatValues ( const std::string &  datasetName,
float *  values,
unsigned long long const *  numValuesInEachDimension,
unsigned long long const *  offsetInEachDimension,
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 eml2::AbstractHdfProxy.

◆ readArrayNdOfInt64Values() [1/2]

void ETP_NS::EtpHdfProxy::readArrayNdOfInt64Values ( const std::string &  datasetName,
int64_t *  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 eml2::AbstractHdfProxy.

◆ readArrayNdOfInt64Values() [2/2]

void ETP_NS::EtpHdfProxy::readArrayNdOfInt64Values ( const std::string &  datasetName,
int64_t *  values,
unsigned long long const *  numValuesInEachDimension,
unsigned long long const *  offsetInEachDimension,
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 eml2::AbstractHdfProxy.

◆ readArrayNdOfIntValues() [1/2]

void ETP_NS::EtpHdfProxy::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 eml2::AbstractHdfProxy.

◆ readArrayNdOfIntValues() [2/2]

void ETP_NS::EtpHdfProxy::readArrayNdOfIntValues ( const std::string &  datasetName,
int *  values,
unsigned long long const *  numValuesInEachDimension,
unsigned long long const *  offsetInEachDimension,
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 eml2::AbstractHdfProxy.

◆ readArrayNdOfShortValues()

void ETP_NS::EtpHdfProxy::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 eml2::AbstractHdfProxy.

◆ readArrayNdOfUCharValues()

void ETP_NS::EtpHdfProxy::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 eml2::AbstractHdfProxy.

◆ readArrayNdOfUInt64Values()

void ETP_NS::EtpHdfProxy::readArrayNdOfUInt64Values ( const std::string &  datasetName,
uint64_t *  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 eml2::AbstractHdfProxy.

◆ readArrayNdOfUIntValues()

void ETP_NS::EtpHdfProxy::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 eml2::AbstractHdfProxy.

◆ readArrayNdOfUShortValues()

void ETP_NS::EtpHdfProxy::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 eml2::AbstractHdfProxy.

◆ readDoubleAttribute()

double ETP_NS::EtpHdfProxy::readDoubleAttribute ( const std::string &  obj_name,
const std::string &  attr_name 
) const
virtual

Reads a double which is stored as an HDF5 attribute in a file, group or dataset

Exceptions
std::invalid_argumentIf the HDF5 file is not opened or if the attribute cannot be read.
Parameters
obj_nameuse "." if the attribute to read is on the file otherwise the full path of the group or dataset.
attr_nameName of the attribute.
Returns
The attribute value.

Implements eml2::AbstractHdfProxy.

◆ readLongAttribute()

int64_t ETP_NS::EtpHdfProxy::readLongAttribute ( const std::string &  obj_name,
const std::string &  attr_name 
) const
virtual

Reads a long which is stored as an HDF5 attribute in a file, group or dataset

Exceptions
std::invalid_argumentIf the HDF5 file is not opened or if the attribute cannot be read.
Parameters
obj_nameuse '.' if the attribute to read is on the file otherwise the full path of the group or dataset.
attr_nameName of the attribute.
Returns
The attribute value.

Implements eml2::AbstractHdfProxy.

◆ readStringArrayAttribute()

std::vector<std::string> ETP_NS::EtpHdfProxy::readStringArrayAttribute ( const std::string &  obj_name,
const std::string &  attr_name 
) const
virtual

Reads string values which are stored as an HDF5 attribute in a file, group or dataset

Exceptions
std::invalid_argumentIf the HDF5 file is not opened or if the attribute cannot be read.
Parameters
obj_nameUse "." if the attribute to read is on the HDF5 file otherwise the full path of the group or dataset.
attr_nameName of the attribute.
Returns
The vector of attribute values.

Implements eml2::AbstractHdfProxy.

◆ readStringAttribute()

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

Reads a string which is stored as an HDF5 attribute in a file, group or dataset

Exceptions
std::invalid_argumentIf the HDF5 file is not opened or if the attribute cannot be read.
Parameters
obj_nameUse "." if the attribute to read is on the HDF5 file otherwise the full path of the group or dataset.
attr_nameName of the attribute.
Returns
The attribute value.

Implements eml2::AbstractHdfProxy.

◆ selectArrayNdOfValues()

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

Considering a given nd array 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.

Exceptions
invalid_argumentThrown when an invalid argument error condition occurs.
Parameters
datasetNameThe name of the nd array dataset.
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 (n) of the nd array to read.
newSelectiontrue if creating a new selected region else false.
[in,out]datasetInput dataset ID if adding a new hyperslab region to an existing selected region, output dataset ID if creating a new selected region.
[in,out]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 eml2::AbstractHdfProxy.

◆ setCompressionLevel()

void ETP_NS::EtpHdfProxy::setCompressionLevel ( 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 eml2::AbstractHdfProxy.

◆ writeArrayNd()

void ETP_NS::EtpHdfProxy::writeArrayNd ( const std::string &  groupName,
const std::string &  name,
hdf5_hid_t  datatype,
const void *  values,
const unsigned long long *  numValuesInEachDimension,
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 eml2::AbstractHdfProxy.

◆ writeArrayNdOfCharValues()

void ETP_NS::EtpHdfProxy::writeArrayNdOfCharValues ( const std::string &  groupName,
const std::string &  name,
const char *  intValues,
const unsigned long long *  numValuesInEachDimension,
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 eml2::AbstractHdfProxy.

◆ writeArrayNdOfDoubleValues()

void ETP_NS::EtpHdfProxy::writeArrayNdOfDoubleValues ( const std::string &  groupName,
const std::string &  name,
const double *  dblValues,
const unsigned long long *  numValuesInEachDimension,
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 eml2::AbstractHdfProxy.

◆ writeArrayNdOfFloatValues()

void ETP_NS::EtpHdfProxy::writeArrayNdOfFloatValues ( const std::string &  groupName,
const std::string &  name,
const float *  floatValues,
const unsigned long long *  numValuesInEachDimension,
unsigned int  numDimensions 
)
virtual

Writes an nd array of float values into the HDF5 file by means of a single dataset

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

Implements eml2::AbstractHdfProxy.

◆ writeArrayNdOfInt64Values()

void ETP_NS::EtpHdfProxy::writeArrayNdOfInt64Values ( const std::string &  groupName,
const std::string &  name,
const int64_t *  values,
const unsigned long long *  numValuesInEachDimension,
unsigned int  numDimensions 
)
virtual

Writes an nd array of integer 64 values into the HDF5 file by means of a single dataset

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

Implements eml2::AbstractHdfProxy.

◆ writeArrayNdOfIntValues()

void ETP_NS::EtpHdfProxy::writeArrayNdOfIntValues ( const std::string &  groupName,
const std::string &  name,
const int *  intValues,
const unsigned long long *  numValuesInEachDimension,
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 eml2::AbstractHdfProxy.

◆ writeArrayNdOfUInt64Values()

void ETP_NS::EtpHdfProxy::writeArrayNdOfUInt64Values ( const std::string &  groupName,
const std::string &  name,
const uint64_t *  values,
const unsigned long long *  numValuesInEachDimension,
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.
uint64_tValues1d 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 eml2::AbstractHdfProxy.

◆ writeArrayNdSlab()

void ETP_NS::EtpHdfProxy::writeArrayNdSlab ( const std::string &  groupName,
const std::string &  name,
hdf5_hid_t  datatype,
const void *  values,
const unsigned long long *  numValuesInEachDimension,
const unsigned long long *  offsetValuesInEachDimension,
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 eml2::AbstractHdfProxy.

◆ writeDatasetAttribute()

void ETP_NS::EtpHdfProxy::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 eml2::AbstractHdfProxy.

◆ writeDatasetAttributes() [1/3]

void ETP_NS::EtpHdfProxy::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 eml2::AbstractHdfProxy.

◆ writeDatasetAttributes() [2/3]

void ETP_NS::EtpHdfProxy::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 eml2::AbstractHdfProxy.

◆ writeDatasetAttributes() [3/3]

void ETP_NS::EtpHdfProxy::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 eml2::AbstractHdfProxy.

◆ writeGroupAttribute()

void ETP_NS::EtpHdfProxy::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 eml2::AbstractHdfProxy.

◆ writeGroupAttributes() [1/3]

void ETP_NS::EtpHdfProxy::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 eml2::AbstractHdfProxy.

◆ writeGroupAttributes() [2/3]

void ETP_NS::EtpHdfProxy::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 eml2::AbstractHdfProxy.

◆ writeGroupAttributes() [3/3]

void ETP_NS::EtpHdfProxy::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 eml2::AbstractHdfProxy.

◆ writeItemizedListOfList()

void ETP_NS::EtpHdfProxy::writeItemizedListOfList ( const std::string &  groupName,
const std::string &  name,
hdf5_hid_t  cumulativeLengthDatatype,
const void *  cumulativeLength,
unsigned long long  cumulativeLengthSize,
hdf5_hid_t  elementsDatatype,
const void *  elements,
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 eml2::AbstractHdfProxy.

Member Data Documentation

◆ XML_NS

const char* ETP_NS::EtpHdfProxy::XML_NS
static

The standard XML namespace for serializing this data object.


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