BitShares-Core  4.0.0
BitShares blockchain implementation and command-line interface software
Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
graphene::protocol::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 33 of file asset.hpp.

Constructor & Destructor Documentation

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

Definition at line 35 of file asset.hpp.

Member Function Documentation

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

Multiply and round up.

Definition at line 78 of file asset.cpp.

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

Definition at line 41 of file asset.hpp.

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

Definition at line 53 of file asset.hpp.

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

Definition at line 47 of file asset.hpp.

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

Definition at line 93 of file asset.hpp.

Friends And Related Function Documentation

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

Definition at line 69 of file asset.hpp.

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

Definition at line 87 of file asset.hpp.

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

Definition at line 82 of file asset.hpp.

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

Definition at line 59 of file asset.hpp.

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

Definition at line 64 of file asset.hpp.

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

Definition at line 55 of file asset.hpp.

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

Definition at line 73 of file asset.hpp.

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

Definition at line 77 of file asset.hpp.

Member Data Documentation

share_type graphene::protocol::asset::amount

Definition at line 38 of file asset.hpp.

asset_id_type graphene::protocol::asset::asset_id

Definition at line 39 of file asset.hpp.


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