Menu

class eosio::symbol

Class List > eosio :: 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
constexpr symbol ()
Construct a new symbol object defaulting to a value of 0.
constexpr symbol (uint64_t raw)
Construct a new symbol object initialising value with raw.
constexpr symbol (symbol_code sc, uint8_t precision)
Construct a new symbol object initialising value with a symbol maximum of 7 characters, packs the symbol and precision into the uint64_t value.
constexpr symbol (std::string_view ss, uint8_t precision)
Construct a new symbol object initialising value with a symbol maximum of 7 characters, packs the symbol and precision into the uint64_t value.
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
Print the symbol

Friends

Type Name
friend constexpr bool operator==
friend constexpr bool operator !=
friend constexpr bool operator<
Less than operator.
friend constexpr bool operator==
Equivalency operator.
friend constexpr bool operator !=
Inverted equivalency operator.
friend constexpr bool operator<
Less than operator.

Detailed Description

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

Public Functions Documentation

function symbol (5/8)

constexpr eosio::symbol::symbol()

Construct a new symbol object defaulting to a value of 0

function symbol (6/8)

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

Construct a new symbol given a scoped enumerated type of raw (uint64_t).

Parameters:

  • raw - The raw value which is a scoped enumerated type of unit64_t

function symbol (7/8)

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

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

Parameters:

  • sc - The symbol_code
  • precision - The number of decimal places used for the symbol

function symbol (8/8)

constexpr eosio::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 (2/2)

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

Is this symbol valid

function precision (2/2)

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

This symbol's precision

function code (2/2)

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

Returns representation of symbol name

function raw (2/2)

constexpr uint64_t eosio::symbol::raw() const

Returns uint64_t repreresentation of the symbol

function operator bool (2/2)

explicit constexpr eosio::symbol::operator bool() const

function print (2/2)

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

Print the symbol

function symbol (5/8)

constexpr eosio::symbol::symbol()

Construct a new symbol object defaulting to a value of 0.

Default constructor, construct a new symbol

function symbol (6/8)

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

Construct a new symbol object initialising value with raw.

Construct a new symbol given a scoped enumerated type of raw (uint64_t).

Parameters:

  • raw - The raw value which is a scoped enumerated type of unit64_t

function symbol (7/8)

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

Construct a new symbol object initialising value with a symbol maximum of 7 characters, packs the symbol and precision into the uint64_t value.

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

Parameters:

  • sc - The symbol_code
  • precision - The number of decimal places used for the symbol

function symbol (8/8)

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

Construct a new symbol object initialising value with a symbol maximum of 7 characters, packs the symbol and precision into the uint64_t value.

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 (2/2)

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

Is this symbol valid

function precision (2/2)

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

This symbol's precision

function code (2/2)

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

Returns representation of symbol name

function raw (2/2)

constexpr uint64_t eosio::symbol::raw() const

Returns uint64_t repreresentation of the symbol

function operator bool (2/2)

explicit constexpr eosio::symbol::operator bool() const

function print (2/2)

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

Print the symbol

Print the symbol

Friends Documentation

friend operator== (2/2)

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

Equivalency operator. Returns true if a == b (are the same)

Returns:

boolean - true if both provided symbols are the same

friend operator != (2/2)

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

Inverted equivalency operator. Returns true if a != b (are different)

Returns:

boolean - true if both provided symbols are not the same

friend operator< (2/2)

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

Less than operator.

Less than operator. Returns true if a < b.

Returns:

boolean - true if symbol a is less than b

friend operator== (2/2)

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

Equivalency operator.

Equivalency operator. Returns true if a == b (are the same)

Returns:

boolean - true if both provided symbols are the same

friend operator != (2/2)

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

Inverted equivalency operator.

Inverted equivalency operator. Returns true if a != b (are different)

Returns:

boolean - true if both provided symbols are not the same

friend operator< (2/2)

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

Less than operator.

Less than operator. Returns true if a < b.

Returns:

boolean - true if symbol a is less than b


The documentation for this class was generated from the following file: libraries/eosiolib/core/eosio/symbol.hpp