Fesapi 2.9.0.1
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
resqml2::PointsProperty Class Referenceabstract

Proxy class for an points property. More...

#include <PointsProperty.h>

Inheritance diagram for resqml2::PointsProperty:
resqml2::AbstractProperty

Public Member Functions

virtual ~PointsProperty ()=default
 
common::AbstractObject::numericalDatatypeEnum getValuesHdfDatatype () const final
 
uint64_t getValuesCountOfDimensionOfPatch (uint64_t dimIndex, uint64_t patchIndex) const final
 
uint64_t getDimensionsCountOfPatch (uint64_t patchIndex) const final
 
uint64_t getXyzPointCountOfPatch (unsigned int patchIndex) const
 
uint64_t getXyzPointCountOfAllPatches () const
 
void getXyzPointsOfPatch (unsigned int patchIndex, double *xyzPoints) const
 Gets all the xyz points of a particular patch of this property. xyz points are given in the local CRS.
 
void getXyzPointsOfPatchInGlobalCrs (unsigned int patchIndex, double *xyzPoints) const
 Gets all the xyz points of a particular patch of this property. xyz points are given in the global CRS.
 
void getXyzPointsOfAllPatches (double *xyzPoints) const
 Gets all the xyz points of all patches of this property. xyz points are given in the local CRS.
 
void getXyzPointsOfAllPatchesInGlobalCrs (double *xyzPoints) const
 
void pushBackArray1dOfXyzPoints (const double *xyzPoints, uint64_t pointCount, eml2 ::AbstractHdfProxy *proxy=nullptr)
 Adds a 1d array of points (in local CRS) to the property.
 
void pushBackArray2dOfXyzPoints (const double *xyzPoints, uint64_t pointCountInFastestDim, uint64_t pointCountInSlowestDim, eml2 ::AbstractHdfProxy *proxy=nullptr)
 Adds a 2d array of points (in local CRS) to the property.
 
void pushBackArray3dOfXyzPoints (const double *xyzPoints, uint64_t pointCountInFastestDim, uint64_t pointCountInMiddleDim, uint64_t pointCountInSlowestDim, eml2 ::AbstractHdfProxy *proxy=nullptr)
 Adds a 3d array of points (in local CRS) to the property.
 
void pushBackArrayOfXyzPoints (double const *xyzPoints, uint64_t const *pointCountByDimension, unsigned int numArrayDimensions, eml2 ::AbstractHdfProxy *proxy=nullptr)
 Adds an nd array of points (in local CRS) to the property.
 
virtual std::string pushBackRefToExistingDataset (eml2 ::AbstractHdfProxy *proxy, const std::string &datasetName="")=0
 
bool validatePropertyKindAssociation (eml2 ::PropertyKind *) final
 
bool validatePropertyKindAssociation (gsoap_resqml2_0_1::resqml20__ResqmlPropertyKind) final
 
std::string getXmlTag () const final
 
- Public Member Functions inherited from resqml2::AbstractProperty
virtual ~AbstractProperty ()=default
 
void setRepresentation (AbstractRepresentation *rep)
 
common::DataObjectReference getRepresentationDor () const
 
AbstractRepresentationgetRepresentation () const
 
unsigned int getElementCountPerValue () const
 
gsoap_eml2_3::eml23__IndexableElement getAttachmentKind () const
 
virtual uint64_t getPatchCount () const =0
 
uint64_t getValuesCountOfPatch (unsigned int patchIndex) const
 
std::vector< resqml2_0_1 ::PropertySet * > getPropertySets () const
 
uint64_t getPropertySetCount () const
 
resqml2_0_1::PropertySetgetPropertySet (uint64_t index) const
 
void setLocalCrs (class AbstractLocal3dCrs *crs)
 
class AbstractLocal3dCrsgetLocalCrs () const
 
common::DataObjectReference getLocalCrsDor () const
 
bool hasRealizationIndices () const
 
