Bitshares-Core  2.0.181105
BitShares blockchain implementation and command-line interface software
Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
graphene::chain::asset Struct Reference

#include <asset.hpp>

Public Member Functions

 asset (share_type a=0, asset_id_type id=asset_id_type())
 
assetoperator+= (const asset &o)
 
assetoperator-= (const asset &o)
 
asset operator- () const
 
asset multiply_and_round_up (const price &p) const
 Multiply and round up. More...
 

Static Public Member Functions

static share_type scaled_precision (uint8_t precision)
 

Public Attributes

share_type amount
 
asset_id_type asset_id
 

Friends

bool operator== (const asset &a, const asset &b)
 
bool operator< (const asset &a, const asset &b)
 
bool operator<= (const asset &a, const asset &b)
 
bool operator!= (const asset &a, const asset &b)
 
bool operator> (const asset &a, const asset &b)
 
bool operator>= (const asset &a, const asset &b)
 
asset operator- (const asset &a, const asset &b)
 
asset operator+ (const asset &a, const asset &b)
 

Detailed Description

Definition at line 34 of file asset.hpp.

Constructor & Destructor Documentation

◆ asset()

graphene::chain::asset::asset ( share_type  a = 0,
asset_id_type  id = asset_id_type() 
)
inline

Definition at line 36 of file asset.hpp.

Member Function Documentation

◆ multiply_and_round_up()

asset graphene::chain::asset::multiply_and_round_up ( const price p) const

Multiply and round up.

Definition at line 75 of file asset.cpp.

◆ operator+=()

asset& graphene::chain::asset::operator+= ( const asset o)
inline

Definition at line 42 of file asset.hpp.

◆ operator-()

asset graphene::chain::asset::operator- ( ) const
inline

Definition at line 54 of file asset.hpp.

◆ operator-=()

asset& graphene::chain::asset::operator-= ( const asset o)
inline

Definition at line 48 of file asset.hpp.

◆ scaled_precision()

static share_type graphene::chain::asset::scaled_precision ( uint8_t  precision)
inlinestatic

Definition at line 94 of file asset.hpp.

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( const asset a,
const asset b 
)
friend

Definition at line 70 of file asset.hpp.

◆ operator+

asset operator+ ( const asset a,
const asset b 
)
friend

Definition at line 88 of file asset.hpp.

◆ operator-

asset operator- ( const asset a,
const asset b 
)
friend

Definition at line 83 of file asset.hpp.

◆ operator<

bool operator< ( const asset a,
const asset b 
)
friend

Definition at line 60 of file asset.hpp.

◆ operator<=

bool operator<= ( const asset a,
const asset b 
)
friend

Definition at line 65 of file asset.hpp.

◆ operator==

bool operator== ( const asset a,
const asset b 
)
friend

Definition at line 56 of file asset.hpp.

◆ operator>

bool operator> ( const asset a,
const asset b 
)
friend

Definition at line 74 of file asset.hpp.

◆ operator>=

bool operator>= ( const asset a,
const asset b 
)
friend

Definition at line 78 of file asset.hpp.

Member Data Documentation

◆ amount

share_type graphene::chain::asset::amount

Definition at line 39 of file asset.hpp.

◆ asset_id

asset_id_type graphene::chain::asset::asset_id

Definition at line 40 of file asset.hpp.


The documentation for this struct was generated from the following files: