Skip to main content

eosio::unsigned_int

Module: Core API / Variable Length Integer Type

More...

#include <varint.hpp>

Public Functions

Name
constexprunsigned_int(uint32_t v =0)
template <typename T >
constexpr
unsigned_int(T v)
template <typename T >
constexpr
operator T() const

Public Attributes

Name
uint32_tvalue

Detailed Description

struct eosio::unsigned_int;

Variable Length Unsigned Integer. This provides more efficient serialization of 32-bit unsigned int. It serialuzes a 32-bit unsigned integer in as few bytes as possible varuint32 is unsigned and uses VLQ or Base-128 encoding

Public Functions Documentation

function unsigned_int

inline constexpr unsigned_int(
uint32_t v =0
)

Parameters:

  • v - Source

Construct a new unsigned int object

function unsigned_int

template <typename T >
inline constexpr unsigned_int(
T v
)

Parameters:

  • v - Source

Template Parameters:

  • T - Type of the source

Precondition: T must be convertible to uint32_t

Construct a new unsigned int object from a type that is convertible to uint32_t

function operator T

template <typename T >
inline constexpr operator T() const

Template Parameters:

  • T - Target type of conversion

Return: T - Converted target

Convert unsigned_int as T

Public Attributes Documentation

variable value

uint32_t value;

Contained value


Updated on 2022-12-05 at 15:38:08 +0000