|
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 49 of file STAmount.h.
Definition at line 52 of file STAmount.h.
| using ripple::STAmount::exponent_type = int |
Definition at line 53 of file STAmount.h.
Definition at line 54 of file STAmount.h.
| using ripple::STAmount::value_type = STAmount |
Definition at line 63 of file STAmount.h.
| ripple::STAmount::STAmount | ( | SerialIter & | sit, |
| SField const & | name | ||
| ) |
Definition at line 143 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 322 of file STAmount.h.
| ripple::STAmount::STAmount | ( | A const & | asset, |
| mantissa_type | mantissa, | ||
| exponent_type | exponent, | ||
| bool | negative, | ||
| unchecked | |||
| ) |
Definition at line 338 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 349 of file STAmount.h.
| ripple::STAmount::STAmount | ( | SField const & | name, |
| std::int64_t | mantissa | ||
| ) |
Definition at line 225 of file STAmount.cpp.
| ripple::STAmount::STAmount | ( | SField const & | name, |
| std::uint64_t | mantissa = 0, |
||
| bool | negative = false |
||
| ) |
Definition at line 231 of file STAmount.cpp.
|
explicit |
Definition at line 259 of file STAmount.cpp.
Definition at line 244 of file STAmount.cpp.
| ripple::STAmount::STAmount | ( | A const & | asset, |
| std::uint64_t | mantissa = 0, |
||
| int | exponent = 0, |
||
| bool | negative = false |
||
| ) |
Definition at line 129 of file STAmount.h.
| ripple::STAmount::STAmount | ( | A const & | asset, |
| std::uint32_t | mantissa, | ||
| int | exponent = 0, |
||
| bool | negative = false |
||
| ) |
Definition at line 378 of file STAmount.h.
| ripple::STAmount::STAmount | ( | A const & | asset, |
| std::int64_t | mantissa, | ||
| int | exponent = 0 |
||
| ) |
Definition at line 370 of file STAmount.h.
| ripple::STAmount::STAmount | ( | A const & | asset, |
| int | mantissa, | ||
| int | exponent = 0 |
||
| ) |
Definition at line 388 of file STAmount.h.
| ripple::STAmount::STAmount | ( | A const & | asset, |
| Number const & | number | ||
| ) |
Definition at line 157 of file STAmount.h.
Definition at line 394 of file STAmount.h.
| ripple::STAmount::STAmount | ( | XRPAmount const & | amount | ) |
Definition at line 271 of file STAmount.cpp.
Definition at line 407 of file STAmount.h.
| ripple::STAmount::operator Number | ( | ) | const |
Definition at line 530 of file STAmount.h.
|
noexcept |
Definition at line 452 of file STAmount.h.
|
noexcept |
Definition at line 458 of file STAmount.h.
|
constexprnoexcept |
Definition at line 465 of file STAmount.h.
|
noexcept |
Definition at line 471 of file STAmount.h.
|
noexcept |
Definition at line 477 of file STAmount.h.
| Asset const & ripple::STAmount::asset | ( | ) | const |
Definition at line 483 of file STAmount.h.
|
constexpr |
| Issue const & ripple::STAmount::issue | ( | ) | const |
Definition at line 496 of file STAmount.h.
| Currency const & ripple::STAmount::getCurrency | ( | ) | const |
Definition at line 502 of file STAmount.h.
| AccountID const & ripple::STAmount::getIssuer | ( | ) | const |
Definition at line 508 of file STAmount.h.
|
noexcept |
Definition at line 514 of file STAmount.h.
| STAmount ripple::STAmount::zeroed | ( | ) | const |
Returns a zero value with the same issuer and currency.
Definition at line 520 of file STAmount.h.
| void ripple::STAmount::setJson | ( | Json::Value & | elem | ) | const |
Definition at line 666 of file STAmount.cpp.
|
noexcept |
Definition at line 594 of file STAmount.h.
|
explicitnoexcept |
Definition at line 525 of file STAmount.h.
Definition at line 373 of file STAmount.cpp.
Definition at line 380 of file STAmount.cpp.
| STAmount & ripple::STAmount::operator= | ( | beast::Zero | ) |
Definition at line 540 of file STAmount.h.
Definition at line 547 of file STAmount.h.
Definition at line 554 of file STAmount.h.
| void ripple::STAmount::negate | ( | ) |
Definition at line 564 of file STAmount.h.
| void ripple::STAmount::clear | ( | ) |
Definition at line 571 of file STAmount.h.
| void ripple::STAmount::clear | ( | Asset const & | asset | ) |
Definition at line 581 of file STAmount.h.
| void ripple::STAmount::setIssuer | ( | AccountID const & | uIssuer | ) |
Definition at line 588 of file STAmount.h.
| void ripple::STAmount::setIssue | ( | Asset const & | asset | ) |
Set the Issue for this amount.
Definition at line 471 of file STAmount.cpp.
|
overridevirtual |
Reimplemented from ripple::STBase.
Definition at line 690 of file STAmount.cpp.
|
overridevirtual |
Reimplemented from ripple::STBase.
Definition at line 696 of file STAmount.cpp.
|
overridevirtual |
Reimplemented from ripple::STBase.
Definition at line 706 of file STAmount.cpp.
|
overridevirtual |
Reimplemented from ripple::STBase.
Definition at line 795 of file STAmount.cpp.
|
overridevirtual |
Reimplemented from ripple::STBase.
Definition at line 803 of file STAmount.cpp.
|
overridevirtual |
Reimplemented from ripple::STBase.
Definition at line 842 of file STAmount.cpp.
|
overridevirtual |
Reimplemented from ripple::STBase.
Definition at line 849 of file STAmount.cpp.
| XRPAmount ripple::STAmount::xrp | ( | ) | const |
Definition at line 306 of file STAmount.cpp.
| IOUAmount ripple::STAmount::iou | ( | ) | const |
Definition at line 322 of file STAmount.cpp.
| MPTAmount ripple::STAmount::mpt | ( | ) | const |
Definition at line 337 of file STAmount.cpp.
|
staticprivate |
Definition at line 283 of file STAmount.cpp.
|
private |
Definition at line 996 of file STAmount.cpp.
|
private |
Definition at line 873 of file STAmount.cpp.
|
overrideprivatevirtual |
Reimplemented from ripple::STBase.
Definition at line 289 of file STAmount.cpp.
|
overrideprivatevirtual |
Reimplemented from ripple::STBase.
Definition at line 295 of file STAmount.cpp.
Definition at line 352 of file STAmount.cpp.
|
constexpr |
Definition at line 490 of file STAmount.h.
|
inherited |
Definition at line 51 of file STBase.cpp.
|
inherited |
Definition at line 57 of file STBase.cpp.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Definition at line 141 of file STBase.cpp.
|
inherited |
Definition at line 147 of file STBase.cpp.
|
staticprotectedinherited |
|
staticprivatenoexceptinherited |
Definition at line 129 of file CountedObject.h.
|
friend |
Definition at line 315 of file STAmount.h.
Definition at line 387 of file STAmount.cpp.
|
private |
Definition at line 57 of file STAmount.h.
|
private |
Definition at line 58 of file STAmount.h.
|
private |
Definition at line 59 of file STAmount.h.
|
private |
Definition at line 60 of file STAmount.h.
|
static |
Definition at line 65 of file STAmount.h.
|
static |
Definition at line 66 of file STAmount.h.
|
static |
Definition at line 69 of file STAmount.h.
|
static |
Definition at line 70 of file STAmount.h.
|
static |
Definition at line 71 of file STAmount.h.
|
static |
Definition at line 74 of file STAmount.h.
|
static |
Definition at line 75 of file STAmount.h.
|
static |
Definition at line 76 of file STAmount.h.
|
static |
Definition at line 77 of file STAmount.h.
|
static |
Definition at line 78 of file STAmount.h.
|
static |
Definition at line 80 of file STAmount.h.