std::vector< unsigned int > getRealizationIndices () const
 
void setRealizationIndices (int64_t startRealizationIndex, int64_t countRealizationIndices)
 
void setRealizationIndices (const std::vector< unsigned int > &realizationIndices, eml2 ::AbstractHdfProxy *hdfProxy=nullptr)
 Sets the realization indices of this property.
 
void setTimeSeries (eml2 ::TimeSeries *ts)
 
void setSingleTimestamp (time_t timestamp, LONG64 yearOffset=0)
 
time_t getSingleTimestamp () const
 
eml2::TimeSeriesgetTimeSeries () const
 
common::DataObjectReference getTimeSeriesDor () const
 
bool useInterval () const
 
bool isAssociatedToOneStandardEnergisticsPropertyKind () const
 
std::string getPropertyKindDescription () const
 
std::string getPropertyKindAsString () const
 
std::string getPropertyKindParentAsString () const
 
void setPropertyKind (eml2 ::PropertyKind *propKind)
 
common::DataObjectReference getPropertyKindDor () const
 
eml2::PropertyKindgetPropertyKind () const
 
bool validate ()
 

Static Public Attributes

static const char * XML_TAG
 

Detailed Description

Proxy class for an points property.

Constructor & Destructor Documentation

◆ ~PointsProperty()

virtual resqml2::PointsProperty::~PointsProperty ( )
virtualdefault

Destructor does nothing since the memory is managed by the gsoap context.

Member Function Documentation

◆ getDimensionsCountOfPatch()

uint64_t resqml2::PointsProperty::getDimensionsCountOfPatch ( uint64_t patchIndex) const
finalvirtual

Gets the count of dimensions of the underlying HDF5 dataset of a given patch of this property.

Exceptions
std::range_errorIf patchIndex is strictly greater than patch count.
Parameters
patchIndexThe index of the patch we want to count the dimensions from.
Returns
The number of values, 0 otherwise.

Implements resqml2::AbstractProperty.

◆ getValuesCountOfDimensionOfPatch()

uint64_t resqml2::PointsProperty::getValuesCountOfDimensionOfPatch ( uint64_t dimIndex,
uint64_t patchIndex ) const
finalvirtual

Gets the count of values on a specific dimension of the underlying HDF5 dataset of a given patch of this property.

Exceptions
std::out_of_rangeIf dimIndex is strictly greater than dimension count.
std::range_errorIf patchIndex is strictly greater than patch count.
Parameters
dimIndexThe index of the dimension we want to count the values from.
patchIndexThe index of the patch we want to count the values from.
Returns
The count of values in the dimIndex dimension of patchIndex patch.

Implements resqml2::AbstractProperty.

◆ getValuesHdfDatatype()

common::AbstractObject::numericalDatatypeEnum resqml2::PointsProperty::getValuesHdfDatatype ( ) const
finalvirtual

Get the values data type in the HDF dataset

Returns
The data type of the values if successful, else UNKNOWN.

Implements resqml2::AbstractProperty.

◆ getXyzPointCountOfAllPatches()

uint64_t resqml2::PointsProperty::getXyzPointCountOfAllPatches ( ) const

Get the xyz point count of all patches of this property.

Returns
The xyz point count of all patches.

◆ getXyzPointCountOfPatch()

uint64_t resqml2::PointsProperty::getXyzPointCountOfPatch ( unsigned int patchIndex) const
inline

Get the xyz point count in a given patch of this property.

Exceptions
std::out_of_rangeIf patchIndex is out of range.
std::logic_errorIf this representation is partial.
Parameters
patchIndexZero-based index of the patch from which we look for the xyz points.
Returns
The xyz point count of the patch at position patchIndex.

◆ getXyzPointsOfAllPatches()

void resqml2::PointsProperty::getXyzPointsOfAllPatches ( double * xyzPoints) const

