Class List > eosio :: extended_asset

Public Attributes

Type Name
asset quantity
name contract
The owner of the asset.

Public Functions

Type Name
extended_symbol get_extended_symbol () const
Get the extended symbol of the asset.
extended_asset () = default
Construct a new extended asset object.
extended_asset (int64_t v, extended_symbol s)
Construct a new extended asset object.
extended_asset (asset a, name c)
Construct a new extended asset object.
void print () const
Print the extended asset
extended_asset operator- () const
Unary minus operator.

Friends

Type Name
friend extended_asset operator-
Subtraction operator.
friend extended_asset operator+
Addition operator.
friend extended_asset & operator+=
Addition operator.
friend extended_asset & operator-=
Subtraction operator.
friend bool operator<
Less than operator.
friend bool operator==
Comparison operator.
friend bool operator!=
Comparison operator.
friend bool operator<=
Comparison operator.
friend bool operator>=
Comparison operator.

Public Attributes Documentation

variable quantity

asset eosio::extended_asset::quantity;

The asset

variable contract

name eosio::extended_asset::contract;

The owner of the asset.

The owner of the asset

Public Functions Documentation

function get_extended_symbol

extended_symbol eosio::extended_asset::get_extended_symbol() const

Get the extended symbol of the asset.

Get the extended symbol of the asset

Returns:

extended_symbol - The extended symbol of the asset

function extended_asset (1/3)

eosio::extended_asset::extended_asset() = default

Construct a new extended asset object.

Default constructor

function extended_asset (2/3)

eosio::extended_asset::extended_asset(
    int64_t v,
    extended_symbol s
)

Construct a new extended asset object.

Construct a new extended asset given the amount and extended symbol

function extended_asset (3/3)

eosio::extended_asset::extended_asset(
    asset a,
    name c
)

Construct a new extended asset object.

Construct a new extended asset given the asset and owner name

function print

void eosio::extended_asset::print() const

Print the extended asset

Print the extended asset

function operator- (1/2)

extended_asset eosio::extended_asset::operator-() const

Unary minus operator.

Unary minus operator

Returns:

extended_asset - New extended asset with its amount is the negative amount of this extended asset

Friends Documentation

friend operator- (2/2)

extended_asset operator-(
    const extended_asset & a,
    const extended_asset & b
)

Subtraction operator.

Subtraction operator. This subtracts the amount of the extended asset.

Parameters:

  • a - The extended asset to be subtracted
  • b - The extended asset used to subtract

Returns:

extended_asset - New extended asset as the result of subtraction

Precondition:

The owner of both extended asset need to be the same

friend operator+

extended_asset operator+(
    const extended_asset & a,
    const extended_asset & b
)

Addition operator.

Addition operator. This adds the amount of the extended asset.

Parameters:

  • a - The extended asset to be added
  • b - The extended asset to be added

Returns:

extended_asset - New extended asset as the result of addition

Precondition:

The owner of both extended asset need to be the same

friend operator+=

extended_asset& operator+=(
    extended_asset & a,
    const extended_asset & b
)

Addition operator.

friend operator-=

extended_asset& operator-=(
    extended_asset & a,
    const extended_asset & b
)

Subtraction operator.

friend operator<

bool operator<(
    const extended_asset & a,
    const extended_asset & b
)

Less than operator.

friend operator==

bool operator==(
    const extended_asset & a,
    const extended_asset & b
)

Comparison operator.

friend operator!=

bool operator!=(
    const extended_asset & a,
    const extended_asset & b
)

Comparison operator.

friend operator<=

bool operator<=(
    const extended_asset & a,
    const extended_asset & b
)

Comparison operator.

friend operator>=

bool operator>=(
    const extended_asset & a,
    const extended_asset & b
)

Comparison operator.


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