Developer documentation
Version 3.0.3-105-gd3941f44
MR::DataType Class Reference

#include "datatype.h"

Public Member Functions

 DataType () noexcept
 
 DataType (uint8_t type) noexcept
 
 DataType (const DataType &) noexcept=default
 
 DataType (DataType &&) noexcept=default
 
DataTypeoperator= (const DataType &) noexcept=default
 
DataTypeoperator= (DataType &&) noexcept=default
 
bool undefined () const
 
uint8_t operator() () const
 
bool operator== (uint8_t type) const
 
bool operator!= (uint8_t type) const
 
bool operator== (const DataType DT) const
 
bool operator!= (const DataType DT) const
 
bool is (uint8_t type) const
 
bool is_complex () const
 
bool is_signed () const
 
bool is_byte_order_native ()
 
bool is_little_endian () const
 
bool is_big_endian () const
 
bool is_integer () const
 
bool is_floating_point () const
 
void set_floating_point ()
 
void set_byte_order_native ()
 
size_t bits () const
 
size_t bytes () const
 
const char * description () const
 
const char * specifier () const
 
void set_flag (uint8_t flag)
 
void unset_flag (uint8_t flag)
 

Static Public Member Functions

template<typename T >
static DataType from ()
 
static DataType native (DataType dt)
 
static DataType parse (const std::string &spec)
 
static DataType from_command_line (DataType default_datatype=Undefined)
 
static App::OptionGroup options ()
 
template<>
DataType from ()
 
template<>
DataType from ()
 
template<>
DataType from ()
 
template<>
DataType from ()
 
template<>
DataType from ()
 
template<>
DataType from ()
 
template<>
DataType from ()
 
template<>
DataType from ()
 
template<>
DataType from ()
 
template<>
DataType from ()
 
template<>
DataType from ()
 
template<>
DataType from ()
 
template<>
DataType from ()
 

Static Public Attributes

static constexpr uint8_t Attributes = 0xF0U
 
static constexpr uint8_t Type = 0x0FU
 
static constexpr uint8_t Complex = 0x10U
 
static constexpr uint8_t Signed = 0x20U
 
static constexpr uint8_t LittleEndian = 0x40U
 
static constexpr uint8_t BigEndian = 0x80U
 
static constexpr uint8_t Undefined = 0x00U
 
static constexpr uint8_t Bit = 0x01U
 
static constexpr uint8_t UInt8 = 0x02U
 
static constexpr uint8_t UInt16 = 0x03U
 
static constexpr uint8_t UInt32 = 0x04U
 
static constexpr uint8_t UInt64 = 0x05U
 
static constexpr uint8_t Float32 = 0x06U
 
static constexpr uint8_t Float64 = 0x07U
 
static constexpr uint8_t Int8 = UInt8 | Signed
 
static constexpr uint8_t Int16 = UInt16 | Signed
 
static constexpr uint8_t Int16LE = UInt16 | Signed | LittleEndian
 
static constexpr uint8_t UInt16LE = UInt16 | LittleEndian
 
static constexpr uint8_t Int16BE = UInt16 | Signed | BigEndian
 
static constexpr uint8_t UInt16BE = UInt16 | BigEndian
 
static constexpr uint8_t Int32 = UInt32 | Signed
 
static constexpr uint8_t Int32LE = UInt32 | Signed | LittleEndian
 
static constexpr uint8_t UInt32LE = UInt32 | LittleEndian
 
static constexpr uint8_t Int32BE = UInt32 | Signed | BigEndian
 
static constexpr uint8_t UInt32BE = UInt32 | BigEndian
 
static constexpr uint8_t Int64 = UInt64 | Signed
 
static constexpr uint8_t Int64LE = UInt64 | Signed | LittleEndian
 
static constexpr uint8_t UInt64LE = UInt64 | LittleEndian
 
static constexpr uint8_t Int64BE = UInt64 | Signed | BigEndian
 
static constexpr uint8_t UInt64BE = UInt64 | BigEndian
 
static constexpr uint8_t Float32LE = Float32 | LittleEndian
 
static constexpr uint8_t Float32BE = Float32 | BigEndian
 
static constexpr uint8_t Float64LE = Float64 | LittleEndian
 
static constexpr uint8_t Float64BE = Float64 | BigEndian
 
static constexpr uint8_t CFloat32 = Complex | Float32
 
static constexpr uint8_t CFloat32LE = Complex | Float32 | LittleEndian
 
static constexpr uint8_t CFloat32BE = Complex | Float32 | BigEndian
 
static constexpr uint8_t CFloat64 = Complex | Float64
 
static constexpr uint8_t CFloat64LE = Complex | Float64 | LittleEndian
 
static constexpr uint8_t CFloat64BE = Complex | Float64 | BigEndian
 
static constexpr uint8_t Native
 
static const char * identifiers []
 

Protected Attributes

uint8_t dt
 

Friends

std::ostream & operator<< (std::ostream &stream, const DataType &dt)
 

Detailed Description

Definition at line 29 of file datatype.h.

Constructor & Destructor Documentation

◆ DataType() [1/4]

MR::DataType::DataType ( )
inlinenoexcept

Definition at line 31 of file datatype.h.

◆ DataType() [2/4]

MR::DataType::DataType ( uint8_t  type)
inlinenoexcept

Definition at line 32 of file datatype.h.

◆ DataType() [3/4]

MR::DataType::DataType ( const DataType )
defaultnoexcept

◆ DataType() [4/4]

MR::DataType::DataType ( DataType &&  )
defaultnoexcept

Member Function Documentation

◆ bits()

size_t MR::DataType::bits ( ) const

◆ bytes()

size_t MR::DataType::bytes ( ) const
inline

Definition at line 109 of file datatype.h.

◆ description()

const char * MR::DataType::description ( ) const

◆ from() [1/14]

template<typename T >
static DataType MR::DataType::from ( )
inlinestatic

Definition at line 123 of file datatype.h.

◆ from() [2/14]

template<>
DataType MR::DataType::from ( )
inlinestatic

Definition at line 200 of file datatype.h.

◆ from() [3/14]

template<>
DataType MR::DataType::from ( )
inlinestatic

Definition at line 204 of file datatype.h.

◆ from() [4/14]

template<>
DataType MR::DataType::from ( )
inlinestatic

Definition at line 208 of file datatype.h.

◆ from() [5/14]

template<>
DataType MR::DataType::from ( )
inlinestatic

Definition at line 212 of file datatype.h.

◆ from() [6/14]

template<>
DataType MR::DataType::from ( )
inlinestatic

Definition at line 216 of file datatype.h.

◆ from() [7/14]

template<>
DataType MR::DataType::from ( )
inlinestatic

Definition at line 220 of file datatype.h.

◆ from() [8/14]

template<>
DataType MR::DataType::from ( )
inlinestatic

Definition at line 224 of file datatype.h.

◆ from() [9/14]

template<>
DataType MR::DataType::from ( )
inlinestatic

Definition at line 228 of file datatype.h.

◆ from() [10/14]

template<>
DataType MR::DataType::from ( )
inlinestatic

Definition at line 232 of file datatype.h.

◆ from() [11/14]

template<>
DataType MR::DataType::from ( )
inlinestatic

Definition at line 236 of file datatype.h.

◆ from() [12/14]

template<>
DataType MR::DataType::from ( )
inlinestatic

Definition at line 240 of file datatype.h.

◆ from() [13/14]

template<>
DataType MR::DataType::from ( )
inlinestatic

Definition at line 244 of file datatype.h.

◆ from() [14/14]

template<>
DataType MR::DataType::from ( )
inlinestatic

Definition at line 248 of file datatype.h.

◆ from_command_line()

static DataType MR::DataType::from_command_line ( DataType  default_datatype = Undefined)
static

◆ is()

bool MR::DataType::is ( uint8_t  type) const
inline

Definition at line 57 of file datatype.h.

◆ is_big_endian()

bool MR::DataType::is_big_endian ( ) const
inline

Definition at line 80 of file datatype.h.

◆ is_byte_order_native()

bool MR::DataType::is_byte_order_native ( )
inline

Definition at line 66 of file datatype.h.

◆ is_complex()

bool MR::DataType::is_complex ( ) const
inline

Definition at line 60 of file datatype.h.

◆ is_floating_point()

bool MR::DataType::is_floating_point ( ) const
inline

Definition at line 87 of file datatype.h.

◆ is_integer()

bool MR::DataType::is_integer ( ) const
inline

Definition at line 83 of file datatype.h.

◆ is_little_endian()

bool MR::DataType::is_little_endian ( ) const
inline

Definition at line 77 of file datatype.h.

◆ is_signed()

bool MR::DataType::is_signed ( ) const
inline

Definition at line 63 of file datatype.h.

◆ native()

static DataType MR::DataType::native ( DataType  dt)
inlinestatic

Definition at line 125 of file datatype.h.

◆ operator!=() [1/2]