Gets all the xyz points of all patches of this property. xyz points are given in the local CRS.

Parameters
[out]xyzPointsA linearized 2d array where the first (quickest) dimension is the coordinate dimension (x, y or z) and second dimension is vertex dimension. It must be preallocated with a size of 3 * getXyzPointCountOfAllPatches().

◆ getXyzPointsOfAllPatchesInGlobalCrs()

void resqml2::PointsProperty::getXyzPointsOfAllPatchesInGlobalCrs ( double * xyzPoints) const

Gets all the xyz points of all patches of this property. xyz points are given in the global CRS.

Parameters
[out]xyzPointsA linearized 2d array where the first (quickest) dimension is the coordinate dimension (x, y or Z) and second dimension is vertex dimension. Thus, its size is 3*(3*[count of all xyz points]). It must be preallocated.

◆ getXyzPointsOfPatch()

void resqml2::PointsProperty::getXyzPointsOfPatch ( unsigned int patchIndex,
double * xyzPoints ) const

Gets all the xyz points of a particular patch of this property. xyz points are given in the local CRS.

Exceptions
std::out_of_rangeIf patchIndex is out of range.
std::logic_errorIf this property is partial.
Parameters
patchIndexZero-based index of the patch from which we look for the xyz points.
[out]xyzPointsA linearized 2d array where the first (quickest) dimension is the coordinate dimension (x, y or z) and second dimension is vertex dimension. It must be preallocated with a size of 3 * getXyzPointCountOfPatch(patchIndex).

◆ getXyzPointsOfPatchInGlobalCrs()

void resqml2::PointsProperty::getXyzPointsOfPatchInGlobalCrs ( unsigned int patchIndex,
double * xyzPoints ) const

Gets all the xyz points of a particular patch of this property. xyz points are given in the global CRS.

Exceptions
std::out_of_rangeIf patchIndex is out of range.
Parameters
patchIndexZero-based index of the patch from which we look for the xyz points.
[out]xyzPointsA linearized 2d array where the first (quickest) dimension is the coordinate dimension (x, y or z) and second dimension is vertex dimension. It must be preallocated with a size of 3 * getXyzPointCountOfPatch(patchIndex).

◆ pushBackArray1dOfXyzPoints()

void resqml2::PointsProperty::pushBackArray1dOfXyzPoints ( const double * xyzPoints,
uint64_t pointCount,
eml2 ::AbstractHdfProxy * proxy = nullptr )

Adds a 1d array of points (in local CRS) to the property.

Exceptions
std::invalid_argumentIf proxy is nullptr and no default HDF proxy is defined in the repository.
Parameters
xyzPointsAll the property values to set ordered according the topology of the representation it is based on.
pointCountThe number of points to write.
[in,out]proxy(Optional) The HDF proxy where to write the property points. It must be already opened for writing and won't be closed in this method. If nullptr (default value), then a default HDF proxy must be defined in the repository.

◆ pushBackArray2dOfXyzPoints()

void resqml2::PointsProperty::pushBackArray2dOfXyzPoints ( const double * xyzPoints,
uint64_t pointCountInFastestDim,
uint64_t pointCountInSlowestDim,
eml2 ::AbstractHdfProxy * proxy = nullptr )

Adds a 2d array of points (in local CRS) to the property.

Exceptions
std::invalid_argumentIf proxy is nullptr and no default HDF proxy is defined in the repository.
Parameters
xyzPointsAll the property values to set ordered according the topology of the representation it is based on.
pointCountInFastestDimThe number of points to write in the fastest dimension (mainly I dimension).
pointCountInSlowestDimThe number of points to write in the slowest dimension (mainly J dimension).
[in,out]proxy(Optional) The HDF proxy where to write the property points. It must be already opened for writing and won't be closed in this method. If nullptr (default value), then a default HDF proxy must be defined in the repository.

◆ pushBackArray3dOfXyzPoints()

