LuciadCPillar 2024.0.08
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
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
 Returns the data types of this data model. More...
 
size_t getHash () const
 Returns the hash code. More...
 
const std::string & getName () const
 Returns 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 ()
 Returns the data model containing the core 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

Returns the data model containing the core DataProperty value types.

Returns
the data model containing the core DataProperty value types.

◆ getDataTypes()

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

Returns the data types of this data model.

Returns
the data types of this data model.

◆ getHash()

size_t luciad::DataModel::getHash ( ) const

Returns the hash code.

Returns
the hash code.

◆ getName()

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

Returns 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