bool MR::DataType::operator!= ( const DataType  DT) const
inline

Definition at line 53 of file datatype.h.

◆ operator!=() [2/2]

bool MR::DataType::operator!= ( uint8_t  type) const
inline

Definition at line 47 of file datatype.h.

◆ operator()()

uint8_t MR::DataType::operator() ( ) const
inline

Definition at line 41 of file datatype.h.

◆ operator=() [1/2]

DataType & MR::DataType::operator= ( const DataType )
defaultnoexcept

◆ operator=() [2/2]

DataType & MR::DataType::operator= ( DataType &&  )
defaultnoexcept

◆ operator==() [1/2]

bool MR::DataType::operator== ( const DataType  DT) const
inline

Definition at line 50 of file datatype.h.

◆ operator==() [2/2]

bool MR::DataType::operator== ( uint8_t  type) const
inline

Definition at line 44 of file datatype.h.

◆ options()

static App::OptionGroup MR::DataType::options ( )
static

◆ parse()

static DataType MR::DataType::parse ( const std::string &  spec)
static

◆ set_byte_order_native()

void MR::DataType::set_byte_order_native ( )
inline

Definition at line 96 of file datatype.h.

◆ set_flag()

void MR::DataType::set_flag ( uint8_t  flag)
inline

Definition at line 115 of file datatype.h.

◆ set_floating_point()

void MR::DataType::set_floating_point ( )
inline

Definition at line 91 of file datatype.h.

◆ specifier()

const char * MR::DataType::specifier ( ) const

◆ undefined()

bool MR::DataType::undefined ( ) const
inline

Definition at line 38 of file datatype.h.

◆ unset_flag()

void MR::DataType::unset_flag ( uint8_t  flag)
inline

Definition at line 118 of file datatype.h.

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  stream,
const DataType dt 
)
friend

Definition at line 188 of file datatype.h.

Member Data Documentation

◆ Attributes

constexpr uint8_t MR::DataType::Attributes = 0xF0U
staticconstexpr

Definition at line 133 of file datatype.h.

◆ BigEndian

constexpr uint8_t MR::DataType::BigEndian = 0x80U
staticconstexpr

Definition at line 139 of file datatype.h.

◆ Bit

constexpr uint8_t MR::DataType::Bit = 0x01U
staticconstexpr

Definition at line 142 of file datatype.h.

◆ CFloat32

constexpr uint8_t MR::DataType::CFloat32 = Complex | Float32
staticconstexpr

Definition at line 171 of file datatype.h.

◆ CFloat32BE

constexpr uint8_t MR::DataType::CFloat32BE = Complex | Float32 | BigEndian
staticconstexpr

Definition at line 173 of file datatype.h.

◆ CFloat32LE

constexpr uint8_t MR::DataType::CFloat32LE = Complex | Float32 | LittleEndian
staticconstexpr

Definition at line 172 of file datatype.h.

◆ CFloat64

constexpr uint8_t MR::DataType::CFloat64 = Complex | Float64
staticconstexpr

Definition at line 174 of file datatype.h.

◆ CFloat64BE

constexpr uint8_t MR::DataType::CFloat64BE = Complex | Float64 | BigEndian
staticconstexpr

Definition at line 176 of file datatype.h.

◆ CFloat64LE

constexpr uint8_t MR::DataType::CFloat64LE = Complex | Float64 | LittleEndian
staticconstexpr

Definition at line 175 of file datatype.h.

◆ Complex

constexpr uint8_t MR::DataType::Complex = 0x10U
staticconstexpr

Definition at line 136 of file datatype.h.

◆ dt

uint8_t MR::DataType::dt
protected

Definition at line 194 of file datatype.h.

◆ Float32

constexpr uint8_t MR::DataType::Float32 = 0x06U
staticconstexpr

Definition at line 147 of file datatype.h.

◆ Float32BE

constexpr uint8_t MR::DataType::Float32BE = Float32 | BigEndian
staticconstexpr

Definition at line 168 of file datatype.h.

◆ Float32LE

constexpr uint8_t MR::DataType::Float32LE = Float32 | LittleEndian
staticconstexpr

Definition at line 167 of file datatype.h.

◆ Float64

constexpr uint8_t MR::DataType::Float64 = 0x07U
staticconstexpr

Definition at line 148 of file datatype.h.

◆ Float64BE

constexpr uint8_t MR::DataType::Float64BE = Float64 | BigEndian
staticconstexpr

Definition at line 170 of file datatype.h.

◆ Float64LE

constexpr uint8_t MR::DataType::Float64LE = Float64 | LittleEndian
staticconstexpr

