xentara-utils v1.2.1
Xentara utilities library
|
A CBOR data type with additional information. More...
#include <cbor/DataType.hpp>
Public Member Functions | |
constexpr | ExtendedDataType () noexcept=default |
Default constructor. | |
constexpr | operator DataType () const noexcept |
Conversion to a fundamental data type. | |
constexpr auto | dataType () const noexcept -> DataType |
Returns the fundamental data type. | |
constexpr auto | bits () const noexcept -> int |
Returns the number of bits. | |
A CBOR data type with additional information.
This class adds bit sizes to arithmetic data types (DataType::UnsignedInteger, DataType::NegativeInteger, DataType::FloatingPoint, and DataType::Boolean).
|
constexprdefaultnoexcept |
Default constructor.
Creates an object with type DataType::Null.
|
constexprnoexcept |
Returns the number of bits.
The number of bits, or 0 if the fundamental data type does not use bit sizes.
CBOR supports the following bit sizes for the different fundamental data types:
|
constexprnoexcept |
Returns the fundamental data type.
|
constexprnoexcept |
Conversion to a fundamental data type.