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 |
Friends
Type | Name |
---|---|
constexpr friend bool | operator== |
constexpr friend bool | operator!= |
constexpr friend 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 eosio::symbol::symbol()
Construct a new symbol object defaulting to a value of 0
function symbol (2/4)
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 (3/4)
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 (4/4)
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
constexpr bool eosio::symbol::is_valid() const
Is this symbol valid
function precision
constexpr uint8_t eosio::symbol::precision() const
This symbol's precision
function code
constexpr symbol_code eosio::symbol::code() const
Returns representation of symbol name
function raw
constexpr uint64_t eosio::symbol::raw() const
Returns uint64_t repreresentation of the symbol
function operator bool
explicit constexpr eosio::symbol::operator bool() const
function print
void eosio::symbol::print(
bool show_precision = true
) const
Print the symbol
Friends Documentation
friend operator==
constexpr friend 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!=
constexpr friend 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<
constexpr friend 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