void resqml2::PointsProperty::pushBackArray3dOfXyzPoints ( const double * xyzPoints,
uint64_t pointCountInFastestDim,
uint64_t pointCountInMiddleDim,
uint64_t pointCountInSlowestDim,
eml2 ::AbstractHdfProxy * proxy = nullptr )

Adds a 3d array of points (in local CRS) to the property.

Exceptions
std::invalid_argumentIf proxy is nullptr and no default HDF proxy is defined in the repository.
Parameters
xyzPointsAll the property values to set ordered according the topology of the representation it is based on.
pointCountInFastestDimThe number of points to write in the fastest dimension (mainly I dimension).
pointCountInMiddleDimThe number of points to write in the middle dimension (mainly J dimension).
pointCountInSlowestDimThe number of points to write in the slowest dimension (mainly K dimension).
[in,out]proxy(Optional) The HDF proxy where to write the property points. It must be already opened for writing and won't be closed in this method. If nullptr (default value), then a default HDF proxy must be defined in the repository.

◆ pushBackArrayOfXyzPoints()

void resqml2::PointsProperty::pushBackArrayOfXyzPoints ( double const * xyzPoints,
uint64_t const * pointCountByDimension,
unsigned int numArrayDimensions,
eml2 ::AbstractHdfProxy * proxy = nullptr )

Adds an nd array of points (in local CRS) to the property.

Exceptions
std::invalid_argumentIf proxy is nullptr and no default HDF proxy is defined in the repository.
Parameters
xyzPointsAll the property values to set ordered according the topology of the representation it is based on.
pointCountByDimensionThe number of property points ordered by dimension of the array to write.
numArrayDimensionsThe number of dimensions of the array to write.
[in,out]proxy(Optional) The HDF proxy where to write the property points. It must be already opened for writing and won't be closed in this method. If nullptr (default value), then a default HDF proxy must be defined in the repository.

◆ pushBackRefToExistingDataset()

virtual std::string resqml2::PointsProperty::pushBackRefToExistingDataset ( eml2 ::AbstractHdfProxy * proxy,
const std::string & datasetName = "" )
pure virtual

Pushes back a reference to an existing (or a "to exist") HDF dataset in a particular HDF proxy. The reason can be that the values already exist in an external file (only HDF5 for now) or that the writing of the values in the external file is differed in time.

Exceptions
std::invalid_argumentIf proxy is nullptr and no default HDF proxy is defined in the repository.
Parameters
[in]proxyThe HDF5 proxy where the values are already or will be stored. If nullptr, then a default HDF proxy must be defined in the repository.
datasetName(Optional) The HDF5 dataset name where the values are stored. If empty, the dataset will be named the same as the dataset naming convention of fesapi : getHdfGroup() + "/points_patch" + patchIndex
Returns
The name of the referenced HDF5 dataset.

◆ validatePropertyKindAssociation() [1/2]

bool resqml2::PointsProperty::validatePropertyKindAssociation ( eml2 ::PropertyKind * )
inlinefinalvirtual

Checks if it is allowed to associate a given property kind to this property. TODO : think about how to validate such a property.

Parameters
[in]pkThe local property kind to check.
Returns
True if it is allowed, false if it is not.

Implements resqml2::AbstractProperty.

◆ validatePropertyKindAssociation() [2/2]

bool resqml2::PointsProperty::validatePropertyKindAssociation ( gsoap_resqml2_0_1::resqml20__ResqmlPropertyKind )
inlinefinalvirtual

Checks if it is allowed to associate a given standard Energistics property kind to this property. TODO : think about how to validate such a property.

Parameters
pkThe standard Energistics property kind to check.
Returns
True if it is allowed, false if it is not.

Implements resqml2::AbstractProperty.

Member Data Documentation

◆ XML_TAG

const char* resqml2::PointsProperty::XML_TAG
static

The standard XML tag without XML namespace for serializing this data object.


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