mmCEsim 0.3.0
mmWave Channel Estimation Simulation
Type Class Reference

#include <type.h>

Public Member Functions

 Type ()=default
 
 Type (const std::string &str)
 
Data data () const noexcept
 
Dim dim () const noexcept
 
std::string string () const noexcept
 Get the C++ type name. More...
 
bool isUnknown () const noexcept
 
bool isConst () const noexcept
 
bool isReference () const noexcept
 

Static Public Member Functions

static std::string string (const std::string &) noexcept
 

Private Types

enum class  Data {
  COMPLEX , FLOAT , INTEGER , UNSIGNED ,
  BOOL , STRING , CHAR , OTHER ,
  UNKNOWN
}
 Data type specification. More...
 
enum class  Suffix {
  NONE , CONST_ , REFERENCE_ , VOLATILE_ ,
  UNKNOWN
}
 Type prefix. More...
 
using Dim = int8_t
 

Private Member Functions

std::tuple< Data, Dim_getData (char c) const noexcept
 
Suffix _getSuffix (char c) const noexcept
 
std::string _getString (const std::string &elem_type) const noexcept
 

Private Attributes

Data _data = Data::UNKNOWN
 
Dim _dim = -1
 
Suffix _suffix = Suffix::NONE
 

Member Typedef Documentation

◆ Dim

using Type::Dim = int8_t
private

Member Enumeration Documentation

◆ Data

enum class Type::Data
strongprivate

Data type specification.

The type is specified with one character (e.g. 'c', 'f', etc.).

Note
There are characters reserved for simple representation:
  • v = c1 : (column) complex vector;
  • r = c2 : row complex vector (viewed as matrix);
  • m = c2 : complex matrix;
  • t = c3 : complex tensor (cube);
  • d = f0 : float scalar (d);
Enumerator
COMPLEX 

c

FLOAT 

f

INTEGER 

i

UNSIGNED 

u

BOOL 

b

STRING 

s

CHAR 

h

OTHER 

o (reserved for future use)

UNKNOWN 

(unknown)

◆ Suffix

enum class Type::Suffix
strongprivate

Type prefix.

These are additional attributes of the type

Enumerator
NONE 

(none)

CONST_ 

c

REFERENCE_ 

r

VOLATILE_ 

v (not implemented yet)

UNKNOWN 

Constructor & Destructor Documentation

◆ Type() [1/2]

Type::Type ( )
default

◆ Type() [2/2]

Type::Type ( const std::string &  str)
Here is the call graph for this function:

Member Function Documentation

◆ _getData()

std::tuple< Type::Data, Type::Dim > Type::_getData ( char  c) const
privatenoexcept
Here is the caller graph for this function:

◆ _getString()

std::string Type::_getString ( const std::string &  elem_type) const
privatenoexcept
Here is the caller graph for this function:

◆ _getSuffix()

Type::Suffix Type::_getSuffix ( char  c) const
privatenoexcept
Here is the caller graph for this function:

◆ data()

Type::Data Type::data ( ) const
inlinenoexcept

◆ dim()

Type::Dim Type::dim ( ) const
inlinenoexcept
Here is the caller graph for this function:

◆ isConst()

bool Type::isConst ( ) const
inlinenoexcept

◆ isReference()

bool Type::isReference ( ) const
inlinenoexcept

◆ isUnknown()

bool Type::isUnknown ( ) const
inlinenoexcept
Here is the caller graph for this function:

◆ string() [1/2]

std::string Type::string ( ) const
noexcept

Get the C++ type name.

Returns
(std::string) C++ type name. Return empty string if it is unknown.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ string() [2/2]

std::string Type::string ( const std::string &  str)
inlinestaticnoexcept
Here is the call graph for this function:

Member Data Documentation

◆ _data

Data Type::_data = Data::UNKNOWN
private

◆ _dim

Dim Type::_dim = -1
private

◆ _suffix

Suffix Type::_suffix = Suffix::NONE
private

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