|
rippled
|
#include <STAmount.h>


Classes | |
| struct | unchecked |
Public Types | |
| using | mantissa_type = std::uint64_t |
| using | exponent_type = int |
| using | rep = std::pair< mantissa_type, exponent_type > |
| using | value_type = STAmount |
Public Member Functions | |
| STAmount (SerialIter &sit, SField const &name) | |
| template<AssetType A> | |
| STAmount (SField const &name, A const &asset, mantissa_type mantissa, exponent_type exponent, bool negative, unchecked) | |
| template<AssetType A> | |
| STAmount (A const &asset, mantissa_type mantissa, exponent_type exponent, bool negative, unchecked) | |
| template<AssetType A> | |
| STAmount (SField const &name, A const &asset, mantissa_type mantissa=0, exponent_type exponent=0, bool negative=false) | |
| STAmount (SField const &name, std::int64_t mantissa) | |
| STAmount (SField const &name, std::uint64_t mantissa=0, bool negative=false) | |
| STAmount (std::uint64_t mantissa=0, bool negative=false) | |
| STAmount (SField const &name, STAmount const &amt) | |
| template<AssetType A> | |
| STAmount (A const &asset, std::uint64_t mantissa=0, int exponent=0, bool negative=false) | |
| template<AssetType A> | |
| STAmount (A const &asset, std::uint32_t mantissa, int exponent=0, bool negative=false) | |
| template<AssetType A> | |
| STAmount (A const &asset, std::int64_t mantissa, int exponent=0) | |
| template<AssetType A> | |
| STAmount (A const &asset, int mantissa, int exponent=0) | |
| template<AssetType A> | |
| STAmount (A const &asset, Number const &number) | |
| STAmount (IOUAmount const &amount, Issue const &issue) | |
| STAmount (XRPAmount const &amount) | |
| STAmount (MPTAmount const &amount, MPTIssue const &mptIssue) | |
| operator Number () const | |
| int | exponent () const noexcept |
| bool | native () const noexcept |
| template<ValidIssueType TIss> | |
| constexpr bool | holds () const noexcept |
| bool | negative () const noexcept |
| std::uint64_t | mantissa () const noexcept |
| Asset const & | asset () const |
| template<ValidIssueType TIss> | |
| constexpr TIss const & | get () const |
| Issue const & | issue () const |
| Currency const & | getCurrency () const |
| AccountID const & | getIssuer () const |
| int | signum () const noexcept |
| STAmount | zeroed () const |
| Returns a zero value with the same issuer and currency. | |
| void | setJson (Json::Value &) const |
| STAmount const & | value () const noexcept |
| operator bool () const noexcept | |
| STAmount & | operator+= (STAmount const &) |
| STAmount & | operator-= (STAmount const &) |
| STAmount & | operator= (beast::Zero) |
| STAmount & | operator= (XRPAmount const &amount) |
| STAmount & | operator= (Number const &) |
| void | negate () |
| void | clear () |
| void | clear (Asset const &asset) |
| void | setIssuer (AccountID const &uIssuer) |
| void | setIssue (Asset const &asset) |
| Set the Issue for this amount. | |
| SerializedTypeID | getSType () const override |
| std::string | getFullText () const override |
| std::string | getText () const override |
| Json::Value | getJson (JsonOptions=JsonOptions::none) const override |
| void | add (Serializer &s) const override |
| bool | isEquivalent (STBase const &t) const override |
| bool | isDefault () const override |
| XRPAmount | xrp () const |
| IOUAmount | iou () const |
| MPTAmount | mpt () const |
| template<ValidIssueType TIss> | |
| constexpr TIss const & | get () const |
| bool | operator== (STBase const &t) const |
| bool | operator!= (STBase const &t) const |
| template<class D > | |
| D & | downcast () |
| template<class D > | |
| D const & | downcast () const |
| template<class D > | |
| D const & | downcast () const |
| void | setFName (SField const &n) |
| A STBase is a field. | |
| SField const & | getFName () const |
| void | addFieldID (Serializer &s) const |
Static Public Attributes | |
| static int const | cMinOffset = -96 |
| static int const | cMaxOffset = 80 |
| static std::uint64_t const | cMinValue = 1000000000000000ull |
| static std::uint64_t const | cMaxValue = 9999999999999999ull |
| static std::uint64_t const | cMaxNative = 9000000000000000000ull |
| static std::uint64_t const | cMaxNativeN = 100000000000000000ull |
| static std::uint64_t const | cIssuedCurrency = 0x8000000000000000ull |
| static std::uint64_t const | cPositive = 0x4000000000000000ull |
| static std::uint64_t const | cMPToken = 0x2000000000000000ull |
| static std::uint64_t const | cValueMask = ~(cPositive | cMPToken) |
| static std::uint64_t const | uRateOne = getRate(STAmount(1), STAmount(1)) |
Static Protected Member Functions | |
| template<class T > | |
| static STBase * | emplace (std::size_t n, void *buf, T &&val) |
Private Member Functions | |
| void | set (std::int64_t v) |
| void | canonicalize () |
| STBase * | copy (std::size_t n, void *buf) const override |
| STBase * | move (std::size_t n, void *buf) override |
| STAmount & | operator= (IOUAmount const &iou) |
Static Private Member Functions | |
| static std::unique_ptr< STAmount > | construct (SerialIter &, SField const &name) |
| static auto & | getCounter () noexcept |
Private Attributes | |
| Asset | mAsset |
| mantissa_type | mValue |
| exponent_type | mOffset |
| bool | mIsNegative |
| SField const * | fName |
Friends | |
| class | detail::STVar |
| STAmount | operator+ (STAmount const &v1, STAmount const &v2) |
Definition at line 30 of file STAmount.h.
Definition at line 33 of file STAmount.h.
| using ripple::STAmount::exponent_type = int |
Definition at line 34 of file STAmount.h.
Definition at line 35 of file STAmount.h.
| using ripple::STAmount::value_type = STAmount |
Definition at line 44 of file STAmount.h.
| ripple::STAmount::STAmount | ( | SerialIter & | sit, |
| SField const & | name | ||
| ) |
Definition at line 101 of file STAmount.cpp.
| ripple::STAmount::STAmount | ( | SField const & | name, |
| A const & | asset, | ||
| mantissa_type | mantissa, | ||
| exponent_type | exponent, | ||
| bool | negative, | ||
| unchecked | |||
| ) |
Definition at line 303 of file STAmount.h.
| ripple::STAmount::STAmount | ( | A const & | asset, |
| mantissa_type | mantissa, | ||
| exponent_type | exponent, | ||
| bool | negative, | ||
| unchecked | |||
| ) |
Definition at line 319 of file STAmount.h.
| ripple::STAmount::STAmount | ( | SField const & | name, |
| A const & | asset, | ||
| mantissa_type | mantissa = 0, |
||
| exponent_type | exponent = 0, |
||
| bool | negative = false |
||
| ) |
Definition at line 330 of file STAmount.h.
| ripple::STAmount::STAmount | ( | SField const & | name, |
| std::int64_t | mantissa | ||
| ) |
Definition at line 183 of file STAmount.cpp.
| ripple::STAmount::STAmount | ( | SField const & | name, |
| std::uint64_t | mantissa = 0, |
||
| bool | negative = false |
||
| ) |
Definition at line 189 of file STAmount.cpp.
|
explicit |
Definition at line 217 of file STAmount.cpp.
Definition at line 202 of file STAmount.cpp.
| ripple::STAmount::STAmount | ( | A const & | asset, |
| std::uint64_t | mantissa = 0, |
||
| int | exponent = 0, |
||
| bool | negative = false |
||
| ) |
Definition at line 110 of file STAmount.h.
| ripple::STAmount::STAmount | ( | A const & | asset, |
| std::uint32_t | mantissa, | ||
| int | exponent = 0, |
||
| bool | negative = false |
||
| ) |
Definition at line 359 of file STAmount.h.
| ripple::STAmount::STAmount | ( | A const & | asset, |
| std::int64_t | mantissa, | ||
| int | exponent = 0 |
||
| ) |
Definition at line 351 of file STAmount.h.
| ripple::STAmount::STAmount | ( | A const & | asset, |
| int | mantissa, | ||
| int | exponent = 0 |
||
| ) |
Definition at line 369 of file STAmount.h.
| ripple::STAmount::STAmount | ( | A const & | asset, |
| Number const & | number | ||
| ) |
Definition at line 138 of file STAmount.h.
Definition at line 375 of file STAmount.h.
| ripple::STAmount::STAmount | ( | XRPAmount const & | amount | ) |
Definition at line 229 of file STAmount.cpp.
Definition at line 388 of file STAmount.h.
| ripple::STAmount::operator Number | ( | ) | const |
Definition at line 511 of file STAmount.h.
|
noexcept |
Definition at line 433 of file STAmount.h.
|
noexcept |
Definition at line 439 of file STAmount.h.
|
constexprnoexcept |
Definition at line 446 of file STAmount.h.
|
noexcept |
Definition at line 452 of file STAmount.h.
|
noexcept |
Definition at line 458 of file STAmount.h.
| Asset const & ripple::STAmount::asset | ( | ) | const |
Definition at line 464 of file STAmount.h.
|
constexpr |
| Issue const & ripple::STAmount::issue | ( | ) | const |
Definition at line 477 of file STAmount.h.
| Currency const & ripple::STAmount::getCurrency | ( | ) | const |
Definition at line 483 of file STAmount.h.
| AccountID const & ripple::STAmount::getIssuer | ( | ) | const |
Definition at line 489 of file STAmount.h.
|
noexcept |
Definition at line 495 of file STAmount.h.
| STAmount ripple::STAmount::zeroed | ( | ) | const |
Returns a zero value with the same issuer and currency.
Definition at line 501 of file STAmount.h.
| void ripple::STAmount::setJson | ( | Json::Value & | elem | ) | const |
Definition at line 624 of file STAmount.cpp.
|
noexcept |
Definition at line 575 of file STAmount.h.
|
explicitnoexcept |
Definition at line 506 of file STAmount.h.
Definition at line 331 of file STAmount.cpp.
Definition at line 338 of file STAmount.cpp.
| STAmount & ripple::STAmount::operator= | ( | beast::Zero | ) |
Definition at line 521 of file STAmount.h.
Definition at line 528 of file STAmount.h.
Definition at line 535 of file STAmount.h.
| void ripple::STAmount::negate | ( | ) |
Definition at line 545 of file STAmount.h.
| void ripple::STAmount::clear | ( | ) |
Definition at line 552 of file STAmount.h.
| void ripple::STAmount::clear | ( | Asset const & | asset | ) |
Definition at line 562 of file STAmount.h.
| void ripple::STAmount::setIssuer | ( | AccountID const & | uIssuer | ) |
Definition at line 569 of file STAmount.h.
| void ripple::STAmount::setIssue | ( | Asset const & | asset | ) |
Set the Issue for this amount.
Definition at line 429 of file STAmount.cpp.
|
overridevirtual |
Reimplemented from ripple::STBase.
Definition at line 648 of file STAmount.cpp.
|
overridevirtual |
Reimplemented from ripple::STBase.
Definition at line 654 of file STAmount.cpp.
|
overridevirtual |
Reimplemented from ripple::STBase.
Definition at line 664 of file STAmount.cpp.
|
overridevirtual |
Reimplemented from ripple::STBase.
Definition at line 753 of file STAmount.cpp.
|
overridevirtual |
Reimplemented from ripple::STBase.
Definition at line 761 of file STAmount.cpp.
|
overridevirtual |
Reimplemented from ripple::STBase.
Definition at line 800 of file STAmount.cpp.
|
overridevirtual |
Reimplemented from ripple::STBase.
Definition at line 807 of file STAmount.cpp.
| XRPAmount ripple::STAmount::xrp | ( | ) | const |
Definition at line 264 of file STAmount.cpp.
| IOUAmount ripple::STAmount::iou | ( | ) | const |
Definition at line 280 of file STAmount.cpp.
| MPTAmount ripple::STAmount::mpt | ( | ) | const |
Definition at line 295 of file STAmount.cpp.
|
staticprivate |
Definition at line 241 of file STAmount.cpp.
|
private |
Definition at line 948 of file STAmount.cpp.
|
private |
Definition at line 831 of file STAmount.cpp.
|
overrideprivatevirtual |
Reimplemented from ripple::STBase.
Definition at line 247 of file STAmount.cpp.
|
overrideprivatevirtual |
Reimplemented from ripple::STBase.
Definition at line 253 of file STAmount.cpp.
Definition at line 310 of file STAmount.cpp.
|
constexpr |
Definition at line 471 of file STAmount.h.
|
inherited |
Definition at line 32 of file STBase.cpp.
|
inherited |
Definition at line 38 of file STBase.cpp.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Definition at line 124 of file STBase.cpp.
|
inherited |
Definition at line 130 of file STBase.cpp.
|
staticprotectedinherited |
|
staticprivatenoexceptinherited |
Definition at line 110 of file CountedObject.h.
|
friend |
Definition at line 296 of file STAmount.h.
Definition at line 345 of file STAmount.cpp.
|
private |
Definition at line 38 of file STAmount.h.
|
private |
Definition at line 39 of file STAmount.h.
|
private |
Definition at line 40 of file STAmount.h.
|
private |
Definition at line 41 of file STAmount.h.
|
static |
Definition at line 46 of file STAmount.h.
|
static |
Definition at line 47 of file STAmount.h.
|
static |
Definition at line 50 of file STAmount.h.
|
static |
Definition at line 51 of file STAmount.h.
|
static |
Definition at line 52 of file STAmount.h.
|
static |
Definition at line 55 of file STAmount.h.
|
static |
Definition at line 56 of file STAmount.h.
|
static |
Definition at line 57 of file STAmount.h.
|
static |
Definition at line 58 of file STAmount.h.
|
static |
Definition at line 59 of file STAmount.h.
|
static |
Definition at line 61 of file STAmount.h.