LuciadCPillar 2026.1.02
Loading...
Searching...
No Matches
luciad::DataPropertyPath Class Referencefinal

Describes the path to a DataProperty in a DataType. More...

#include <luciad/datamodels/DataPropertyPath.h>

Classes

class  Builder
 Builder that allows DataPropertyPath instances to be created. More...

Public Member Functions

Builder asBuilder () const
 Returns a builder with the current data property path.
size_t getHash () const
 Returns the hash code.
DataType getOriginType () const
 Returns the type of data object that this path accesses.
std::optional< DataProperty > getTargetProperty () const
 Returns the property that this path points to (the property at the end of the path).
DataCollectionKind getValueCollectionKind () const
 Returns the collection kind of the value that this path points to.
DataType getValueType () const
 Returns the value type of the property that this path points to.
bool operator!= (const DataPropertyPath &other) const
bool operator== (const DataPropertyPath &other) const

Static Public Member Functions

static Builder newBuilder ()
 Creates a new builder.

Detailed Description

Describes the path to a DataProperty in a DataType.

It can also describe paths to nested properties. The path is related to a specific DataType (its getOriginType) and is used to address values in data objects of that type.

A path may also address values in list-typed properties (see DataCollectionKind):

  • Without an index step, it addresses the list.
  • With a Builder::index step, it addresses a single list element.

getValueCollectionKind reports which shape the target property has.

Restrictions:

  • A path may cross at most one list (Builder::index can be called at most once on a builder).
  • After a list-typed property step, the path must either be terminated or followed by Builder::index. It cannot descend into the list's element type.
  • Builder::index is terminal: no further property or index step may be added after it. Multi-level access into composite list elements is done by retrieving the element as a separate object and building a new path on that.

Member Function Documentation

◆ asBuilder()

Builder luciad::DataPropertyPath::asBuilder ( ) const

Returns a builder with the current data property path.

Returns
a builder with the current data property path.

◆ getHash()

size_t luciad::DataPropertyPath::getHash ( ) const

Returns the hash code.

Returns
the hash code.

◆ getOriginType()

DataType luciad::DataPropertyPath::getOriginType ( ) const

Returns the type of data object that this path accesses.

Returns
the type of data object that this path accesses.

◆ getTargetProperty()

std::optional< DataProperty > luciad::DataPropertyPath::getTargetProperty ( ) const

Returns the property that this path points to (the property at the end of the path).

For a path with a terminal index step, this is the list property that the index applies to. For an empty path (origin type only, no property steps), this has no value.

Returns
the target property, or no value if this path has no property steps.
Since
2026.1

◆ getValueCollectionKind()

DataCollectionKind luciad::DataPropertyPath::getValueCollectionKind ( ) const

Returns the collection kind of the value that this path points to.

The result reflects the kind of value:

  • Scalar for a path that points to a scalar property (including an element inside a list).
  • List for a path that points to a list.

Defaults to Scalar for empty paths (originType only).

Returns
the collection kind of the value at this path.
Since
2026.1

◆ getValueType()

DataType luciad::DataPropertyPath::getValueType ( ) const

Returns the value type of the property that this path points to.

For a list-typed leaf (list or indexed element), this is the element type.

Returns
the value type of the property that this path points to.

◆ newBuilder()

Builder luciad::DataPropertyPath::newBuilder ( )
static

Creates a new builder.

Returns
a new builder.

◆ operator!=()

bool luciad::DataPropertyPath::operator!= ( const DataPropertyPath & other) const

◆ operator==()

bool luciad::DataPropertyPath::operator== ( const DataPropertyPath & other) const