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


struct  Impl

Public Member Functions

 Amount (const std::string &amount)
int sign () const
types::PrecisionType precision () const
std::string toStringRepr () const
bool operator== (const ModelType &rhs) const override
std::string toString () const override
- Public Member Functions inherited from shared_model::interface::ModelPrimitive< Amount >
virtual bool operator== (const ModelType &rhs) const=0
virtual bool operator!= (const ModelType &rhs) const
virtual ~ModelPrimitive ()=default

Additional Inherited Members

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

Detailed Description

Representation of fixed point number

Constructor & Destructor Documentation

◆ Amount()

Amount::Amount ( const std::string &  amount)

Member Function Documentation

◆ operator==()

bool Amount::operator== ( const ModelType rhs) const

Checks equality of objects inside

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

◆ precision()

types::PrecisionType Amount::precision ( ) const

Gets the position of precision

the position of precision
Here is the caller graph for this function:

◆ sign()

int Amount::sign ( ) const

Returns a value less than zero if Amount is negative, a value greater than zero if Amount is positive, and zero if Amount is zero.

Here is the caller graph for this function:

◆ toString()

std::string Amount::toString ( ) const

Stringify the data.

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:

◆ toStringRepr()

std::string Amount::toStringRepr ( ) const

String representation.

string representation of the asset.
Here is the caller graph for this function:

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