|
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 | integral () 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 constexpr std::uint64_t | cMinValue = 1'000'000'000'000'000ull |
| static constexpr std::uint64_t | cMaxValue = cMinValue * 10 - 1 |
| static constexpr std::uint64_t | cMaxNative = 9'000'000'000'000'000'000ull |
| static constexpr std::uint64_t | cMaxNativeN = 100'000'000'000'000'000ull |
| static constexpr std::uint64_t | cIssuedCurrency = 0x8'000'000'000'000'000ull |
| static constexpr std::uint64_t | cPositive = 0x4'000'000'000'000'000ull |
| static constexpr std::uint64_t | cMPToken = 0x2'000'000'000'000'000ull |
| static constexpr std::uint64_t | 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 xrpl::STAmount::exponent_type = int |
Definition at line 34 of file STAmount.h.
Definition at line 35 of file STAmount.h.
| using xrpl::STAmount::value_type = STAmount |
Definition at line 44 of file STAmount.h.
| xrpl::STAmount::STAmount | ( | SerialIter & | sit, |
| SField const & | name | ||
| ) |
Definition at line 101 of file STAmount.cpp.
| xrpl::STAmount::STAmount | ( | SField const & | name, |
| A const & | asset, | ||
| mantissa_type | mantissa, | ||
| exponent_type | exponent, | ||
| bool | negative, | ||
| unchecked | |||
| ) |
Definition at line 308 of file STAmount.h.
| xrpl::STAmount::STAmount | ( | A const & | asset, |
| mantissa_type | mantissa, | ||
| exponent_type | exponent, | ||
| bool | negative, | ||
| unchecked | |||
| ) |
Definition at line 324 of file STAmount.h.
| xrpl::STAmount::STAmount | ( | SField const & | name, |
| A const & | asset, | ||
| mantissa_type | mantissa = 0, |
||
| exponent_type | exponent = 0, |
||
| bool | negative = false |
||
| ) |
Definition at line 335 of file STAmount.h.
| xrpl::STAmount::STAmount | ( | SField const & | name, |
| std::int64_t | mantissa | ||
| ) |
Definition at line 183 of file STAmount.cpp.
| xrpl::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.
| xrpl::STAmount::STAmount | ( | A const & | asset, |
| std::uint64_t | mantissa = 0, |
||
| int | exponent = 0, |
||
| bool | negative = false |
||
| ) |
Definition at line 112 of file STAmount.h.
| xrpl::STAmount::STAmount | ( | A const & | asset, |
| std::uint32_t | mantissa, | ||
| int | exponent = 0, |
||
| bool | negative = false |
||
| ) |
Definition at line 364 of file STAmount.h.
| xrpl::STAmount::STAmount | ( | A const & | asset, |
| std::int64_t | mantissa, | ||
| int | exponent = 0 |
||
| ) |
Definition at line 356 of file STAmount.h.
| xrpl::STAmount::STAmount | ( | A const & | asset, |
| int | mantissa, | ||
| int | exponent = 0 |
||
| ) |
Definition at line 374 of file STAmount.h.
| xrpl::STAmount::STAmount | ( | A const & | asset, |
| Number const & | number | ||
| ) |
Definition at line 140 of file STAmount.h.
Definition at line 380 of file STAmount.h.
| xrpl::STAmount::STAmount | ( | XRPAmount const & | amount | ) |
Definition at line 229 of file STAmount.cpp.
Definition at line 393 of file STAmount.h.
| xrpl::STAmount::operator Number | ( | ) | const |
Definition at line 522 of file STAmount.h.
|
noexcept |
Definition at line 438 of file STAmount.h.
|
noexcept |
Definition at line 444 of file STAmount.h.
|
noexcept |
Definition at line 450 of file STAmount.h.
|
constexprnoexcept |
Definition at line 457 of file STAmount.h.
|
noexcept |
Definition at line 463 of file STAmount.h.
|
noexcept |
Definition at line 469 of file STAmount.h.
| Asset const & xrpl::STAmount::asset | ( | ) | const |
Definition at line 475 of file STAmount.h.
|
constexpr |
| Issue const & xrpl::STAmount::issue | ( | ) | const |
Definition at line 488 of file STAmount.h.
| Currency const & xrpl::STAmount::getCurrency | ( | ) | const |
Definition at line 494 of file STAmount.h.
| AccountID const & xrpl::STAmount::getIssuer | ( | ) | const |
Definition at line 500 of file STAmount.h.
|
noexcept |
Definition at line 506 of file STAmount.h.
| STAmount xrpl::STAmount::zeroed | ( | ) | const |
Returns a zero value with the same issuer and currency.
Definition at line 512 of file STAmount.h.
| void xrpl::STAmount::setJson | ( | Json::Value & | elem | ) | const |
Definition at line 623 of file STAmount.cpp.
|
noexcept |
Definition at line 586 of file STAmount.h.
|
explicitnoexcept |
Definition at line 517 of file STAmount.h.
Definition at line 330 of file STAmount.cpp.
Definition at line 337 of file STAmount.cpp.
| STAmount & xrpl::STAmount::operator= | ( | beast::Zero | ) |
Definition at line 532 of file STAmount.h.
Definition at line 539 of file STAmount.h.
Definition at line 546 of file STAmount.h.
| void xrpl::STAmount::negate | ( | ) |
Definition at line 556 of file STAmount.h.
| void xrpl::STAmount::clear | ( | ) |
Definition at line 563 of file STAmount.h.
| void xrpl::STAmount::clear | ( | Asset const & | asset | ) |
Definition at line 573 of file STAmount.h.
| void xrpl::STAmount::setIssuer | ( | AccountID const & | uIssuer | ) |
Definition at line 580 of file STAmount.h.
| void xrpl::STAmount::setIssue | ( | Asset const & | asset | ) |
Set the Issue for this amount.
Definition at line 428 of file STAmount.cpp.
|
overridevirtual |
Reimplemented from xrpl::STBase.
Definition at line 647 of file STAmount.cpp.
|
overridevirtual |
Reimplemented from xrpl::STBase.
Definition at line 653 of file STAmount.cpp.
|
overridevirtual |
Reimplemented from xrpl::STBase.
Definition at line 663 of file STAmount.cpp.
|
overridevirtual |
Reimplemented from xrpl::STBase.
Definition at line 751 of file STAmount.cpp.
|
overridevirtual |
Reimplemented from xrpl::STBase.
Definition at line 759 of file STAmount.cpp.
|
overridevirtual |
Reimplemented from xrpl::STBase.
Definition at line 798 of file STAmount.cpp.
|
overridevirtual |
Reimplemented from xrpl::STBase.
Definition at line 805 of file STAmount.cpp.
| XRPAmount xrpl::STAmount::xrp | ( | ) | const |
Definition at line 264 of file STAmount.cpp.
| IOUAmount xrpl::STAmount::iou | ( | ) | const |
Definition at line 280 of file STAmount.cpp.
| MPTAmount xrpl::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 829 of file STAmount.cpp.
|
overrideprivatevirtual |
Reimplemented from xrpl::STBase.
Definition at line 247 of file STAmount.cpp.
|
overrideprivatevirtual |
Reimplemented from xrpl::STBase.
Definition at line 253 of file STAmount.cpp.
Definition at line 310 of file STAmount.cpp.
|
constexpr |
Definition at line 482 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 301 of file STAmount.h.
Definition at line 344 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.
|
staticconstexpr |
Definition at line 50 of file STAmount.h.
|
staticconstexpr |
Definition at line 52 of file STAmount.h.
|
staticconstexpr |
Definition at line 54 of file STAmount.h.
|
staticconstexpr |
Definition at line 57 of file STAmount.h.
|
staticconstexpr |
Definition at line 58 of file STAmount.h.
|
staticconstexpr |
Definition at line 59 of file STAmount.h.
|
staticconstexpr |
Definition at line 60 of file STAmount.h.
|
staticconstexpr |
Definition at line 61 of file STAmount.h.
|
static |
Definition at line 63 of file STAmount.h.