class arisen::symbol

Public Functions

Type

Name

constexpr

symbol ()

constexpr

symbol (uint64_t raw)

constexpr

symbol (symbol_code sc, uint8_t precision)

constexpr

symbol (std::string_view ss, uint8_t precision)

constexpr bool

is_valid () const

constexpr uint8_t

precision () const

constexpr symbol_code

code () const

constexpr uint64_t

raw () const

constexpr

operator bool () const

void

print (bool show_precision = true) const

Friends

Type

Name

friend constexpr bool

operator==

friend constexpr bool

operator!=

friend constexpr bool

operator<
Less than operator.

Detailed Description

Stores information about a symbol, the symbol can be 7 characters long.

Public Functions Documentation

function symbol (1/4)

constexpr arisen::symbol::symbol()

function symbol (2/4)

explicit constexpr arisen::symbol::symbol(
    uint64_t raw
)

function symbol (3/4)

constexpr arisen::symbol::symbol(
    symbol_code sc,
    uint8_t precision
)

function symbol (4/4)

constexpr arisen::symbol::symbol(
    std::string_view ss,
    uint8_t precision
)

Construct a new symbol given a string and a uint8_t precision.

Parameters:

ss - The string containing the symbol
precision - The number of decimal places used for the symbol

function is_valid

constexpr bool arisen::symbol::is_valid() const

function precision

constexpr uint8_t arisen::symbol::precision() const

function code

constexpr symbol_code arisen::symbol::code() const

function print

void arisen:symbol::print(
    bool show_precision = true
) const

Friends Documentation

friend operator==

constexpr bool operator==(
    const symbol & a,
    const symbol & b
)

friend operator!=

constexpr bool operator!=(
    const symbol & a,
    const symbol & b
)

friend operator<

constexpr bool operator<(
    const symbol & a,
    const symbol & b
)