LuciadCPillar 2026.1
Loading...
Searching...
No Matches
luciad::DataProperty Class Referencefinal

Represents a property of a DataType. More...

#include <luciad/datamodels/DataProperty.h>

Classes

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

Public Member Functions

const std::vector< std::shared_ptr< DataAnnotation > > & getAnnotations () const
 Returns the annotations attached to this data property.
DataCollectionKind getCollectionKind () const
 Returns the collection type of this data property.
size_t getHash () const
 Returns the hash code.
const std::string & getName () const
 Returns the name of the data property.
const DataType & getValueType () const
 Returns the type of the value of this data property.
bool operator!= (const DataProperty &other) const
bool operator== (const DataProperty &other) const

Static Public Member Functions

static Builder newBuilder ()
 Creates a new DataProperty builder.

Detailed Description

Represents a property of a DataType.

A property has a name, a value type and a collection type. The value type indicates whether the value is a simple primitive or another data object. The collection type indicates whether the property holds a single value or a list of values of the value type (see DataCollectionKind).

Additional metadata can be attached to a property in the form of a DataAnnotation (see getAnnotations()).

New properties can be defined using a DataProperty::Builder (see newBuilder()).

Instances of this class are thread-safe. Once an instance has been created, there is no public API to modify it.

Member Function Documentation

◆ getAnnotations()

const std::vector< std::shared_ptr< DataAnnotation > > & luciad::DataProperty::getAnnotations ( ) const

Returns the annotations attached to this data property.

Returns
the annotations attached to this data property.
Since
2026.1

◆ getCollectionKind()

DataCollectionKind luciad::DataProperty::getCollectionKind ( ) const

Returns the collection type of this data property.

Defaults to DataCollectionKind::Scalar. A property built with DataCollectionKind::List holds a list of values of getValueType() rather than a single value.

Returns
the collection type of this data property.
Since
2026.1

◆ getHash()

size_t luciad::DataProperty::getHash ( ) const

Returns the hash code.

Returns
the hash code.

◆ getName()

const std::string & luciad::DataProperty::getName ( ) const

Returns the name of the data property.

Returns
the name of the data property.

◆ getValueType()

const DataType & luciad::DataProperty::getValueType ( ) const

Returns the type of the value of this data property.

For a list-typed property (see getCollectionKind()), this is the type of the elements in the list.

Returns
the type of the value of this data property.

◆ newBuilder()

Builder luciad::DataProperty::newBuilder ( )
static

Creates a new DataProperty builder.

Returns
a new DataProperty builder.

◆ operator!=()

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

◆ operator==()

bool luciad::DataProperty::operator== ( const DataProperty & other) const
Parameters
otheranother property
Returns
whether this and other have the same name, value type, collection type and annotations.