class arisen::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 Static Functions

Type

Name

static constexpr size_t

num_words ()

static constexpr size_t

padded_bytes ()

static fixed_bytes< Size >

make_from_word_sequence ()

Detailed Description

Fixed size byte array sorted lexicographically

Template parameters:

Size - Size of the fixed_bytes object

Public Types Documentation

typedef word_t

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

Public Static Functions Documentation

function num_words

static static constexpr size_t arisen::fixed_bytes< Size >::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 static constexpr size_t arisen::fixed_bytes< Size >::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

template<typename FirstWord, typename... Rest>
static static fixed_bytes<Size> arisen::fixed_bytes< Size >::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 arisen::fixed_bytes< Size >::fixed_bytes()

Default constructor to fixed_bytes object which initializes all bytes to zero

function fixed_bytes (2/4)

arisen::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

function fixed_bytes (3/4)

template<typename Word, size_t NumWords, typename Enable>
arisen::fixed_bytes< Size >::fixed_bytes(
    const std::array< Word, NumWords > & arr
)

function fixed_bytes (4/4)

template<typename Word, size_t NumWords, typename Enable>
arisen::fixed_bytes< Size >::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& arisen::fixed_bytes< Size >::get_array() const

function data

auto arisen::fixed_bytes< Size >::data()

function size

auto arisen::fixed_bytes< Size >::size() const

function extract_as_byte_array

std::array<uint8_t, Size> arisen::fixed_bytes< Size >::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 arisen::fixed_bytes< Size >::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: libraries/arisenlib/core/arisen/fixed_bytes.hpp