LuciadCPillar 2023.1.04
luciad::DataModel Class Referencefinal

A data model is a collection of types that forms a logical entity. More...

#include <luciad/datamodels/DataModel.h>

Classes

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

Public Member Functions

std::optional< DataTypefindDataType (const std::string &name) const
 Searches for a data type by name. More...
 
const std::vector< DataType > & getDataTypes () const
 Gets the data types of this data model. More...
 
size_t getHash () const
 
const std::string & getName () const
 Gets the name of this data model. More...
 
bool operator!= (const DataModel &other) const
 
bool operator== (const DataModel &other) const
 

Static Public Member Functions

static DataModel getCoreDataModel ()
 Gets a data model containing the supported DataProperty value types. More...
 
static Builder newBuilder ()
 Creates a new builder. More...
 

Detailed Description

A data model is a collection of types that forms a logical entity.

Conceptually this is similar to a UML package or an XML schema.

A data model is identified by its name. Two data models are considered to be equal if they have the same name and data types.

DataModel provides access to its types (see getDataTypes()).

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

Data models are created using a DataModel::Builder (see newBuilder()).

Member Function Documentation

◆ findDataType()

std::optional< DataType > luciad::DataModel::findDataType ( const std::string &  name) const

Searches for a data type by name.

Parameters
namethe name for a data type.
Returns
the data type named name, if such a type exists in this data model.

◆ getCoreDataModel()

static DataModel luciad::DataModel::getCoreDataModel ( )
static

Gets a data model containing the supported DataProperty value types.

Returns
a data model containing the supported DataProperty value types.

◆ getDataTypes()

const std::vector< DataType > & luciad::DataModel::getDataTypes ( ) const

Gets the data types of this data model.

Returns
the data types of this data model.

◆ getHash()

size_t luciad::DataModel::getHash ( ) const

◆ getName()

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

Gets the name of this data model.

Returns
the name of this data model.

◆ newBuilder()

static Builder luciad::DataModel::newBuilder ( )
static

Creates a new builder.

Returns
a new builder.

◆ operator!=()

bool luciad::DataModel::operator!= ( const DataModel other) const

◆ operator==()

bool luciad::DataModel::operator== ( const DataModel other) const