hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
shared_model::interface::Amount Class Referencefinal

#include "amount.hpp"

Inheritance diagram for shared_model::interface::Amount:
Inheritance graph
Collaboration diagram for shared_model::interface::Amount:
Collaboration graph

Public Member Functions

 Amount (const std::string &amount)
 
 Amount (std::string &&amount)
 
 Amount (const Amount &o)
 
 Amount (Amount &&o) noexcept
 
const boost::multiprecision::uint256_t & intValue () const
 
types::PrecisionType precision () const
 
std::string toStringRepr () const
 
bool operator== (const ModelType &rhs) const override
 
std::string toString () const override
 
Amountclone () const override
 
- Public Member Functions inherited from shared_model::interface::ModelPrimitive< Amount >
virtual bool operator!= (const ModelType &rhs) const
 
virtual ~ModelPrimitive ()=default
 
- Public Member Functions inherited from Cloneable< ModelPrimitive< Amount > >
virtual ~Cloneable ()=default
 

Additional Inherited Members

- Public Types inherited from shared_model::interface::ModelPrimitive< Amount >
using ModelType = Amount
 
- Public Types inherited from Cloneable< ModelPrimitive< Amount > >
using base_type = ModelPrimitive< Amount >
 

Detailed Description

Representation of fixed point number

Constructor & Destructor Documentation

shared_model::interface::Amount::Amount ( const std::string amount)
explicit

Here is the caller graph for this function:

shared_model::interface::Amount::Amount ( std::string &&  amount)
explicit
shared_model::interface::Amount::Amount ( const Amount o)
shared_model::interface::Amount::Amount ( Amount &&  o)
noexcept

Member Function Documentation

Amount * shared_model::interface::Amount::clone ( ) const
overridevirtual

Polymorphic clone constructor. Method guarantees deep-copy.

Returns
pointer to cloned object

Implements Cloneable< ModelPrimitive< Amount > >.

Here is the call graph for this function:

Here is the caller graph for this function:

const boost::multiprecision::uint256_t & shared_model::interface::Amount::intValue ( ) const

Gets integer representation value, which ignores precision

Returns
amount represented as integer value, which ignores precision

Here is the caller graph for this function:

bool shared_model::interface::Amount::operator== ( const ModelType rhs) const
overridevirtual

Checks equality of objects inside

Parameters
rhs- other wrapped value
Returns
true, if wrapped objects are same

Implements shared_model::interface::ModelPrimitive< Amount >.

types::PrecisionType shared_model::interface::Amount::precision ( ) const

Gets the position of precision

Returns
the position of precision

Here is the caller graph for this function:

std::string shared_model::interface::Amount::toString ( ) const
overridevirtual

Stringify the data.

Returns
the content of asset.

Reimplemented from shared_model::interface::ModelPrimitive< Amount >.

Here is the call graph for this function:

Here is the caller graph for this function:

std::string shared_model::interface::Amount::toStringRepr ( ) const

String representation.

Returns
string representation of the asset.

Here is the caller graph for this function:


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