BitShares-Core  7.0.2
BitShares blockchain node software and command-line wallet 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 31 of file asset.hpp.

Constructor & Destructor Documentation

◆ asset()

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

Definition at line 33 of file asset.hpp.

Member Function Documentation

◆ multiply_and_round_up()

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

Multiply and round up.

Definition at line 77 of file asset.cpp.

◆ operator+=()

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

Definition at line 39 of file asset.hpp.

◆ operator-()

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

Definition at line 51 of file asset.hpp.

◆ operator-=()

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

Definition at line 45 of file asset.hpp.

◆ scaled_precision()

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

Definition at line 363 of file asset.cpp.

Friends And Related Function Documentation

◆ operator!=

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

Definition at line 67 of file asset.hpp.

◆ operator+

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

Definition at line 85 of file asset.hpp.

◆ operator-

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

Definition at line 80 of file asset.hpp.

◆ operator<

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

Definition at line 57 of file asset.hpp.

◆ operator<=

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

Definition at line 62 of file asset.hpp.

◆ operator==

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

Definition at line 53 of file asset.hpp.

◆ operator>

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

Definition at line 71 of file asset.hpp.

◆ operator>=

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

Definition at line 75 of file asset.hpp.

Member Data Documentation

◆ amount

share_type graphene::protocol::asset::amount

Definition at line 36 of file asset.hpp.

◆ asset_id

asset_id_type graphene::protocol::asset::asset_id

Definition at line 37 of file asset.hpp.


The documentation for this struct was generated from the following files:
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy