|
LuciadCPillar 2026.1
|
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. | |
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.
| const std::vector< std::shared_ptr< DataAnnotation > > & luciad::DataProperty::getAnnotations | ( | ) | const |
Returns the annotations attached to this data property.
| 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.
| size_t luciad::DataProperty::getHash | ( | ) | const |
Returns the hash code.
| const std::string & luciad::DataProperty::getName | ( | ) | const |
Returns the name of the data property.
| 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.
|
static |
Creates a new DataProperty builder.
| bool luciad::DataProperty::operator!= | ( | const DataProperty & | other | ) | const |
| bool luciad::DataProperty::operator== | ( | const DataProperty & | other | ) | const |
| other | another property |