class eosio::fixed_bytes

Class List > eosio :: fixed_bytes

Fixed size array of bytes sorted lexicographically. More...

Classes

Type Name
struct bool_pack

Public Types

Type Name
typedef uint128_t word_t

Public Attributes

Type Name
arr_itr
return arr

Public Static Functions

Type Name
static constexpr size_t num_words ()
Get number of words contained in this fixed_bytes object.
static constexpr size_t padded_bytes ()
Get number of padded bytes contained in this fixed_bytes object.

Public Functions

Type Name
constexpr fixed_bytes ()
Default constructor to fixed_bytes object.
fixed_bytes (const std::array< word_t, num_words()> & arr)
Constructor to fixed_bytes object from std::array of num_words() word_t types.
for (; sub_words_left, 0;-- sub_words_left)
Constructor to fixed_bytes object from std::array of Word types smaller in size than word_t.

Friends

Type Name
friend bool operator==
Compares two fixed_bytes variables c1 and c2.
friend bool operator!=
Compares two fixed_bytes variables c1 and c2.
friend bool operator>
Compares two fixed_bytes variables c1 and c2.
friend bool operator<
Compares two fixed_bytes variables c1 and c2.
friend bool operator>=
Compares two fixed_bytes variables c1 and c2.
friend bool operator<=
Compares two fixed_bytes variables c1 and c2.

Detailed Description

Fixed size byte array sorted lexicographically

Template parameters:

Public Types Documentation

typedef word_t

typedef uint128_t eosio::fixed_bytes< Size >::word_t;

Public Attributes Documentation

variable arr_itr

eosio::fixed_bytes< Size >::arr_itr;

variable arr

return eosio::fixed_bytes< Size >::arr;

Public Static Functions Documentation

function num_words

static static constexpr size_t eosio::fixed_bytes< Size >::num_words()

Get number of words contained in this fixed_bytes object.

Get number of words contained in this fixed_bytes object. A word is defined to be 16 bytes in size

function padded_bytes

static static constexpr size_t eosio::fixed_bytes< Size >::padded_bytes()

Get number of padded bytes contained in this fixed_bytes object.

Get number of padded bytes contained in this fixed_bytes object. Padded bytes are the remaining bytes inside the fixed_bytes object after all the words are allocated

Public Functions Documentation

function fixed_bytes (1/2)

constexpr eosio::fixed_bytes< Size >::fixed_bytes()

Default constructor to fixed_bytes object.

Default constructor to fixed_bytes object which initializes all bytes to zero

function fixed_bytes (2/2)

eosio::fixed_bytes< Size >::fixed_bytes(
    const std::array< word_t, num_words()> & arr
)

Constructor to fixed_bytes object from std::array of num_words() word_t types.

Constructor to fixed_bytes object from std::array of num_words() word_t types

Parameters:

  • arr data

function for

template<typename Word, size_t NumWords>
eosio::fixed_bytes< Size >::for(
    ; sub_words_left,
    0;-- sub_words_left
)

Constructor to fixed_bytes object from std::array of Word types smaller in size than word_t.

Constructor to fixed_bytes object from std::array of Word types smaller in size than word_t

Parameters:

  • arr - Source data

Friends Documentation

friend operator==

bool operator==(
    const fixed_bytes< Size > & c1,
    const fixed_bytes< Size > & c2
)

Compares two fixed_bytes variables c1 and c2.

Lexicographically compares two fixed_bytes variables c1 and c2

Parameters:

Returns:

if c1 == c2, return true, otherwise false

friend operator!=

bool operator!=(
    const fixed_bytes< Size > & c1,
    const fixed_bytes< Size > & c2
)

Compares two fixed_bytes variables c1 and c2.

Lexicographically compares two fixed_bytes variables c1 and c2

Parameters:

Returns:

if c1 != c2, return true, otherwise false

friend operator>

bool operator>(
    const fixed_bytes< Size > & c1,
    const fixed_bytes< Size > & c2
)

Compares two fixed_bytes variables c1 and c2.

Lexicographically compares two fixed_bytes variables c1 and c2

Parameters:

Returns:

if c1 > c2, return true, otherwise false

friend operator<

bool operator<(
    const fixed_bytes< Size > & c1,
    const fixed_bytes< Size > & c2
)

Compares two fixed_bytes variables c1 and c2.

Lexicographically compares two fixed_bytes variables c1 and c2

Parameters:

Returns:

if c1 < c2, return true, otherwise false

friend operator>=

bool operator>=(
    const fixed_bytes< Size > & c1,
    const fixed_bytes< Size > & c2
)

Compares two fixed_bytes variables c1 and c2.

Lexicographically compares two fixed_bytes variables c1 and c2

Parameters:

Returns:

if c1 >= c2, return true, otherwise false

friend operator<=

bool operator<=(
    const fixed_bytes< Size > & c1,
    const fixed_bytes< Size > & c2
)

Compares two fixed_bytes variables c1 and c2.

Lexicographically compares two fixed_bytes variables c1 and c2

Parameters:

Returns:

if c1 <= c2, return true, otherwise false


The documentation for this class was generated from the following file: libraries/eosiolib/fixed\_bytes.hpp