LuciadCPillar 2023.1.04
|
A representation of the type of a data object. More...
#include <luciad/datamodels/DataType.h>
Classes | |
class | Builder |
Builder that allows DataType instances to be created. More... | |
Public Member Functions | |
std::optional< DataProperty > | findDataProperty (const std::string &name) const |
Searches for a data property by name. More... | |
const std::vector< std::shared_ptr< DataAnnotation > > & | getAnnotations () const |
const std::vector< DataProperty > & | getDataProperties () const |
size_t | getHash () const |
const std::string & | getName () const |
bool | hasDataProperty (const DataProperty &property) const |
Checks if the given property is declared in this data type. More... | |
bool | isPrimitive () const |
bool | operator!= (const DataType &other) const |
bool | operator== (const DataType &other) const |
Static Public Member Functions | |
static const DataType & | getBooleanType () |
static const DataType & | getDoubleType () |
static const DataType & | getFloatType () |
static const DataType & | getGeometryType () |
static const DataType & | getIntType () |
static const DataType & | getLongType () |
static const DataType & | getStringType () |
static Builder | newBuilder () |
Creates a new DataType builder. More... | |
A representation of the type of a data object.
A type describes the structure of a data object as a list of properties. Each of these properties is itself of a certain type.
A type is either a primitive type or a data object type. Primitive types are types which have no internal structure (no properties) and typically represent simple object such as strings, numbers etc. All primitive types are accessible from this class (see e.g. getIntType(), getStringType() ...).
Application-specific metadata can be attached to a type in the form of a DataAnnotation.
New types can be defined using a DataType::Builder (see newBuilder()).
Instances of this class are thread safe. Once an instance has been created, there is no public API to modify it.
std::optional< DataProperty > luciad::DataType::findDataProperty | ( | const std::string & | name | ) | const |
Searches for a data property by name.
name | the name of a property |
const std::vector< std::shared_ptr< DataAnnotation > > & luciad::DataType::getAnnotations | ( | ) | const |
|
static |
bool
values. const std::vector< DataProperty > & luciad::DataType::getDataProperties | ( | ) | const |
|
static |
double
values.
|
static |
float
values.
|
static |
size_t luciad::DataType::getHash | ( | ) | const |
|
static |
int32_t
values.
|
static |
int64_t
values. const std::string & luciad::DataType::getName | ( | ) | const |
|
static |
std::string
values. bool luciad::DataType::hasDataProperty | ( | const DataProperty & | property | ) | const |
Checks if the given property is declared in this data type.
property | Data property. |
bool luciad::DataType::isPrimitive | ( | ) | const |
|
static |
bool luciad::DataType::operator!= | ( | const DataType & | other | ) | const |
bool luciad::DataType::operator== | ( | const DataType & | other | ) | const |
other | another data type. |