|
rippled
|
A serializable number. More...
#include <STNumber.h>


Public Types | |
| using | value_type = Number |
Public Member Functions | |
| STNumber ()=default | |
| STNumber (SField const &field, Number const &value=Number()) | |
| STNumber (SerialIter &sit, SField const &field) | |
| SerializedTypeID | getSType () const override |
| std::string | getText () const override |
| void | add (Serializer &s) const override |
| Number const & | value () const |
| void | setValue (Number const &v) |
| STNumber & | operator= (Number const &rhs) |
| bool | isEquivalent (STBase const &t) const override |
| bool | isDefault () const override |
| operator Number () 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 |
| virtual std::string | getFullText () const |
| virtual Json::Value | getJson (JsonOptions=JsonOptions::none) const |
| void | setFName (SField const &n) |
| A STBase is a field. | |
| SField const & | getFName () const |
| void | addFieldID (Serializer &s) const |
Static Protected Member Functions | |
| template<class T > | |
| static STBase * | emplace (std::size_t n, void *buf, T &&val) |
Private Member Functions | |
| STBase * | copy (std::size_t n, void *buf) const override |
| STBase * | move (std::size_t n, void *buf) override |
Static Private Member Functions | |
| static auto & | getCounter () noexcept |
Private Attributes | |
| Number | value_ |
| SField const * | fName |
A serializable number.
This type is-a Number, and can be used everywhere that is accepted. This type simply integrates Number with the serialization framework, letting it be used for fields in ledger entries and transactions. It is effectively an STAmount sans Asset: it can represent a value of any token type (XRP, IOU, or MPT) without paying the storage cost of duplicating asset information that may be deduced from the context.
Definition at line 23 of file STNumber.h.
| using ripple::STNumber::value_type = Number |
Definition at line 29 of file STNumber.h.
|
default |
Definition at line 19 of file STNumber.cpp.
| ripple::STNumber::STNumber | ( | SerialIter & | sit, |
| SField const & | field | ||
| ) |
Definition at line 24 of file STNumber.cpp.
|
overridevirtual |
Reimplemented from ripple::STBase.
Definition at line 34 of file STNumber.cpp.
|
overridevirtual |
Reimplemented from ripple::STBase.
Definition at line 40 of file STNumber.cpp.
|
overridevirtual |
Reimplemented from ripple::STBase.
Definition at line 46 of file STNumber.cpp.
| Number const & ripple::STNumber::value | ( | ) | const |
Definition at line 58 of file STNumber.cpp.
| void ripple::STNumber::setValue | ( | Number const & | v | ) |
Definition at line 64 of file STNumber.cpp.
Definition at line 48 of file STNumber.h.
|
overridevirtual |
Reimplemented from ripple::STBase.
Definition at line 82 of file STNumber.cpp.
|
overridevirtual |
Reimplemented from ripple::STBase.
Definition at line 92 of file STNumber.cpp.
| ripple::STNumber::operator Number | ( | ) | const |
Definition at line 59 of file STNumber.h.
|
overrideprivatevirtual |
Reimplemented from ripple::STBase.
Definition at line 70 of file STNumber.cpp.
|
overrideprivatevirtual |
Reimplemented from ripple::STBase.
Definition at line 76 of file STNumber.cpp.
|
inherited |
Definition at line 32 of file STBase.cpp.
|
inherited |
Definition at line 38 of file STBase.cpp.
|
inherited |
|
inherited |
|
inherited |
|
virtualinherited |
Reimplemented in ripple::STAmount, ripple::STArray, ripple::STLedgerEntry, ripple::STObject, and ripple::STTx.
Definition at line 62 of file STBase.cpp.
|
virtualinherited |
Reimplemented in ripple::STArray, ripple::STTx, ripple::STLedgerEntry, ripple::STCurrency, ripple::STInteger< Integer >, ripple::STIssue, ripple::STPathSet, ripple::STVector256, ripple::STXChainBridge, ripple::STAmount, and ripple::STObject.
Definition at line 87 of file STBase.cpp.
|
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.
|
private |
Definition at line 26 of file STNumber.h.