|
rippled
|
#include <STObject.h>


Classes | |
| class | FieldErr |
| class | OptionalProxy |
| class | Proxy |
| struct | Transform |
| class | ValueProxy |
Public Types | |
| using | iterator = boost::transform_iterator< Transform, STObject::list_type::const_iterator > |
Public Member Functions | |
| virtual | ~STObject ()=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::none) const override |
| void | addWithoutSigningFields (Serializer &s) const |
| Serializer | getSerializer () const |
| template<class... Args> | |
| std::size_t | emplace_back (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 | 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, base_uint< 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) |
| bool | hasMatchingEntry (STBase const &) |
| bool | operator== (STObject const &o) const |
| bool | operator!= (STObject const &o) const |
| template<class T > | |
| auto | operator[] (TypedField< T > const &f) -> ValueProxy< T > |
| template<class T > | |
| auto | operator[] (OptionaledField< T > const &of) -> OptionalProxy< T > |
| template<class T > | |
| auto | at (TypedField< T > const &f) -> ValueProxy< T > |
| template<class T > | |
| auto | at (OptionaledField< T > const &of) -> OptionalProxy< T > |
| template<typename T , typename V > | |
| V | getFieldByValue (SField const &field) 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) |
Static Protected Member Functions | |
| template<class T > | |
| static STBase * | emplace (std::size_t n, void *buf, T &&val) |
Private Types | |
| enum | 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 , typename V = typename std::remove_cv<typename std::remove_reference< decltype(std::declval<T>().value())>::type, ::type > | |
| 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 * | mType |
| SField const * | fName |
Friends | |
| class | detail::STVar |
Definition at line 37 of file STObject.h.
|
private |
Definition at line 58 of file STObject.h.
| using ripple::STObject::iterator = boost:: transform_iterator<Transform, STObject::list_type::const_iterator> |
Definition at line 64 of file STObject.h.
|
private |
| Enumerator | |
|---|---|
| omitSigningFields | |
| withAllFields | |
Definition at line 411 of file STObject.h.
|
virtualdefault |
|
default |
| ripple::STObject::STObject | ( | SOTemplate const & | type, |
| SField const & | name, | ||
| F && | f | ||
| ) |
Definition at line 71 of file STObject.h.
| ripple::STObject::STObject | ( | STObject && | other | ) |
Definition at line 44 of file STObject.cpp.
| ripple::STObject::STObject | ( | SOTemplate const & | type, |
| SField const & | name | ||
| ) |
Definition at line 53 of file STObject.cpp.
| ripple::STObject::STObject | ( | SOTemplate const & | type, |
| SerialIter & | sit, | ||
| SField const & | name | ||
| ) |
Definition at line 58 of file STObject.cpp.
|
noexcept |
Definition at line 66 of file STObject.cpp.
| ripple::STObject::STObject | ( | SerialIter && | sit, |
| SField const & | name | ||
| ) |
Definition at line 908 of file STObject.h.
|
explicit |
Definition at line 49 of file STObject.cpp.
Definition at line 128 of file STObject.cpp.
Definition at line 76 of file STObject.cpp.
| STObject::iterator ripple::STObject::begin | ( | ) | const |
Definition at line 914 of file STObject.h.
| STObject::iterator ripple::STObject::end | ( | ) | const |
Definition at line 920 of file STObject.h.
| bool ripple::STObject::empty | ( | ) | const |
Definition at line 926 of file STObject.h.
| void ripple::STObject::reserve | ( | std::size_t | n | ) |
Definition at line 932 of file STObject.h.
| void ripple::STObject::applyTemplate | ( | SOTemplate const & | type | ) |
Definition at line 153 of file STObject.cpp.
| void ripple::STObject::applyTemplateFromSField | ( | SField const & | sField | ) |
Definition at line 207 of file STObject.cpp.
| bool ripple::STObject::isFree | ( | ) | const |
Definition at line 938 of file STObject.h.
| void ripple::STObject::set | ( | SOTemplate const & | type | ) |
Definition at line 137 of file STObject.cpp.
| bool ripple::STObject::set | ( | SerialIter & | u, |
| int | depth = 0 |
||
| ) |
Definition at line 217 of file STObject.cpp.
|
overridevirtual |
Reimplemented from ripple::STBase.
Reimplemented in ripple::STTx.
Definition at line 110 of file STObject.cpp.
|
overridevirtual |
Reimplemented from ripple::STBase.
Definition at line 341 of file STObject.cpp.
|
overridevirtual |
Reimplemented from ripple::STBase.
Definition at line 116 of file STObject.cpp.
|
overridevirtual |
Reimplemented from ripple::STBase.
Definition at line 122 of file STObject.cpp.
|
overridevirtual |
Reimplemented from ripple::STBase.
Reimplemented in ripple::STTx.
Definition at line 291 of file STObject.cpp.
|
overridevirtual |
Reimplemented from ripple::STBase.
Definition at line 322 of file STObject.cpp.
|
overridevirtual |
Reimplemented from ripple::STBase.
Reimplemented in ripple::STTx.
Definition at line 834 of file STObject.cpp.
| void ripple::STObject::addWithoutSigningFields | ( | Serializer & | s | ) | const |
Definition at line 944 of file STObject.h.
| Serializer ripple::STObject::getSerializer | ( | ) | const |
Definition at line 953 of file STObject.h.
| std::size_t ripple::STObject::emplace_back | ( | Args &&... | args | ) |
Definition at line 962 of file STObject.h.
| int ripple::STObject::getCount | ( | ) | const |
Definition at line 969 of file STObject.h.
| bool ripple::STObject::setFlag | ( | std::uint32_t | f | ) |
Definition at line 488 of file STObject.cpp.
| bool ripple::STObject::clearFlag | ( | std::uint32_t | f | ) |
Definition at line 500 of file STObject.cpp.
| bool ripple::STObject::isFlag | ( | std::uint32_t | f | ) | const |
Definition at line 512 of file STObject.cpp.
| std::uint32_t ripple::STObject::getFlags | ( | void | ) | const |
Definition at line 518 of file STObject.cpp.
| uint256 ripple::STObject::getHash | ( | HashPrefix | prefix | ) | const |
Definition at line 376 of file STObject.cpp.
| uint256 ripple::STObject::getSigningHash | ( | HashPrefix | prefix | ) | const |
Definition at line 385 of file STObject.cpp.
| STBase const & ripple::STObject::peekAtIndex | ( | int | offset | ) | const |
Definition at line 975 of file STObject.h.
| STBase & ripple::STObject::getIndex | ( | int | offset | ) |
Definition at line 981 of file STObject.h.
| STBase const * ripple::STObject::peekAtPIndex | ( | int | offset | ) | const |
Definition at line 987 of file STObject.h.
| STBase * ripple::STObject::getPIndex | ( | int | offset | ) |
Definition at line 993 of file STObject.h.
| int ripple::STObject::getFieldIndex | ( | SField const & | field | ) | const |
Definition at line 394 of file STObject.cpp.
| SField const & ripple::STObject::getFieldSType | ( | int | index | ) | const |
Definition at line 432 of file STObject.cpp.
Definition at line 410 of file STObject.cpp.
Definition at line 421 of file STObject.cpp.
Definition at line 438 of file STObject.cpp.
Definition at line 449 of file STObject.cpp.
| unsigned char ripple::STObject::getFieldU8 | ( | SField const & | field | ) | const |
Definition at line 584 of file STObject.cpp.
| std::uint16_t ripple::STObject::getFieldU16 | ( | SField const & | field | ) | const |
Definition at line 590 of file STObject.cpp.
| std::uint32_t ripple::STObject::getFieldU32 | ( | SField const & | field | ) | const |
Definition at line 596 of file STObject.cpp.
| std::uint64_t ripple::STObject::getFieldU64 | ( | SField const & | field | ) | const |
Definition at line 602 of file STObject.cpp.
Definition at line 608 of file STObject.cpp.
Definition at line 614 of file STObject.cpp.
Definition at line 620 of file STObject.cpp.
Definition at line 626 of file STObject.cpp.
| std::int32_t ripple::STObject::getFieldI32 | ( | SField const & | field | ) | const |
Definition at line 632 of file STObject.cpp.
Definition at line 638 of file STObject.cpp.
Definition at line 644 of file STObject.cpp.
Definition at line 652 of file STObject.cpp.
Definition at line 659 of file STObject.cpp.
| STVector256 const & ripple::STObject::getFieldV256 | ( | SField const & | field | ) | const |
Definition at line 666 of file STObject.cpp.
Definition at line 673 of file STObject.cpp.
Definition at line 683 of file STObject.cpp.
| STCurrency const & ripple::STObject::getFieldCurrency | ( | SField const & | field | ) | const |
Definition at line 690 of file STObject.cpp.
Definition at line 697 of file STObject.cpp.
| T::value_type ripple::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 1000 of file STObject.h.
| std::optional< std::decay_t< typename T::value_type > > ripple::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 1007 of file STObject.h.
| ValueProxy< T > ripple::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. |
| OptionalProxy< T > ripple::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. |
optional holding a modifiable reference to the value of the specified field. Returns std::nullopt if the field is not present. | T::value_type ripple::STObject::at | ( | 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 1028 of file STObject.h.
| std::optional< std::decay_t< typename T::value_type > > ripple::STObject::at | ( | OptionaledField< T > const & | of | ) | const |
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 1061 of file STObject.h.
| ValueProxy< T > ripple::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. |
| OptionalProxy< T > ripple::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. |
optional holding a modifiable reference to the value of the specified field. Returns std::nullopt if the field is not present. | void ripple::STObject::set | ( | std::unique_ptr< STBase > | v | ) |
Set a field.
if the field already exists, it is replaced.
Definition at line 704 of file STObject.cpp.
| void ripple::STObject::set | ( | STBase && | v | ) |
Definition at line 710 of file STObject.cpp.
| void ripple::STObject::setFieldU8 | ( | SField const & | field, |
| unsigned char | v | ||
| ) |
Definition at line 726 of file STObject.cpp.
| void ripple::STObject::setFieldU16 | ( | SField const & | field, |
| std::uint16_t | v | ||
| ) |
Definition at line 732 of file STObject.cpp.
| void ripple::STObject::setFieldU32 | ( | SField const & | field, |
| std::uint32_t | v | ||
| ) |
Definition at line 738 of file STObject.cpp.
| void ripple::STObject::setFieldU64 | ( | SField const & | field, |
| std::uint64_t | v | ||
| ) |
Definition at line 744 of file STObject.cpp.
Definition at line 750 of file STObject.cpp.
Definition at line 756 of file STObject.cpp.
| void ripple::STObject::setFieldI32 | ( | SField const & | field, |
| std::int32_t | v | ||
| ) |
Definition at line 762 of file STObject.cpp.
Definition at line 780 of file STObject.cpp.
Definition at line 786 of file STObject.cpp.
Definition at line 774 of file STObject.cpp.
Definition at line 792 of file STObject.cpp.
Definition at line 804 of file STObject.cpp.
| void ripple::STObject::setFieldCurrency | ( | SField const & | field, |
| STCurrency const & | v | ||
| ) |
Definition at line 798 of file STObject.cpp.
Definition at line 810 of file STObject.cpp.
Definition at line 816 of file STObject.cpp.
| void ripple::STObject::setFieldV256 | ( | SField const & | field, |
| STVector256 const & | v | ||
| ) |
Definition at line 768 of file STObject.cpp.
Definition at line 822 of file STObject.cpp.
Definition at line 828 of file STObject.cpp.
| void ripple::STObject::setFieldH160 | ( | SField const & | field, |
| base_uint< 160, Tag > const & | v | ||
| ) |
Definition at line 1103 of file STObject.h.
Definition at line 476 of file STObject.cpp.
Definition at line 482 of file STObject.cpp.
| bool ripple::STObject::isFieldPresent | ( | SField const & | field | ) | const |
Definition at line 465 of file STObject.cpp.
Definition at line 529 of file STObject.cpp.
| void ripple::STObject::makeFieldAbsent | ( | SField const & | field | ) |
Definition at line 551 of file STObject.cpp.
| bool ripple::STObject::delField | ( | SField const & | field | ) |
Definition at line 566 of file STObject.cpp.
| void ripple::STObject::delField | ( | int | index | ) |
Definition at line 578 of file STObject.cpp.
| bool ripple::STObject::hasMatchingEntry | ( | STBase const & | t | ) |
Definition at line 280 of file STObject.cpp.
| bool ripple::STObject::operator== | ( | STObject const & | o | ) | const |
Definition at line 847 of file STObject.cpp.
| bool ripple::STObject::operator!= | ( | STObject const & | o | ) | const |
Definition at line 1121 of file STObject.h.
|
private |
Definition at line 890 of file STObject.cpp.
|
staticprivate |
Definition at line 916 of file STObject.cpp.
|
private |
|
private |
|
private |
Definition at line 1178 of file STObject.h.
|
private |
Definition at line 1201 of file STObject.h.
|
private |
Definition at line 1222 of file STObject.h.
|
overrideprivatevirtual |
Reimplemented from ripple::STBase.
Reimplemented in ripple::STTx, and ripple::STValidation.
Definition at line 98 of file STObject.cpp.
|
overrideprivatevirtual |
Reimplemented from ripple::STBase.
Reimplemented in ripple::STTx, and ripple::STValidation.
Definition at line 104 of file STObject.cpp.
| auto ripple::STObject::operator[] | ( | TypedField< T > const & | f | ) | -> ValueProxy<T> |
Definition at line 1014 of file STObject.h.
| auto ripple::STObject::operator[] | ( | OptionaledField< T > const & | of | ) | -> OptionalProxy<T> |
Definition at line 1021 of file STObject.h.
| auto ripple::STObject::at | ( | TypedField< T > const & | f | ) | -> ValueProxy<T> |
Definition at line 1089 of file STObject.h.
| auto ripple::STObject::at | ( | OptionaledField< T > const & | of | ) | -> OptionalProxy<T> |
Definition at line 1096 of file STObject.h.
| V ripple::STObject::getFieldByValue | ( | SField const & | field | ) | const |
Definition at line 1128 of file STObject.h.
| V const & ripple::STObject::getFieldByConstRef | ( | SField const & | field, |
| V const & | empty | ||
| ) | const |
Definition at line 1155 of file STObject.h.
|
inherited |
Definition at line 32 of file STBase.cpp.
|
inherited |
Definition at line 38 of file STBase.cpp.
|
inherited |
|
inherited |
|
inherited |
|
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.
|
friend |
Definition at line 468 of file STObject.h.
|
private |
Definition at line 60 of file STObject.h.
|
private |
Definition at line 61 of file STObject.h.