|
ledger-core
|
#include <Amount.hpp>
Inheritance diagram for ledger::core::api::Amount:Public Member Functions | |
| virtual std::shared_ptr< BigInt > | toBigInt ()=0 |
| virtual Currency | getCurrency ()=0 |
| virtual CurrencyUnit | getUnit ()=0 |
| virtual std::shared_ptr< Amount > | toUnit (const CurrencyUnit &unit)=0 |
| virtual std::shared_ptr< Amount > | toMagnitude (int32_t magnitude)=0 |
| virtual std::string | toString ()=0 |
| virtual int64_t | toLong ()=0 |
| virtual double | toDouble ()=0 |
| virtual std::string | format (const Locale &locale, const std::experimental::optional< FormatRules > &rules)=0 |
Static Public Member Functions | |
| static std::shared_ptr< Amount > | fromHex (const Currency ¤cy, const std::string &hex) |
| static std::shared_ptr< Amount > | fromLong (const Currency ¤cy, int64_t value) |
Class representing amount of transaction, output, inputs…
|
pure virtual |
Format an amount with a locale and some formatting rules.
|
static |
Transform an hexadecimal string into an amount (expressed in the given currency).
|
static |
Transform a 64-bit number into an amount (expressed in the given currency).
|
pure virtual |
Get currency in which amount was computed.
Implemented in ledger::core::Amount.
|
pure virtual |
Get currency unit in which amount was computed.
Implemented in ledger::core::Amount.
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
Get an amount that is equal to the given magnitude in the units system.
Implemented in ledger::core::Amount.
|
pure virtual |
|
pure virtual |
Convert amount in another currency unit.
| CurrencyUnit | object, target currency unit |
Implemented in ledger::core::Amount.
1.8.13