Class List > eosio :: symbol_code
Public Functions
Type | Name |
---|---|
constexpr | symbol_code () |
constexpr | symbol_code (uint64_t raw) |
constexpr | symbol_code (std::string_view str) |
constexpr bool | is_valid () const |
constexpr uint32_t | length () const |
constexpr uint64_t | raw () const |
constexpr | operator bool () const |
char * | write_as_string (char * begin, char * end) const Writes the symbol_code as a string to the provided char buffer. |
std::string | to_string () const |
Friends
Type | Name |
---|---|
friend constexpr bool | operator== Equivalency operator. |
friend constexpr bool | operator!= Inverted equivalency operator. |
friend constexpr bool | operator< Less than operator. |
Public Functions Documentation
function symbol_code
constexpr eosio::symbol_code::symbol_code()
function symbol_code
explicit constexpr eosio::symbol_code::symbol_code(
uint64_t raw
)
function symbol_code
explicit constexpr eosio::symbol_code::symbol_code(
std::string_view str
)
function is_valid
constexpr bool eosio::symbol_code::is_valid() const
Checks if the symbol code is valid
Returns:
true - if symbol is valid
function length
constexpr uint32_t eosio::symbol_code::length() const
Returns the character length of the provided symbol
Returns:
length - character length of the provided symbol
function raw
constexpr uint64_t eosio::symbol_code::raw() const
function operator bool
explicit constexpr eosio::symbol_code::operator bool() const
function write_as_string
char* eosio::symbol_code::write_as_string(
char * begin,
char * end
) const
Writes the symbol_code as a string to the provided char buffer.
Writes the symbol_code as a string to the provided char buffer
Precondition:
Appropriate Size Precondition: (begin + 7) <= end and (begin + 7) does not overflow
Precondition:
Valid Memory Region Precondition: The range [begin, end) must be a valid range of memory to write to.
Parameters:
- begin - The start of the char buffer
- end - Just past the end of the char buffer
Returns:
char* - Just past the end of the last character written (returns begin if the Appropriate Size Precondition is not satisfied)
Post
If the Appropriate Size Precondition is satisfied, the range [begin, returned pointer) contains the string representation of the symbol_code.
function to_string
std::string eosio::symbol_code::to_string() const
Friends Documentation
friend operator==
constexpr bool operator==(
const symbol_code & a,
const symbol_code & b
)
Equivalency operator.
Equivalency operator. Returns true if a == b (are the same)
Returns:
boolean - true if both provided symbol_codes are the same
friend operator!=
constexpr bool operator!=(
const symbol_code & a,
const symbol_code & b
)
Inverted equivalency operator.
Inverted equivalency operator. Returns true if a != b (are different)
Returns:
boolean - true if both provided symbol_codes are not the same
friend operator<
constexpr bool operator<(
const symbol_code & a,
const symbol_code & b
)
Less than operator.
Less than operator. Returns true if a < b.
Returns:
boolean - true if symbol_code a
is less than b
The documentation for this class was generated from the following file: libraries/eosiolib/symbol.hpp