Definition at line 169 of file datatype.h.

◆ identifiers

const char* MR::DataType::identifiers[]
static

Definition at line 186 of file datatype.h.

◆ Int16

constexpr uint8_t MR::DataType::Int16 = UInt16 | Signed
staticconstexpr

Definition at line 152 of file datatype.h.

◆ Int16BE

constexpr uint8_t MR::DataType::Int16BE = UInt16 | Signed | BigEndian
staticconstexpr

Definition at line 155 of file datatype.h.

◆ Int16LE

constexpr uint8_t MR::DataType::Int16LE = UInt16 | Signed | LittleEndian
staticconstexpr

Definition at line 153 of file datatype.h.

◆ Int32

constexpr uint8_t MR::DataType::Int32 = UInt32 | Signed
staticconstexpr

Definition at line 157 of file datatype.h.

◆ Int32BE

constexpr uint8_t MR::DataType::Int32BE = UInt32 | Signed | BigEndian
staticconstexpr

Definition at line 160 of file datatype.h.

◆ Int32LE

constexpr uint8_t MR::DataType::Int32LE = UInt32 | Signed | LittleEndian
staticconstexpr

Definition at line 158 of file datatype.h.

◆ Int64

constexpr uint8_t MR::DataType::Int64 = UInt64 | Signed
staticconstexpr

Definition at line 162 of file datatype.h.

◆ Int64BE

constexpr uint8_t MR::DataType::Int64BE = UInt64 | Signed | BigEndian
staticconstexpr

Definition at line 165 of file datatype.h.

◆ Int64LE

constexpr uint8_t MR::DataType::Int64LE = UInt64 | Signed | LittleEndian
staticconstexpr

Definition at line 163 of file datatype.h.

◆ Int8

constexpr uint8_t MR::DataType::Int8 = UInt8 | Signed
staticconstexpr

Definition at line 151 of file datatype.h.

◆ LittleEndian

constexpr uint8_t MR::DataType::LittleEndian = 0x40U
staticconstexpr

Definition at line 138 of file datatype.h.

◆ Native

constexpr uint8_t MR::DataType::Native
staticconstexpr
Initial value:
static constexpr uint8_t Float32
Definition: datatype.h:147
static constexpr uint8_t LittleEndian
Definition: datatype.h:138

Definition at line 178 of file datatype.h.

◆ Signed

constexpr uint8_t MR::DataType::Signed = 0x20U
staticconstexpr

Definition at line 137 of file datatype.h.

◆ Type

constexpr uint8_t MR::DataType::Type = 0x0FU
staticconstexpr

Definition at line 134 of file datatype.h.

◆ UInt16

constexpr uint8_t MR::DataType::UInt16 = 0x03U
staticconstexpr

Definition at line 144 of file datatype.h.

◆ UInt16BE

constexpr uint8_t MR::DataType::UInt16BE = UInt16 | BigEndian
staticconstexpr

Definition at line 156 of file datatype.h.

◆ UInt16LE

constexpr uint8_t MR::DataType::UInt16LE = UInt16 | LittleEndian
staticconstexpr

Definition at line 154 of file datatype.h.

◆ UInt32

constexpr uint8_t MR::DataType::UInt32 = 0x04U
staticconstexpr

Definition at line 145 of file datatype.h.

◆ UInt32BE

constexpr uint8_t MR::DataType::UInt32BE = UInt32 | BigEndian
staticconstexpr

Definition at line 161 of file datatype.h.

◆ UInt32LE

constexpr uint8_t MR::DataType::UInt32LE = UInt32 | LittleEndian
staticconstexpr

Definition at line 159 of file datatype.h.

◆ UInt64

constexpr uint8_t MR::DataType::UInt64 = 0x05U
staticconstexpr

Definition at line 146 of file datatype.h.

◆ UInt64BE

constexpr uint8_t MR::DataType::UInt64BE = UInt64 | BigEndian
staticconstexpr

Definition at line 166 of file datatype.h.

◆ UInt64LE

constexpr uint8_t MR::DataType::UInt64LE = UInt64 | LittleEndian
staticconstexpr

Definition at line 164 of file datatype.h.

◆ UInt8

constexpr uint8_t MR::DataType::UInt8 = 0x02U
staticconstexpr

Definition at line 143 of file datatype.h.

◆ Undefined

constexpr uint8_t MR::DataType::Undefined = 0x00U
staticconstexpr

Definition at line 141 of file datatype.h.


The documentation for this class was generated from the following file: