group console

Defines C++ wrapper to log/print text messages. More...

Classes

Type Name
class eosio::iostream

Detailed Description

This API uses C++ variadic templates and type detection to make it easy to print any native type. You can even overload the `` method for your own custom types. Example:

print( "hello world, this is a number: ", 5 );

Functions Documentation

function printhex

void console::printhex (
    const void * ptr,
    uint32_t size
)

Prints a block of bytes in hexadecimal

Parameters:

  • ptr - pointer to bytes of interest
  • size - number of bytes to print

function printl

void console::printl (
    const char * ptr,
    size_t len
)

Prints string to a given length

Parameters:

  • ptr - a string
  • len - number of chars to print

function print

void console::print (
    const char * ptr
)

Prints string

Parameters:

  • ptr - a null terminated string

function print

void console::print (
    float num
)

Prints single-precision floating point number (i.e. float)

Parameters:

  • num to be printed

function print

void console::print (
    double num
)

Prints double-precision floating point number (i.e. double)

Parameters:

  • num to be printed

function print

void console::print (
    long double num
)

Prints quadruple-precision floating point number (i.e. long double)

Parameters:

  • num to be printed

function print

void console::print (
    T && t
)

Prints class object

Parameters:

  • t to be printed

Precondition:

T must implements print() function

function print_f

void console::print_f (
    const char * s
)

Prints null terminated string

Parameters:

  • s null terminated string to be printed

results matching ""

    No results matching ""