| 
    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 42 of file STNumber.h.
| using ripple::STNumber::value_type = Number | 
Definition at line 48 of file STNumber.h.
      
  | 
  default | 
Definition at line 38 of file STNumber.cpp.
| ripple::STNumber::STNumber | ( | SerialIter & | sit, | 
| SField const & | field | ||
| ) | 
Definition at line 43 of file STNumber.cpp.
      
  | 
  overridevirtual | 
Reimplemented from ripple::STBase.
Definition at line 53 of file STNumber.cpp.
      
  | 
  overridevirtual | 
Reimplemented from ripple::STBase.
Definition at line 59 of file STNumber.cpp.
      
  | 
  overridevirtual | 
Reimplemented from ripple::STBase.
Definition at line 65 of file STNumber.cpp.
| Number const & ripple::STNumber::value | ( | ) | const | 
Definition at line 77 of file STNumber.cpp.
| void ripple::STNumber::setValue | ( | Number const & | v | ) | 
Definition at line 83 of file STNumber.cpp.
Definition at line 67 of file STNumber.h.
      
  | 
  overridevirtual | 
Reimplemented from ripple::STBase.
Definition at line 101 of file STNumber.cpp.
      
  | 
  overridevirtual | 
Reimplemented from ripple::STBase.
Definition at line 111 of file STNumber.cpp.
| ripple::STNumber::operator Number | ( | ) | const | 
Definition at line 78 of file STNumber.h.
      
  | 
  overrideprivatevirtual | 
Reimplemented from ripple::STBase.
Definition at line 89 of file STNumber.cpp.
      
  | 
  overrideprivatevirtual | 
Reimplemented from ripple::STBase.
Definition at line 95 of file STNumber.cpp.
      
  | 
  inherited | 
Definition at line 51 of file STBase.cpp.
      
  | 
  inherited | 
Definition at line 57 of file STBase.cpp.
      
  | 
  inherited | 
      
  | 
  inherited | 
      
  | 
  inherited | 
      
  | 
  virtualinherited | 
Reimplemented in ripple::STAmount, ripple::STArray, ripple::STLedgerEntry, ripple::STObject, and ripple::STTx.
Definition at line 81 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 106 of file STBase.cpp.
      
  | 
  inherited | 
      
  | 
  inherited | 
Definition at line 143 of file STBase.cpp.
      
  | 
  inherited | 
Definition at line 149 of file STBase.cpp.
      
  | 
  staticprotectedinherited | 
      
  | 
  staticprivatenoexceptinherited | 
Definition at line 129 of file CountedObject.h.
      
  | 
  private | 
Definition at line 45 of file STNumber.h.