21 #include "EpcExternalPartReference.h"
22 #include "../common/HidtType.h"
25 #define CUMULATIVE_LENGTH_DS_NAME "cumulativeLength"
27 #define ELEMENTS_DS_NAME "elements"
52 DLL_IMPORT_OR_EXPORT
void setRootPath(
const std::string& rootPath) { packageDirectoryAbsolutePath = rootPath; }
60 DLL_IMPORT_OR_EXPORT
void setRelativePath(
const std::string& relPath) { relativeFilePath = relPath; }
67 DLL_IMPORT_OR_EXPORT
void setOpeningMode(COMMON_NS::DataObjectRepository::openingMode openingMode_) { openingMode = openingMode_; }
75 DLL_IMPORT_OR_EXPORT
const std::string&
getRelativePath()
const {
return relativeFilePath; }
88 DLL_IMPORT_OR_EXPORT
virtual bool isOpened()
const = 0;
91 DLL_IMPORT_OR_EXPORT
virtual void close() = 0;
101 DLL_IMPORT_OR_EXPORT
virtual COMMON_NS::AbstractObject::hdfDatatypeEnum
getHdfDatatypeInDataset(
const std::string & datasetName) = 0;
131 const std::string & name,
132 hdf5_hid_t cumulativeLengthDatatype,
133 const void * cumulativeLength,
134 unsigned long long cumulativeLengthSize,
135 hdf5_hid_t elementsDatatype,
136 const void * elements,
137 unsigned long long elementsSize) = 0;
148 DLL_IMPORT_OR_EXPORT
virtual unsigned int getDimensionCount(
const std::string & datasetName) = 0;
166 DLL_IMPORT_OR_EXPORT
virtual signed long long getElementCount(
const std::string & datasetName) = 0;
191 const std::string & name,
192 const float * floatValues,
193 const unsigned long long * numValuesInEachDimension,
194 unsigned int numDimensions) = 0;
211 const std::string & name,
212 const double * dblValues,
213 const unsigned long long * numValuesInEachDimension,
214 unsigned int numDimensions) = 0;
231 const std::string & name,
232 const char * intValues,
233 const unsigned long long * numValuesInEachDimension,
234 unsigned int numDimensions) = 0;
251 const std::string & name,
252 const int * intValues,
253 const unsigned long long * numValuesInEachDimension,
254 unsigned int numDimensions) = 0;
272 const std::string & name,
273 const int64_t * values,
274 const unsigned long long * numValuesInEachDimension,
275 unsigned int numDimensions) = 0;
293 const std::string & name,
294 const uint64_t * values,
295 const unsigned long long * numValuesInEachDimension,
296 unsigned int numDimensions) = 0;
313 DLL_IMPORT_OR_EXPORT
virtual void writeArrayNd(
const std::string & groupName,
314 const std::string & name,
317 const unsigned long long * numValuesInEachDimension,
318 unsigned int numDimensions) = 0;
335 const std::string& groupName,
336 const std::string& name,
338 const unsigned long long* numValuesInEachDimension,
339 unsigned int numDimensions
358 const std::string& groupName,
359 const std::string& name,
362 const unsigned long long* numValuesInEachDimension,
363 const unsigned long long* offsetValuesInEachDimension,
364 unsigned int numDimensions
378 const std::vector<std::string> & attributeNames,
379 const std::vector<std::string> & values) = 0;
389 const std::string & attributeName,
390 const std::vector<std::string> & values) = 0;
403 const std::vector<std::string> & attributeNames,
404 const std::vector<double> & values) = 0;
417 const std::vector<std::string> & attributeNames,
418 const std::vector<int> & values) = 0;
431 const std::vector<std::string> & attributeNames,
432 const std::vector<std::string> & values) = 0;
442 const std::string & attributeName,
443 const std::vector<std::string> & values) = 0;
456 const std::vector<std::string> & attributeNames,
457 const std::vector<double> & values) = 0;
470 const std::vector<std::string> & attributeNames,
471 const std::vector<int> & values) = 0;
486 const std::string & attr_name)
const = 0;
501 const std::string & attr_name)
const = 0;
516 const std::string & attr_name)
const = 0;
531 const std::string & attr_name)
const = 0;
563 const std::string & datasetName,
565 unsigned long long const * numValuesInEachDimension,
566 unsigned long long const * offsetInEachDimension,
567 unsigned int numDimensions
594 const std::string & datasetName,
596 unsigned long long const * blockCountPerDimension,
597 unsigned long long const * offsetInEachDimension,
598 unsigned long long const * strideInEachDimension,
599 unsigned long long const * blockSizeInEachDimension,
600 unsigned int numDimensions) = 0;
633 const std::string & datasetName,
634 unsigned long long const* blockCountPerDimension,
635 unsigned long long const* offsetInEachDimension,
636 unsigned long long const* strideInEachDimension,
637 unsigned long long const* blockSizeInEachDimension,
638 unsigned int numDimensions,
640 hdf5_hid_t & dataset,
641 hdf5_hid_t & filespace) = 0;
657 hdf5_hid_t filespace,
659 unsigned long long slabSize) = 0;
691 const std::string & datasetName,
693 unsigned long long const * numValuesInEachDimension,
694 unsigned long long const * offsetInEachDimension,
695 unsigned int numDimensions
728 const std::string & datasetName,
730 unsigned long long const * numValuesInEachDimension,
731 unsigned long long const * offsetInEachDimension,
732 unsigned int numDimensions) = 0;
776 const std::string & datasetName,
778 unsigned long long const * numValuesInEachDimension,
779 unsigned long long const * offsetInEachDimension,
780 unsigned int numDimensions
847 DLL_IMPORT_OR_EXPORT
virtual std::vector<unsigned long long>
readArrayDimensions(
const std::string & datasetName) = 0;
856 DLL_IMPORT_OR_EXPORT
virtual bool exist(
const std::string & absolutePathInHdfFile)
const = 0;
867 DLL_IMPORT_OR_EXPORT
virtual bool isCompressed(
const std::string & datasetName) = 0;
879 DLL_IMPORT_OR_EXPORT
void initGsoapProxy(COMMON_NS::DataObjectRepository* repo,
const std::string& guid,
const std::string& title,
unsigned int emlVersion);
892 std::string packageDirectoryAbsolutePath;
894 std::string relativeFilePath;
896 COMMON_NS::DataObjectRepository::openingMode openingMode;
908 DLL_IMPORT_OR_EXPORT AbstractHdfProxy(
const std::string & packageDirAbsolutePath,
const std::string & externalFilePath, COMMON_NS::DataObjectRepository::openingMode hdfPermissionAccess = COMMON_NS::DataObjectRepository::openingMode::READ_ONLY) :
909 packageDirectoryAbsolutePath(packageDirAbsolutePath), relativeFilePath(externalFilePath), openingMode(hdfPermissionAccess) {}
911 AbstractHdfProxy(gsoap_resqml2_0_1::_eml20__EpcExternalPartReference* fromGsoap) :
912 EpcExternalPartReference(fromGsoap), openingMode(COMMON_NS::DataObjectRepository::openingMode::READ_ONLY) {}
914 AbstractHdfProxy(gsoap_eml2_1::_eml21__EpcExternalPartReference* fromGsoap) :
915 EpcExternalPartReference(fromGsoap), openingMode(COMMON_NS::DataObjectRepository::openingMode::READ_ONLY) {}
917 AbstractHdfProxy(gsoap_eml2_3::_eml23__EpcExternalPartReference* fromGsoap) :
918 EpcExternalPartReference(fromGsoap), openingMode(COMMON_NS::DataObjectRepository::openingMode::READ_ONLY) {}
An abstract proxy for reading and writing values into an HDF5 file. It is possible to derive this cla...
Definition: AbstractHdfProxy.h:42
virtual signed long long getElementCount(const std::string &datasetName)=0
virtual void writeDatasetAttributes(const std::string &datasetName, const std::vector< std::string > &attributeNames, const std::vector< std::string > &values)=0
virtual void writeGroupAttributes(const std::string &groupName, const std::vector< std::string > &attributeNames, const std::vector< double > &values)=0
virtual bool isOpened() const =0
virtual void readArrayNdOfDoubleValues(hdf5_hid_t dataset, hdf5_hid_t filespace, void *values, unsigned long long slabSize)=0
virtual std::vector< unsigned long long > getElementCountPerDimension(const std::string &datasetName)=0
virtual void writeArrayNdOfInt64Values(const std::string &groupName, const std::string &name, const int64_t *values, const unsigned long long *numValuesInEachDimension, unsigned int numDimensions)=0
virtual double readDoubleAttribute(const std::string &obj_name, const std::string &attr_name) const =0
const std::string & getRelativePath() const
Definition: AbstractHdfProxy.h:75
virtual 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)=0
virtual void readArrayNdOfInt64Values(const std::string &datasetName, int64_t *values)=0
virtual void writeArrayNdOfFloatValues(const std::string &groupName, const std::string &name, const float *floatValues, const unsigned long long *numValuesInEachDimension, unsigned int numDimensions)=0
virtual void writeArrayNdOfCharValues(const std::string &groupName, const std::string &name, const char *intValues, const unsigned long long *numValuesInEachDimension, unsigned int numDimensions)=0
virtual common::AbstractObject::hdfDatatypeEnum getHdfDatatypeInDataset(const std::string &datasetName)=0
virtual void readArrayNdOfUShortValues(const std::string &datasetName, unsigned short *values)=0
virtual void readArrayNdOfDoubleValues(const std::string &datasetName, double *values, unsigned long long const *numValuesInEachDimension, unsigned long long const *offsetInEachDimension, unsigned int numDimensions)=0
virtual void readArrayNdOfFloatValues(const std::string &datasetName, float *values)=0
virtual void readArrayNdOfDoubleValues(const std::string &datasetName, double *values)=0
virtual void readArrayNdOfUInt64Values(const std::string &datasetName, uint64_t *values)=0
virtual void createArrayNd(const std::string &groupName, const std::string &name, hdf5_hid_t datatype, const unsigned long long *numValuesInEachDimension, unsigned int numDimensions)=0
virtual void writeGroupAttribute(const std::string &groupName, const std::string &attributeName, const std::vector< std::string > &values)=0
virtual void readArrayNdOfIntValues(const std::string &datasetName, int *values)=0
virtual void writeDatasetAttribute(const std::string &datasetName, const std::string &attributeName, const std::vector< std::string > &values)=0
virtual void readArrayNdOfShortValues(const std::string &datasetName, short *values)=0
virtual ~AbstractHdfProxy()=default
virtual void writeGroupAttributes(const std::string &groupName, const std::vector< std::string > &attributeNames, const std::vector< int > &values)=0
virtual void readArrayNdOfInt64Values(const std::string &datasetName, int64_t *values, unsigned long long const *numValuesInEachDimension, unsigned long long const *offsetInEachDimension, unsigned int numDimensions)=0
virtual bool exist(const std::string &absolutePathInHdfFile) const =0
virtual int getHdfDatatypeClassInDataset(const std::string &datasetName)=0
virtual void writeDatasetAttributes(const std::string &datasetName, const std::vector< std::string > &attributeNames, const std::vector< double > &values)=0
virtual 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)=0
virtual unsigned int getDimensionCount(const std::string &datasetName)=0
virtual bool isCompressed(const std::string &datasetName)=0
virtual void writeArrayNdOfDoubleValues(const std::string &groupName, const std::string &name, const double *dblValues, const unsigned long long *numValuesInEachDimension, unsigned int numDimensions)=0
virtual 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)=0
virtual void readArrayNdOfFloatValues(const std::string &datasetName, float *values, unsigned long long const *numValuesInEachDimension, unsigned long long const *offsetInEachDimension, unsigned int numDimensions)=0
virtual void setCompressionLevel(unsigned int newCompressionLevel)=0
void setOpeningMode(common::DataObjectRepository::openingMode openingMode_)
Definition: AbstractHdfProxy.h:67
virtual 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)=0
virtual void readArrayNdOfIntValues(const std::string &datasetName, int *values, unsigned long long const *numValuesInEachDimension, unsigned long long const *offsetInEachDimension, unsigned int numDimensions)=0
virtual void writeDatasetAttributes(const std::string &datasetName, const std::vector< std::string > &attributeNames, const std::vector< int > &values)=0
virtual void writeArrayNdOfUInt64Values(const std::string &groupName, const std::string &name, const uint64_t *values, const unsigned long long *numValuesInEachDimension, unsigned int numDimensions)=0
virtual void readArrayNdOfCharValues(const std::string &datasetName, char *values)=0
virtual int64_t readLongAttribute(const std::string &obj_name, const std::string &attr_name) const =0
virtual std::vector< unsigned long long > readArrayDimensions(const std::string &datasetName)=0
virtual void writeArrayNdOfIntValues(const std::string &groupName, const std::string &name, const int *intValues, const unsigned long long *numValuesInEachDimension, unsigned int numDimensions)=0
void setRelativePath(const std::string &relPath)
Definition: AbstractHdfProxy.h:60
virtual void readArrayNdOfUIntValues(const std::string &datasetName, unsigned int *values)=0
virtual std::string readStringAttribute(const std::string &obj_name, const std::string &attr_name) const =0
virtual std::vector< std::string > readStringArrayAttribute(const std::string &obj_name, const std::string &attr_name) const =0
virtual void readArrayNdOfUCharValues(const std::string &datasetName, unsigned char *values)=0
virtual void writeGroupAttributes(const std::string &groupName, const std::vector< std::string > &attributeNames, const std::vector< std::string > &values)=0
void setRootPath(const std::string &rootPath)
Definition: AbstractHdfProxy.h:52
virtual 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)=0
void initGsoapProxy(common::DataObjectRepository *repo, const std::string &guid, const std::string &title, unsigned int emlVersion)
Proxy class for handling external parts of an EPC package. It must be used at least for external HDF5...
Definition: EpcExternalPartReference.h:30