@@ -367,79 +367,6 @@ void AbstractValuesProperty::pushBackIntegerConstantArrayOfValues(int64_t value,
367367 }
368368}
369369
370- void AbstractValuesProperty::pushBackInt32Hdf5Array1dOfValues (const int * values, uint64_t valueCount, EML2_NS::AbstractHdfProxy * proxy,
371- int nullValue)
372- {
373- pushBackInt32Hdf5ArrayOfValues (values, &valueCount, 1 , proxy, nullValue);
374- }
375-
376- void AbstractValuesProperty::pushBackInt16Hdf5Array1dOfValues (const short * values, uint64_t valueCount, EML2_NS::AbstractHdfProxy * proxy,
377- short nullValue)
378- {
379- pushBackInt16Hdf5ArrayOfValues (values, &valueCount, 1 , proxy, nullValue);
380- }
381-
382- void AbstractValuesProperty::pushBackInt8Hdf5Array1dOfValues (const int8_t * values, uint64_t valueCount, EML2_NS::AbstractHdfProxy * proxy,
383- int8_t nullValue)
384- {
385- pushBackInt8Hdf5ArrayOfValues (values, &valueCount, 1 , proxy, nullValue);
386- }
387-
388- void AbstractValuesProperty::pushBackInt32Hdf5Array2dOfValues (const int * values, uint64_t valueCountInFastestDim, uint64_t valueCountInSlowestDim, EML2_NS::AbstractHdfProxy * proxy,
389- int nullValue)
390- {
391- uint64_t valueCountPerDimension[2 ] = { valueCountInSlowestDim, valueCountInFastestDim };
392- pushBackInt32Hdf5ArrayOfValues (values, valueCountPerDimension, 2 , proxy, nullValue);
393- }
394-
395- void AbstractValuesProperty::pushBackInt16Hdf5Array2dOfValues (const short * values, uint64_t valueCountInFastestDim, uint64_t valueCountInSlowestDim, EML2_NS::AbstractHdfProxy * proxy,
396- short nullValue)
397- {
398- uint64_t valueCountPerDimension[2 ] = { valueCountInSlowestDim, valueCountInFastestDim };
399- pushBackInt16Hdf5ArrayOfValues (values, valueCountPerDimension, 2 , proxy, nullValue);
400- }
401-
402- void AbstractValuesProperty::pushBackUInt16Hdf5Array2dOfValues (const unsigned short * values, uint64_t valueCountInFastestDim, uint64_t valueCountInSlowestDim, EML2_NS::AbstractHdfProxy* proxy, unsigned short nullValue)
403- {
404- uint64_t valueCountPerDimension[2 ] = { valueCountInSlowestDim, valueCountInFastestDim };
405- pushBackUInt16Hdf5ArrayOfValues (values, valueCountPerDimension, 2 , proxy, nullValue);
406- }
407-
408- void AbstractValuesProperty::pushBackInt8Hdf5Array2dOfValues (const int8_t * values, uint64_t valueCountInFastestDim, uint64_t valueCountInSlowestDim, EML2_NS::AbstractHdfProxy * proxy,
409- int8_t nullValue)
410- {
411- uint64_t valueCountPerDimension[2 ] = { valueCountInSlowestDim, valueCountInFastestDim };
412- pushBackInt8Hdf5ArrayOfValues (values, valueCountPerDimension, 2 , proxy, nullValue);
413- }
414-
415- void AbstractValuesProperty::pushBackInt32Hdf5Array3dOfValues (const int * values, uint64_t valueCountInFastestDim, uint64_t valueCountInMiddleDim, uint64_t valueCountInSlowestDim, EML2_NS::AbstractHdfProxy * proxy,
416- int nullValue)
417- {
418- uint64_t valueCountPerDimension[3 ] = { valueCountInSlowestDim, valueCountInMiddleDim, valueCountInFastestDim };
419- pushBackInt32Hdf5ArrayOfValues (values, valueCountPerDimension, 3 , proxy, nullValue);
420- }
421-
422- void AbstractValuesProperty::pushBackInt16Hdf5Array3dOfValues (const short * values, uint64_t valueCountInFastestDim, uint64_t valueCountInMiddleDim, uint64_t valueCountInSlowestDim, EML2_NS::AbstractHdfProxy * proxy,
423- short nullValue)
424- {
425- uint64_t valueCountPerDimension[3 ] = { valueCountInSlowestDim, valueCountInMiddleDim, valueCountInFastestDim };
426- pushBackInt16Hdf5ArrayOfValues (values, valueCountPerDimension, 3 , proxy, nullValue);
427- }
428-
429- void AbstractValuesProperty::pushBackUInt16Hdf5Array3dOfValues (const unsigned short * values, uint64_t valueCountInFastestDim, uint64_t valueCountInMiddleDim, uint64_t valueCountInSlowestDim, EML2_NS::AbstractHdfProxy * proxy,
430- unsigned short nullValue)
431- {
432- uint64_t valueCountPerDimension[3 ] = { valueCountInSlowestDim, valueCountInMiddleDim, valueCountInFastestDim };
433- pushBackUInt16Hdf5ArrayOfValues (values, valueCountPerDimension, 3 , proxy, nullValue);
434- }
435-
436- void AbstractValuesProperty::pushBackInt8Hdf5Array3dOfValues (const int8_t * values, uint64_t valueCountInFastestDim, uint64_t valueCountInMiddleDim, uint64_t valueCountInSlowestDim, EML2_NS::AbstractHdfProxy * proxy,
437- int8_t nullValue)
438- {
439- uint64_t valueCountPerDimension[3 ] = { valueCountInSlowestDim, valueCountInMiddleDim, valueCountInFastestDim };
440- pushBackInt8Hdf5ArrayOfValues (values, valueCountPerDimension, 3 , proxy, nullValue);
441- }
442-
443370std::string AbstractValuesProperty::pushBackRefToExistingIntegerDataset (EML2_NS::AbstractHdfProxy* hdfProxy, const std::string & datasetName, int64_t nullValue)
444371{
445372 if (hdfProxy == nullptr ) {
@@ -550,87 +477,8 @@ std::string AbstractValuesProperty::pushBackRefToExistingFloatingPointDataset(EM
550477 throw logic_error (" Unrecognized RESQML version" );
551478}
552479
553- void AbstractValuesProperty::pushBackInt64Hdf5ArrayOfValues (const int64_t * values, const uint64_t * numValues, unsigned int numDimensionsInArray, EML2_NS::AbstractHdfProxy * proxy, int64_t nullValue)
554- {
555- if (proxy == nullptr ) {
556- proxy = getRepository ()->getDefaultHdfProxy ();
557- if (proxy == nullptr ) {
558- throw std::invalid_argument (" A (default) HDF Proxy must be provided." );
559- }
560- }
561-
562- const std::string datasetName = " values_patch" + std::to_string (getPatchCount ());
563-
564- proxy->writeArrayNd (getHdfGroup (),
565- datasetName,
566- COMMON_NS::AbstractObject::numericalDatatypeEnum::INT64,
567- values,
568- numValues, numDimensionsInArray);
569-
570- pushBackRefToExistingIntegerDataset (proxy, getHdfGroup () + " /" + datasetName, nullValue);
571- }
572-
573- void AbstractValuesProperty::pushBackInt32Hdf5ArrayOfValues (const int * values, const uint64_t * numValues, unsigned int numDimensionsInArray, EML2_NS::AbstractHdfProxy* proxy, int nullValue)
574- {
575- if (proxy == nullptr ) {
576- proxy = getRepository ()->getDefaultHdfProxy ();
577- if (proxy == nullptr ) {
578- throw std::invalid_argument (" A (default) HDF Proxy must be provided." );
579- }
580- }
581-
582- const std::string datasetName = " values_patch" + std::to_string (getPatchCount ());
583-
584- proxy->writeArrayNd (getHdfGroup (),
585- datasetName,
586- COMMON_NS::AbstractObject::numericalDatatypeEnum::INT32,
587- values,
588- numValues, numDimensionsInArray);
589-
590- pushBackRefToExistingIntegerDataset (proxy, getHdfGroup () + " /" + datasetName, nullValue);
591- }
592-
593- void AbstractValuesProperty::pushBackInt16Hdf5ArrayOfValues (const short * values, const uint64_t * numValues, unsigned int numDimensionsInArray, EML2_NS::AbstractHdfProxy* proxy, short nullValue)
594- {
595- if (proxy == nullptr ) {
596- proxy = getRepository ()->getDefaultHdfProxy ();
597- if (proxy == nullptr ) {
598- throw std::invalid_argument (" A (default) HDF Proxy must be provided." );
599- }
600- }
601-
602- const std::string datasetName = " values_patch" + std::to_string (getPatchCount ());
603-
604- proxy->writeArrayNd (getHdfGroup (),
605- datasetName,
606- COMMON_NS::AbstractObject::numericalDatatypeEnum::INT16,
607- values,
608- numValues, numDimensionsInArray);
609-
610- pushBackRefToExistingIntegerDataset (proxy, getHdfGroup () + " /" + datasetName, nullValue);
611- }
612-
613- void AbstractValuesProperty::pushBackUInt16Hdf5ArrayOfValues (const unsigned short * values, const uint64_t * numValues, unsigned int numDimensionsInArray, EML2_NS::AbstractHdfProxy* proxy, unsigned short nullValue)
614- {
615- if (proxy == nullptr ) {
616- proxy = getRepository ()->getDefaultHdfProxy ();
617- if (proxy == nullptr ) {
618- throw std::invalid_argument (" A (default) HDF Proxy must be provided." );
619- }
620- }
621-
622- const std::string datasetName = " values_patch" + std::to_string (getPatchCount ());
623-
624- proxy->writeArrayNd (getHdfGroup (),
625- datasetName,
626- COMMON_NS::AbstractObject::numericalDatatypeEnum::UINT16,
627- values,
628- numValues, numDimensionsInArray);
629-
630- pushBackRefToExistingIntegerDataset (proxy, getHdfGroup () + " /" + datasetName, nullValue);
631- }
632-
633- void AbstractValuesProperty::pushBackInt8Hdf5ArrayOfValues (const int8_t * values, const uint64_t * numValues, unsigned int numDimensionsInArray, EML2_NS::AbstractHdfProxy* proxy, int8_t nullValue)
480+ void AbstractValuesProperty::pushBackIntegerArrayOfValues (const void * values, COMMON_NS::AbstractObject::numericalDatatypeEnum numericalDatatype, const uint64_t * numValues, unsigned int numDimensionsInArray,
481+ EML2_NS::AbstractHdfProxy* proxy, int64_t nullValue)
634482{
635483 if (proxy == nullptr ) {
636484 proxy = getRepository ()->getDefaultHdfProxy ();
@@ -643,7 +491,7 @@ void AbstractValuesProperty::pushBackInt8Hdf5ArrayOfValues(const int8_t * values
643491
644492 proxy->writeArrayNd (getHdfGroup (),
645493 datasetName,
646- COMMON_NS::AbstractObject::numericalDatatypeEnum::INT8 ,
494+ numericalDatatype ,
647495 values,
648496 numValues, numDimensionsInArray);
649497
0 commit comments