Class List > eosio :: datastream< size_t >

Specialization of datastream used to help determine the final size of a serialized value. Specialization of datastream used to help determine the final size of a serialized value.

Public Functions

Type Name
datastream (size_t init_size = 0)
Construct a new specialized datastream object.
bool skip (size_t s)
Increase the size by s.
bool write (const char *, size_t s)
Increase the size by s.
bool put (char)
Increase the size by one.
bool valid () const
Check validity.
bool seekp (size_t p)
Set new size.
size_t tellp () const
Get the size.
size_t remaining () const
Always returns 0.

Public Functions Documentation

function datastream

eosio::datastream< size_t >::datastream(
    size_t init_size = 0
)

Construct a new specialized datastream object.

Construct a new specialized datastream object given the initial size

Parameters:

  • init_size - The initial size

function skip

bool eosio::datastream< size_t >::skip(
    size_t s
)

Increase the size by s.

Increment the size by s. This behaves the same as write( const char* ,size_t s ).

Parameters:

  • s - The amount of size to increase

Returns:

true

function write

bool eosio::datastream< size_t >::write(
    const char * ,
    size_t s
)

Increase the size by s.

Increment the size by s. This behaves the same as skip( size_t s )

Parameters:

  • s - The amount of size to increase

Returns:

true

function put

bool eosio::datastream< size_t >::put(
    char 
)

Increase the size by one.

Increment the size by one

Returns:

true

function valid

bool eosio::datastream< size_t >::valid() const

Check validity.

Check validity. It's always valid

Returns:

true

function seekp

bool eosio::datastream< size_t >::seekp(
    size_t p
)

Set new size.

Set new size

Parameters:

  • p - The new size

Returns:

true

function tellp

size_t eosio::datastream< size_t >::tellp() const

Get the size.

Get the size

Returns:

size_t - The size

function remaining

size_t eosio::datastream< size_t >::remaining() const

Always returns 0.

Always returns 0

Returns:

size_t - 0


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