rippled
|
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) | |
STAmount (SField const &name, Issue const &issue, mantissa_type mantissa, exponent_type exponent, bool native, bool negative, unchecked) | |
STAmount (Issue const &issue, mantissa_type mantissa, exponent_type exponent, bool native, bool negative, unchecked) | |
STAmount (SField const &name, Issue const &issue, mantissa_type mantissa, exponent_type exponent, bool native, bool negative) | |
STAmount (SField const &name, std::int64_t mantissa) | |
STAmount (SField const &name, std::uint64_t mantissa=0, bool negative=false) | |
STAmount (SField const &name, Issue const &issue, std::uint64_t mantissa=0, int exponent=0, bool negative=false) | |
STAmount (std::uint64_t mantissa=0, bool negative=false) | |
STAmount (Issue const &issue, std::uint64_t mantissa=0, int exponent=0, bool negative=false) | |
STAmount (Issue const &issue, std::uint32_t mantissa, int exponent=0, bool negative=false) | |
STAmount (Issue const &issue, std::int64_t mantissa, int exponent=0) | |
STAmount (Issue const &issue, int mantissa, int exponent=0) | |
STAmount (IOUAmount const &amount, Issue const &issue) | |
STAmount (XRPAmount const &amount) | |
operator Number () const | |
int | exponent () const noexcept |
bool | native () const noexcept |
bool | negative () const noexcept |
std::uint64_t | mantissa () const noexcept |
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. More... | |
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) |
void | negate () |
void | clear () |
void | clear (STAmount const &saTmpl) |
void | clear (Issue const &issue) |
void | setIssuer (AccountID const &uIssuer) |
void | setIssue (Issue const &issue) |
Set the Issue for this amount and update mIsNative. More... | |
SerializedTypeID | getSType () const override |
std::string | getFullText () const override |
std::string | getText () const override |
Json::Value | getJson (JsonOptions) const override |
void | add (Serializer &s) const override |
bool | isEquivalent (const STBase &t) const override |
bool | isDefault () const override |
XRPAmount | xrp () const |
IOUAmount | iou () const |
bool | operator== (const STBase &t) const |
bool | operator!= (const STBase &t) const |
template<class D > | |
D & | downcast () |
template<class D > | |
D const & | downcast () const |
void | setFName (SField const &n) |
A STBase is a field. More... | |
SField const & | getFName () const |
void | addFieldID (Serializer &s) const |
Static Public Attributes | |
static const int | cMinOffset = -96 |
static const int | cMaxOffset = 80 |
static const std::uint64_t | cMinValue = 1000000000000000ull |
static const std::uint64_t | cMaxValue = 9999999999999999ull |
static const std::uint64_t | cMaxNative = 9000000000000000000ull |
static const std::uint64_t | cMaxNativeN = 100000000000000000ull |
static const std::uint64_t | cNotNative = 0x8000000000000000ull |
static const std::uint64_t | cPosNative = 0x4000000000000000ull |
static const std::uint64_t | 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 | |
Issue | mIssue |
mantissa_type | mValue |
exponent_type | mOffset |
bool | mIsNative |
bool | mIsNegative |
SField const * | fName |
Friends | |
class | detail::STVar |
STAmount | operator+ (STAmount const &v1, STAmount const &v2) |
Definition at line 45 of file STAmount.h.
Definition at line 48 of file STAmount.h.
using ripple::STAmount::exponent_type = int |
Definition at line 49 of file STAmount.h.
Definition at line 50 of file STAmount.h.
using ripple::STAmount::value_type = STAmount |
Definition at line 60 of file STAmount.h.
ripple::STAmount::STAmount | ( | SerialIter & | sit, |
SField const & | name | ||
) |
Definition at line 88 of file STAmount.cpp.
ripple::STAmount::STAmount | ( | SField const & | name, |
Issue const & | issue, | ||
mantissa_type | mantissa, | ||
exponent_type | exponent, | ||
bool | native, | ||
bool | negative, | ||
unchecked | |||
) |
Definition at line 161 of file STAmount.cpp.
ripple::STAmount::STAmount | ( | Issue const & | issue, |
mantissa_type | mantissa, | ||
exponent_type | exponent, | ||
bool | native, | ||
bool | negative, | ||
unchecked | |||
) |
Definition at line 178 of file STAmount.cpp.
ripple::STAmount::STAmount | ( | SField const & | name, |
Issue const & | issue, | ||
mantissa_type | mantissa, | ||
exponent_type | exponent, | ||
bool | native, | ||
bool | negative | ||
) |
Definition at line 193 of file STAmount.cpp.
ripple::STAmount::STAmount | ( | SField const & | name, |
std::int64_t | mantissa | ||
) |
Definition at line 210 of file STAmount.cpp.
ripple::STAmount::STAmount | ( | SField const & | name, |
std::uint64_t | mantissa = 0 , |
||
bool | negative = false |
||
) |
Definition at line 216 of file STAmount.cpp.
ripple::STAmount::STAmount | ( | SField const & | name, |
Issue const & | issue, | ||
std::uint64_t | mantissa = 0 , |
||
int | exponent = 0 , |
||
bool | negative = false |
||
) |
Definition at line 226 of file STAmount.cpp.
|
explicit |
Definition at line 244 of file STAmount.cpp.
ripple::STAmount::STAmount | ( | Issue const & | issue, |
std::uint64_t | mantissa = 0 , |
||
int | exponent = 0 , |
||
bool | negative = false |
||
) |
Definition at line 253 of file STAmount.cpp.
ripple::STAmount::STAmount | ( | Issue const & | issue, |
std::uint32_t | mantissa, | ||
int | exponent = 0 , |
||
bool | negative = false |
||
) |
Definition at line 270 of file STAmount.cpp.
ripple::STAmount::STAmount | ( | Issue const & | issue, |
std::int64_t | mantissa, | ||
int | exponent = 0 |
||
) |
Definition at line 263 of file STAmount.cpp.
ripple::STAmount::STAmount | ( | Issue const & | issue, |
int | mantissa, | ||
int | exponent = 0 |
||
) |
Definition at line 279 of file STAmount.cpp.
Definition at line 285 of file STAmount.cpp.
ripple::STAmount::STAmount | ( | XRPAmount const & | amount | ) |
Definition at line 299 of file STAmount.cpp.
ripple::STAmount::operator Number | ( | ) | const |
Definition at line 381 of file STAmount.h.
|
noexcept |
Definition at line 323 of file STAmount.h.
|
noexcept |
Definition at line 329 of file STAmount.h.
|
noexcept |
Definition at line 335 of file STAmount.h.
|
noexcept |
Definition at line 341 of file STAmount.h.
Issue const & ripple::STAmount::issue | ( | ) | const |
Definition at line 347 of file STAmount.h.
Currency const & ripple::STAmount::getCurrency | ( | ) | const |
Definition at line 353 of file STAmount.h.
AccountID const & ripple::STAmount::getIssuer | ( | ) | const |
Definition at line 359 of file STAmount.h.
|
noexcept |
Definition at line 365 of file STAmount.h.
STAmount ripple::STAmount::zeroed | ( | ) | const |
Returns a zero value with the same issuer and currency.
Definition at line 371 of file STAmount.h.
void ripple::STAmount::setJson | ( | Json::Value & | elem | ) | const |
Definition at line 517 of file STAmount.cpp.
|
noexcept |
Definition at line 440 of file STAmount.h.
|
explicitnoexcept |
Definition at line 376 of file STAmount.h.
Definition at line 383 of file STAmount.cpp.
Definition at line 390 of file STAmount.cpp.
STAmount & ripple::STAmount::operator= | ( | beast::Zero | ) |
Definition at line 388 of file STAmount.h.
Definition at line 395 of file STAmount.h.
void ripple::STAmount::negate | ( | ) |
Definition at line 402 of file STAmount.h.
void ripple::STAmount::clear | ( | ) |
Definition at line 409 of file STAmount.h.
void ripple::STAmount::clear | ( | STAmount const & | saTmpl | ) |
Definition at line 420 of file STAmount.h.
void ripple::STAmount::clear | ( | Issue const & | issue | ) |
Definition at line 426 of file STAmount.h.
void ripple::STAmount::setIssuer | ( | AccountID const & | uIssuer | ) |
Definition at line 433 of file STAmount.h.
void ripple::STAmount::setIssue | ( | Issue const & | issue | ) |
Set the Issue for this amount and update mIsNative.
Definition at line 479 of file STAmount.cpp.
|
overridevirtual |
Reimplemented from ripple::STBase.
Definition at line 542 of file STAmount.cpp.
|
overridevirtual |
Reimplemented from ripple::STBase.
Definition at line 548 of file STAmount.cpp.
|
overridevirtual |
Reimplemented from ripple::STBase.
Definition at line 571 of file STAmount.cpp.
|
overridevirtual |
Reimplemented from ripple::STBase.
Definition at line 655 of file STAmount.cpp.
|
overridevirtual |
Reimplemented from ripple::STBase.
Definition at line 663 of file STAmount.cpp.
|
overridevirtual |
Reimplemented from ripple::STBase.
Definition at line 694 of file STAmount.cpp.
|
overridevirtual |
Reimplemented from ripple::STBase.
Definition at line 701 of file STAmount.cpp.
XRPAmount ripple::STAmount::xrp | ( | ) | const |
Definition at line 334 of file STAmount.cpp.
IOUAmount ripple::STAmount::iou | ( | ) | const |
Definition at line 349 of file STAmount.cpp.
|
staticprivate |
Definition at line 311 of file STAmount.cpp.
|
private |
Definition at line 835 of file STAmount.cpp.
|
private |
Definition at line 725 of file STAmount.cpp.
|
overrideprivatevirtual |
Reimplemented from ripple::STBase.
Definition at line 317 of file STAmount.cpp.
|
overrideprivatevirtual |
Reimplemented from ripple::STBase.
Definition at line 323 of file STAmount.cpp.
Definition at line 364 of file STAmount.cpp.
|
inherited |
Definition at line 45 of file STBase.cpp.
|
inherited |
Definition at line 51 of file STBase.cpp.
|
inherited |
|
inherited |
|
inherited |
Definition at line 132 of file STBase.cpp.
|
inherited |
Definition at line 138 of file STBase.cpp.
|
staticprotectedinherited |
|
staticprivatenoexceptinherited |
Definition at line 128 of file CountedObject.h.
|
friend |
Definition at line 283 of file STAmount.h.
Definition at line 397 of file STAmount.cpp.
|
private |
Definition at line 53 of file STAmount.h.
|
private |
Definition at line 54 of file STAmount.h.
|
private |
Definition at line 55 of file STAmount.h.
|
private |
Definition at line 56 of file STAmount.h.
|
private |
Definition at line 57 of file STAmount.h.
|
static |
Definition at line 62 of file STAmount.h.
|
static |
Definition at line 63 of file STAmount.h.
|
static |
Definition at line 66 of file STAmount.h.
|
static |
Definition at line 67 of file STAmount.h.
|
static |
Definition at line 68 of file STAmount.h.
|
static |
Definition at line 71 of file STAmount.h.
|
static |
Definition at line 72 of file STAmount.h.
|
static |
Definition at line 73 of file STAmount.h.
|
static |
Definition at line 75 of file STAmount.h.