xentara-workbench-plugin v1.0.1
The Xentara Workbench Plugin Framework
Loading...
Searching...
No Matches
xentara::workbench::data Namespace Reference

Facilities for describing the data contained in Xentara attributes. More...

Classes

class  DataType
 A complete data type, including bit size information. More...
 

Enumerations

enum class  PrimitiveType {
  Boolean , Integer , UnsignedInteger , FloatingPoint ,
  String , TimePoint , Uuid , Quality ,
  ElementCategory , ErrorCode , Custom , Unknown
}
 PrimitiveType types used in attributes. More...
 

Functions

constexpr auto defaultBitSize (PrimitiveType primitiveType) noexcept -> int
 Gets a suitable default bit size for a primitive type.
 
constexpr auto correctedBitSize (PrimitiveType primitiveType, int bitSize) noexcept -> int
 Adjusts a bit size to be suitable a primitive type.
 

Detailed Description

Facilities for describing the data contained in Xentara attributes.

This namespace contains types used to describe the data type of the values of Xentara attributes.

Enumeration Type Documentation

◆ PrimitiveType

PrimitiveType types used in attributes.

PrimitiveType types to not include the bit width of integers and floating point numbers

Include file
#include <xentara/workbench/data/PrimitiveType.hpp>
Enumerator
Boolean 

A Boolean value.

Integer 

A signed integer value.

UnsignedInteger 

An unsigned integer value.

FloatingPoint 

A floating point value.

String 

A unicode string value.

For this type, the bit size will be 8, 16, or 32 to denote UTF-8, UTF-16, and UTF-32 encoding, respectively. 
TimePoint 

A point in time, like a time stamp.

Uuid 

A UUID.

Quality 

A Xentara quality value.

ElementCategory 

A Xentara element category.

ErrorCode 

A symbolic error code.

Custom 

A custom type defined by a skill.

Unknown 

The data type is unknown.

Function Documentation

◆ correctedBitSize()

constexpr auto xentara::workbench::data::correctedBitSize ( PrimitiveType  primitiveType,
int  bitSize 
) -> int
constexprnoexcept

Adjusts a bit size to be suitable a primitive type.

This function corrects the bit size to be a suitable bit size for the given primitive type. The function does the following:

◆ defaultBitSize()

constexpr auto xentara::workbench::data::defaultBitSize ( PrimitiveType  primitiveType) -> int
constexprnoexcept

Gets a suitable default bit size for a primitive type.

The return bit size is as follows:

PrimitiveType Type Bit Size
Boolean 1
Integer 32
UnsignedInteger 32
FloatingPoint 64
String 8
everything else 0
Include file
#include <xentara/workbench/data/PrimitiveType.hpp>