|
xrpld
|
#include <STObject.h>


Classes | |
| class | Proxy |
| class | ValueProxy |
| class | OptionalProxy |
| struct | Transform |
| class | FieldErr |
Public Types | |
| using | iterator = boost::transform_iterator<Transform, STObject::list_type::const_iterator> |
Public Member Functions | |
| ~STObject () override=default | |
| STObject (STObject const &)=default | |
| template<typename F> | |
| STObject (SOTemplate const &type, SField const &name, F &&f) | |
| STObject & | operator= (STObject const &)=default |
| STObject (STObject &&) | |
| STObject & | operator= (STObject &&other) |
| STObject (SOTemplate const &type, SField const &name) | |
| STObject (SOTemplate const &type, SerialIter &sit, SField const &name) | |
| STObject (SerialIter &sit, SField const &name, int depth=0) | |
| STObject (SerialIter &&sit, SField const &name) | |
| STObject (SField const &name) | |
| iterator | begin () const |
| iterator | end () const |
| bool | empty () const |
| void | reserve (std::size_t n) |
| void | applyTemplate (SOTemplate const &type) |
| void | applyTemplateFromSField (SField const &) |
| bool | isFree () const |
| void | set (SOTemplate const &) |
| bool | set (SerialIter &u, int depth=0) |
| SerializedTypeID | getSType () const override |
| bool | isEquivalent (STBase const &t) const override |
| bool | isDefault () const override |
| void | add (Serializer &s) const override |
| std::string | getFullText () const override |
| std::string | getText () const override |
| json::Value | getJson (JsonOptions=JsonOptions::Values::None) const override |
| void | addWithoutSigningFields (Serializer &s) const |
| Serializer | getSerializer () const |
| template<class... Args> | |
| std::size_t | emplaceBack (Args &&... args) |
| int | getCount () const |
| bool | setFlag (std::uint32_t) |
| bool | clearFlag (std::uint32_t) |
| bool | isFlag (std::uint32_t) const |
| std::uint32_t | getFlags () const |
| uint256 | getHash (HashPrefix prefix) const |
| uint256 | getSigningHash (HashPrefix prefix) const |
| STBase const & | peekAtIndex (int offset) const |
| STBase & | getIndex (int offset) |
| STBase const * | peekAtPIndex (int offset) const |
| STBase * | getPIndex (int offset) |
| int | getFieldIndex (SField const &field) const |
| SField const & | getFieldSType (int index) const |
| STBase const & | peekAtField (SField const &field) const |
| STBase & | getField (SField const &field) |
| STBase const * | peekAtPField (SField const &field) const |
| STBase * | getPField (SField const &field, bool createOkay=false) |
| unsigned char | getFieldU8 (SField const &field) const |
| std::uint16_t | getFieldU16 (SField const &field) const |
| std::uint32_t | getFieldU32 (SField const &field) const |
| std::uint64_t | getFieldU64 (SField const &field) const |
| uint128 | getFieldH128 (SField const &field) const |
| uint160 | getFieldH160 (SField const &field) const |
| uint192 | getFieldH192 (SField const &field) const |
| uint256 | getFieldH256 (SField const &field) const |
| std::int32_t | getFieldI32 (SField const &field) const |
| AccountID | getAccountID (SField const &field) const |
| Blob | getFieldVL (SField const &field) const |
| STAmount const & | getFieldAmount (SField const &field) const |
| STPathSet const & | getFieldPathSet (SField const &field) const |
| STVector256 const & | getFieldV256 (SField const &field) const |
| STObject | getFieldObject (SField const &field) const |
| STArray const & | getFieldArray (SField const &field) const |
| STCurrency const & | getFieldCurrency (SField const &field) const |
| STNumber const & | getFieldNumber (SField const &field) const |
| template<class T> | |
| T::value_type | operator[] (TypedField< T > const &f) const |
| Get the value of a field. | |
| template<class T> | |
| std::optional< std::decay_t< typename T::value_type > > | operator[] (OptionaledField< T > const &of) const |
| Get the value of a field as a std::optional. | |
| template<class T> | |
| ValueProxy< T > | operator[] (TypedField< T > const &f) |
| Get a modifiable field value. | |
| template<class T> | |
| OptionalProxy< T > | operator[] (OptionaledField< T > const &of) |
| Return a modifiable field value as std::optional. | |
| template<class T> | |
| T::value_type | at (TypedField< T > const &f) const |
| Get the value of a field. | |
| template<class T> | |
| std::optional< std::decay_t< typename T::value_type > > | at (OptionaledField< T > const &of) const |
| Get the value of a field as std::optional. | |
| template<class T> | |
| ValueProxy< T > | at (TypedField< T > const &f) |
| Get a modifiable field value. | |
| template<class T> | |
| OptionalProxy< T > | at (OptionaledField< T > const &of) |
| Return a modifiable field value as std::optional. | |
| void | set (std::unique_ptr< STBase > v) |
| Set a field. | |
| void | set (STBase &&v) |
| void | setFieldU8 (SField const &field, unsigned char) |
| void | setFieldU16 (SField const &field, std::uint16_t) |
| void | setFieldU32 (SField const &field, std::uint32_t) |
| void | setFieldU64 (SField const &field, std::uint64_t) |
| void | setFieldH128 (SField const &field, uint128 const &) |
| void | setFieldH192 (SField const &field, uint192 const &) |
| void | setFieldH256 (SField const &field, uint256 const &) |
| void | setFieldI32 (SField const &field, std::int32_t) |
| void | setFieldVL (SField const &field, Blob const &) |
| void | setFieldVL (SField const &field, Slice const &) |
| void | setAccountID (SField const &field, AccountID const &) |
| void | setFieldAmount (SField const &field, STAmount const &) |
| void | setFieldIssue (SField const &field, STIssue const &) |
| void | setFieldCurrency (SField const &field, STCurrency const &) |
| void | setFieldNumber (SField const &field, STNumber const &) |
| void | setFieldPathSet (SField const &field, STPathSet const &) |
| void | setFieldV256 (SField const &field, STVector256 const &v) |
| void | setFieldArray (SField const &field, STArray const &v) |
| void | setFieldObject (SField const &field, STObject const &v) |
| template<class Tag> | |
| void | setFieldH160 (SField const &field, BaseUInt< 160, Tag > const &v) |
| STObject & | peekFieldObject (SField const &field) |
| STArray & | peekFieldArray (SField const &field) |
| bool | isFieldPresent (SField const &field) const |
| STBase * | makeFieldPresent (SField const &field) |
| void | makeFieldAbsent (SField const &field) |
| bool | delField (SField const &field) |
| void | delField (int index) |
| SOEStyle | getStyle (SField const &field) const |
| bool | hasMatchingEntry (STBase const &) const |
| bool | operator== (STObject const &o) const |
| bool | operator!= (STObject const &o) const |
| template<typename T, typename V> | |
| V const & | getFieldByConstRef (SField const &field, V const &empty) 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 Member Functions | |
| static STObject | makeInnerObject (SField const &name) |
Public Attributes | |
| friend | Object |
Static Protected Member Functions | |
| template<class T> | |
| static STBase * | emplace (std::size_t n, void *buf, T &&val) |
Private Types | |
| enum class | WhichFields : bool { OmitSigningFields = false , WithAllFields = true } |
| using | list_type = std::vector<detail::STVar> |
Private Member Functions | |
| void | add (Serializer &s, WhichFields whichFields) const |
| template<typename T> | |
| V | getFieldByValue (SField const &field) const |
| template<typename T, typename V> | |
| V const & | getFieldByConstRef (SField const &field, V const &empty) const |
| template<typename T, typename V> | |
| void | setFieldUsingSetValue (SField const &field, V value) |
| template<typename T> | |
| void | setFieldUsingAssignment (SField const &field, T const &value) |
| template<typename T> | |
| T & | peekField (SField const &field) |
| STBase * | copy (std::size_t n, void *buf) const override |
| STBase * | move (std::size_t n, void *buf) override |
Static Private Member Functions | |
| static std::vector< STBase const * > | getSortedFields (STObject const &objToSort, WhichFields whichFields) |
| static auto & | getCounter () noexcept |
Private Attributes | |
| list_type | v_ |
| SOTemplate const * | type_ {} |
| SField const * | fName_ |
Friends | |
| class | detail::STVar |
Definition at line 36 of file STObject.h.
|
private |
Definition at line 57 of file STObject.h.
| using xrpl::STObject::iterator = boost::transform_iterator<Transform, STObject::list_type::const_iterator> |
Definition at line 63 of file STObject.h.
|
strongprivate |
| Enumerator | |
|---|---|
| OmitSigningFields | |
| WithAllFields | |
Definition at line 416 of file STObject.h.
|
overridedefault |
|
default |
| xrpl::STObject::STObject | ( | SOTemplate const & | type, |
| SField const & | name, | ||
| F && | f ) |
Definition at line 69 of file STObject.h.
| xrpl::STObject::STObject | ( | STObject && | other | ) |
Definition at line 45 of file STObject.cpp.
| xrpl::STObject::STObject | ( | SOTemplate const & | type, |
| SField const & | name ) |
Definition at line 54 of file STObject.cpp.
| xrpl::STObject::STObject | ( | SOTemplate const & | type, |
| SerialIter & | sit, | ||
| SField const & | name ) |
Definition at line 59 of file STObject.cpp.
| xrpl::STObject::STObject | ( | SerialIter & | sit, |
| SField const & | name, | ||
| int | depth = 0 ) |
Definition at line 66 of file STObject.cpp.
| xrpl::STObject::STObject | ( | SerialIter && | sit, |
| SField const & | name ) |
Definition at line 950 of file STObject.h.
|
explicit |
Definition at line 50 of file STObject.cpp.
Definition at line 126 of file STObject.cpp.
Definition at line 74 of file STObject.cpp.
|
nodiscard |
Definition at line 955 of file STObject.h.
|
nodiscard |
Definition at line 961 of file STObject.h.
|
nodiscard |
Definition at line 967 of file STObject.h.
| void xrpl::STObject::reserve | ( | std::size_t | n | ) |
Definition at line 973 of file STObject.h.
| void xrpl::STObject::applyTemplate | ( | SOTemplate const & | type | ) |
Definition at line 155 of file STObject.cpp.
| void xrpl::STObject::applyTemplateFromSField | ( | SField const & | sField | ) |
Definition at line 204 of file STObject.cpp.
|
nodiscard |
Definition at line 979 of file STObject.h.
| void xrpl::STObject::set | ( | SOTemplate const & | type | ) |
Definition at line 135 of file STObject.cpp.
| bool xrpl::STObject::set | ( | SerialIter & | u, |
| int | depth = 0 ) |
Definition at line 213 of file STObject.cpp.
|
nodiscardoverridevirtual |
Reimplemented from xrpl::STBase.
Reimplemented in xrpl::STTx.
Definition at line 108 of file STObject.cpp.
|
nodiscardoverridevirtual |
Reimplemented from xrpl::STBase.
Definition at line 341 of file STObject.cpp.
|
nodiscardoverridevirtual |
Reimplemented from xrpl::STBase.
Definition at line 114 of file STObject.cpp.
|
overridevirtual |
Reimplemented from xrpl::STBase.
Definition at line 120 of file STObject.cpp.
|
nodiscardoverridevirtual |
Reimplemented from xrpl::STBase.
Reimplemented in xrpl::STTx.
Definition at line 285 of file STObject.cpp.
|
nodiscardoverridevirtual |
Reimplemented from xrpl::STBase.
Definition at line 322 of file STObject.cpp.
|
nodiscardoverridevirtual |
Reimplemented from xrpl::STBase.
Reimplemented in xrpl::STTx.
Definition at line 835 of file STObject.cpp.
| void xrpl::STObject::addWithoutSigningFields | ( | Serializer & | s | ) | const |
Definition at line 985 of file STObject.h.
|
nodiscard |
Definition at line 994 of file STObject.h.
| std::size_t xrpl::STObject::emplaceBack | ( | Args &&... | args | ) |
Definition at line 1003 of file STObject.h.
|
nodiscard |
Definition at line 1010 of file STObject.h.
| bool xrpl::STObject::setFlag | ( | std::uint32_t | f | ) |
Definition at line 477 of file STObject.cpp.
| bool xrpl::STObject::clearFlag | ( | std::uint32_t | f | ) |
Definition at line 489 of file STObject.cpp.
|
nodiscard |
Definition at line 501 of file STObject.cpp.
|
nodiscard |
Definition at line 507 of file STObject.cpp.
|
nodiscard |
Definition at line 365 of file STObject.cpp.
|
nodiscard |
Definition at line 374 of file STObject.cpp.
|
nodiscard |
Definition at line 1016 of file STObject.h.
| STBase & xrpl::STObject::getIndex | ( | int | offset | ) |
Definition at line 1022 of file STObject.h.
|
nodiscard |
Definition at line 1028 of file STObject.h.
| STBase * xrpl::STObject::getPIndex | ( | int | offset | ) |
Definition at line 1034 of file STObject.h.
|
nodiscard |
Definition at line 383 of file STObject.cpp.
|
nodiscard |
Definition at line 421 of file STObject.cpp.
Definition at line 399 of file STObject.cpp.
Definition at line 410 of file STObject.cpp.
Definition at line 427 of file STObject.cpp.
Definition at line 438 of file STObject.cpp.
|
nodiscard |
Definition at line 579 of file STObject.cpp.
|
nodiscard |
Definition at line 585 of file STObject.cpp.
|
nodiscard |
Definition at line 591 of file STObject.cpp.
|
nodiscard |
Definition at line 597 of file STObject.cpp.
Definition at line 603 of file STObject.cpp.
Definition at line 609 of file STObject.cpp.
Definition at line 615 of file STObject.cpp.
Definition at line 621 of file STObject.cpp.
|
nodiscard |
Definition at line 627 of file STObject.cpp.
Definition at line 633 of file STObject.cpp.
Definition at line 639 of file STObject.cpp.
Definition at line 647 of file STObject.cpp.
Definition at line 654 of file STObject.cpp.
|
nodiscard |
Definition at line 661 of file STObject.cpp.
Definition at line 668 of file STObject.cpp.
Definition at line 678 of file STObject.cpp.
|
nodiscard |
Definition at line 685 of file STObject.cpp.
Definition at line 692 of file STObject.cpp.
| T::value_type xrpl::STObject::operator[] | ( | TypedField< T > const & | f | ) | const |
Get the value of a field.
| A | TypedField built from an SField value representing the desired object field. In typical use, the TypedField will be implicitly constructed. |
| STObject::FieldErr | if the field is not present. |
Definition at line 1041 of file STObject.h.
| std::optional< std::decay_t< typename T::value_type > > xrpl::STObject::operator[] | ( | OptionaledField< T > const & | of | ) | const |
Get the value of a field as a std::optional.
| An | OptionaledField built from an SField value representing the desired object field. In typical use, the OptionaledField will be constructed by using the ~ operator on an SField. |
Definition at line 1048 of file STObject.h.
| auto xrpl::STObject::operator[] | ( | TypedField< T > const & | f | ) |
Get a modifiable field value.
| A | TypedField built from an SField value representing the desired object field. In typical use, the TypedField will be implicitly constructed. |
| STObject::FieldErr | if the field is not present. |
Definition at line 1055 of file STObject.h.
| auto xrpl::STObject::operator[] | ( | OptionaledField< T > const & | of | ) |
Return a modifiable field value as std::optional.
| An | OptionaledField built from an SField value representing the desired object field. In typical use, the OptionaledField will be constructed by using the ~ operator on an SField. |
Definition at line 1062 of file STObject.h.
|
nodiscard |
Get the value of a field.
| A | TypedField built from an SField value representing the desired object field. In typical use, the TypedField will be implicitly constructed. |
| STObject::FieldErr | if the field is not present. |
Definition at line 1069 of file STObject.h.
|
nodiscard |
Get the value of a field as std::optional.
| An | OptionaledField built from an SField value representing the desired object field. In typical use, the OptionaledField will be constructed by using the ~ operator on an SField. |
Definition at line 1101 of file STObject.h.
| auto xrpl::STObject::at | ( | TypedField< T > const & | f | ) |
Get a modifiable field value.
| A | TypedField built from an SField value representing the desired object field. In typical use, the TypedField will be implicitly constructed. |
| STObject::FieldErr | if the field is not present. |
Definition at line 1129 of file STObject.h.
| auto xrpl::STObject::at | ( | OptionaledField< T > const & | of | ) |
Return a modifiable field value as std::optional.
| An | OptionaledField built from an SField value representing the desired object field. In typical use, the OptionaledField will be constructed by using the ~ operator on an SField. |
Definition at line 1136 of file STObject.h.
| void xrpl::STObject::set | ( | std::unique_ptr< STBase > | v | ) |
Set a field.
if the field already exists, it is replaced.
Definition at line 699 of file STObject.cpp.
| void xrpl::STObject::set | ( | STBase && | v | ) |
Definition at line 705 of file STObject.cpp.
| void xrpl::STObject::setFieldU8 | ( | SField const & | field, |
| unsigned char | v ) |
Definition at line 721 of file STObject.cpp.
| void xrpl::STObject::setFieldU16 | ( | SField const & | field, |
| std::uint16_t | v ) |
Definition at line 727 of file STObject.cpp.
| void xrpl::STObject::setFieldU32 | ( | SField const & | field, |
| std::uint32_t | v ) |
Definition at line 733 of file STObject.cpp.
| void xrpl::STObject::setFieldU64 | ( | SField const & | field, |
| std::uint64_t | v ) |
Definition at line 739 of file STObject.cpp.
Definition at line 745 of file STObject.cpp.
Definition at line 751 of file STObject.cpp.
Definition at line 757 of file STObject.cpp.
| void xrpl::STObject::setFieldI32 | ( | SField const & | field, |
| std::int32_t | v ) |
Definition at line 763 of file STObject.cpp.
Definition at line 781 of file STObject.cpp.
Definition at line 787 of file STObject.cpp.
Definition at line 775 of file STObject.cpp.
Definition at line 793 of file STObject.cpp.
Definition at line 805 of file STObject.cpp.
| void xrpl::STObject::setFieldCurrency | ( | SField const & | field, |
| STCurrency const & | v ) |
Definition at line 799 of file STObject.cpp.
Definition at line 811 of file STObject.cpp.
Definition at line 817 of file STObject.cpp.
| void xrpl::STObject::setFieldV256 | ( | SField const & | field, |
| STVector256 const & | v ) |
Definition at line 769 of file STObject.cpp.
Definition at line 823 of file STObject.cpp.
Definition at line 829 of file STObject.cpp.
| void xrpl::STObject::setFieldH160 | ( | SField const & | field, |
| BaseUInt< 160, Tag > const & | v ) |
Definition at line 1143 of file STObject.h.
Definition at line 465 of file STObject.cpp.
Definition at line 471 of file STObject.cpp.
|
nodiscard |
Definition at line 454 of file STObject.cpp.
Definition at line 518 of file STObject.cpp.
| void xrpl::STObject::makeFieldAbsent | ( | SField const & | field | ) |
Definition at line 540 of file STObject.cpp.
| bool xrpl::STObject::delField | ( | SField const & | field | ) |
Definition at line 555 of file STObject.cpp.
| void xrpl::STObject::delField | ( | int | index | ) |
Definition at line 567 of file STObject.cpp.
Definition at line 573 of file STObject.cpp.
|
nodiscard |
Definition at line 274 of file STObject.cpp.
| bool xrpl::STObject::operator== | ( | STObject const & | o | ) | const |
Definition at line 848 of file STObject.cpp.
| bool xrpl::STObject::operator!= | ( | STObject const & | o | ) | const |
Definition at line 1165 of file STObject.h.
|
private |
Definition at line 888 of file STObject.cpp.
|
staticprivate |
Definition at line 912 of file STObject.cpp.
|
private |
Definition at line 1172 of file STObject.h.
|
private |
|
private |
Definition at line 1225 of file STObject.h.
|
private |
Definition at line 1248 of file STObject.h.
|
private |
Definition at line 1269 of file STObject.h.
|
overrideprivatevirtual |
Reimplemented from xrpl::STBase.
Reimplemented in xrpl::STTx, and xrpl::STValidation.
Definition at line 96 of file STObject.cpp.
|
overrideprivatevirtual |
Reimplemented from xrpl::STBase.
Reimplemented in xrpl::STTx, and xrpl::STValidation.
Definition at line 102 of file STObject.cpp.
| V const & xrpl::STObject::getFieldByConstRef | ( | SField const & | field, |
| V const & | empty ) const |
Definition at line 1199 of file STObject.h.
|
inherited |
Definition at line 36 of file STBase.cpp.
|
inherited |
Definition at line 42 of file STBase.cpp.
|
inherited |
|
nodiscardinherited |
|
inherited |
|
nodiscardinherited |
Definition at line 126 of file STBase.cpp.
|
inherited |
Definition at line 132 of file STBase.cpp.
|
staticprotectedinherited |
|
staticprivatenoexceptinherited |
Definition at line 109 of file CountedObject.h.
|
friend |
Definition at line 472 of file STObject.h.
|
private |
Definition at line 59 of file STObject.h.
|
private |
Definition at line 60 of file STObject.h.
|
inherited |
Definition at line 134 of file CountedObject.h.