xentara-plugin v1.2.1
The Xentara Plugin Framework
Loading...
Searching...
No Matches
xentara::data::DataType Class Referencefinal

A custom type. More...

#include <data/DataType.hpp>

Public Member Functions

constexpr DataType (const utils::core::Uuid &uuid, std::string_view name)
 Constructor.
 
auto name () const -> const std::string_view &
 Gets the name.
 
auto uuid () const -> const utils::core::Uuid &
 Gets the UUID.
 
auto operator== (const DataType &rhs) const -> bool
 Checks whether a reference refers to this data type.
 

Static Public Attributes

static const DataType kInteger
 An integer value.
 
static const DataType kFloatingPoint
 A floating point value.
 
static const DataType kBoolean
 A Boolean value.
 
static const DataType kString
 A text string.
 
static const DataType kRawData
 A raw data block.
 
static const DataType kTimeStamp
 A time stamp.
 
static const DataType kUuid
 A uuid.
 
static const DataType kQuality
 A data point quality value.
 
static const DataType kErrorCode
 An error code.
 

Detailed Description

A custom type.

Constructor & Destructor Documentation

◆ DataType()

constexpr xentara::data::DataType::DataType ( const utils::core::Uuid uuid,
std::string_view  name 
)
constexpr

Constructor.

Parameters
uuidThe UUID of the attribute
nameThe human name of the data type, in UTF-8 encoding. The string data the view references to is not copied. It must remain valid for the lifetime of the plugin.

Member Function Documentation

◆ name()

auto xentara::data::DataType::name ( ) const -> const std::string_view &

Gets the name.

Returns
The name, in UTF-8 encoding

◆ operator==()

auto xentara::data::DataType::operator== ( const DataType rhs) const -> bool

Checks whether a reference refers to this data type.

This operator checks the identity of the objects, not the properties. The operator returns true only if the rhs refers to the same object as this. It is equivalent to this == std::addressof(rhs).

Returns
Returns true if the attribute has the given name.

◆ uuid()

auto xentara::data::DataType::uuid ( ) const -> const utils::core::Uuid &

Gets the UUID.

Member Data Documentation

◆ kBoolean

const DataType xentara::data::DataType::kBoolean
static

A Boolean value.

◆ kErrorCode

const DataType xentara::data::DataType::kErrorCode
static

An error code.

◆ kFloatingPoint

const DataType xentara::data::DataType::kFloatingPoint
static

A floating point value.

Examples
PublishingConfigAttributes.cpp.

◆ kInteger

const DataType xentara::data::DataType::kInteger
static

An integer value.

◆ kQuality

const DataType xentara::data::DataType::kQuality
static

A data point quality value.

◆ kRawData

const DataType xentara::data::DataType::kRawData
static

A raw data block.

◆ kString

const DataType xentara::data::DataType::kString
static

A text string.

◆ kTimeStamp

const DataType xentara::data::DataType::kTimeStamp
static

A time stamp.

◆ kUuid

const DataType xentara::data::DataType::kUuid
static

A uuid.