ledger-core
|
Public Member Functions | |
Amount (const api::Currency ¤cy, int32_t unitIndex, const BigInt &value) | |
Amount (const api::Currency ¤cy, int32_t unitIndex, BigInt &&value) | |
std::shared_ptr< api::BigInt > | toBigInt () override |
api::Currency | getCurrency () override |
api::CurrencyUnit | getUnit () override |
std::shared_ptr< api::Amount > | toUnit (const api::CurrencyUnit &unit) override |
std::string | toString () override |
int64_t | toLong () override |
double | toDouble () override |
std::string | format (const api::Locale &locale, const optional< api::FormatRules > &rules) override |
std::shared_ptr< api::Amount > | toMagnitude (int32_t magnitude) override |
std::shared_ptr< ledger::core::BigInt > | value () const |
![]() | |
virtual std::string | format (const Locale &locale, const std::experimental::optional< FormatRules > &rules)=0 |
Additional Inherited Members | |
![]() | |
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) |
|
overridevirtual |
Get currency in which amount was computed.
Implements ledger::core::api::Amount.
|
overridevirtual |
Get currency unit in which amount was computed.
Implements ledger::core::api::Amount.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
Get an amount that is equal to the given magnitude in the units system.
Implements ledger::core::api::Amount.
|
overridevirtual |
|
overridevirtual |
Convert amount in another currency unit.
CurrencyUnit | object, target currency unit |
Implements ledger::core::api::Amount.