class eosio::fixed_bytes

Class List > eosio :: fixed_bytes

Classes

Type Name
struct bool_pack

Public Types

Type Name
typedef uint128_t word_t

Public Static Functions

Type Name
static constexpr size_t num_words ()
static constexpr size_t padded_bytes ()
static fixed_bytes< Size > make_from_word_sequence ()

Public Functions

Type Name
constexpr fixed_bytes ()
fixed_bytes (const std::array< word_t, num_words()> & arr)
fixed_bytes (const std::array< Word, NumWords > & arr)
fixed_bytes (const Word(&) arr)
const auto & get_array () const
auto data ()
auto size () const
std::array< uint8_t, Size > extract_as_byte_array () const
void print () const

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 Static Functions Documentation

function num_words

static constexpr size_t eosio::fixed_bytes::num_words ()

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

function padded_bytes

static constexpr size_t eosio::fixed_bytes::padded_bytes ()

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

function make_from_word_sequence

static fixed_bytes< Size > eosio::fixed_bytes::make_from_word_sequence ()

Create a new fixed_bytes object from a sequence of words

Template parameters:

  • FirstWord - The type of the first word in the sequence
  • Rest - The type of the remaining words in the sequence

Parameters:

  • first_word - The first word in the sequence
  • rest - The remaining words in the sequence

Public Functions Documentation

function fixed_bytes (1/4)

constexpr eosio::fixed_bytes::fixed_bytes ()

Default constructor to fixed_bytes object which initializes all bytes to zero

function fixed_bytes (2/4)

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

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

Parameters:

  • arr data

function fixed_bytes (3/4)

eosio::fixed_bytes::fixed_bytes (
    const std::array< Word, NumWords > & arr
)

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

Parameters:

  • arr - Source data

function fixed_bytes (4/4)

eosio::fixed_bytes::fixed_bytes (
    const Word(&) arr
)

Constructor to fixed_bytes object from fixed-sized C array of Word types smaller in size than word_t

Parameters:

  • arr - Source data

function get_array

const auto & eosio::fixed_bytes::get_array () const

Get the contained std::array

function data

auto eosio::fixed_bytes::data ()

Get the underlying data of the contained std::array

function size

auto eosio::fixed_bytes::size () const

Get the size of the contained std::array

function extract_as_byte_array

std::array< uint8_t, Size > eosio::fixed_bytes::extract_as_byte_array () const

Extract the contained data as an array of bytes

Returns:

  • the extracted data as array of bytes

function print

void eosio::fixed_bytes::print () const

Prints fixed_bytes as a hexidecimal string

Parameters:

  • val to be printed

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

results matching ""

    No results matching ""