xrpld
Loading...
Searching...
No Matches
xrpl::STTx Class Referencefinal

#include <STTx.h>

Inheritance diagram for xrpl::STTx:
Collaboration diagram for xrpl::STTx:

Public Types

using iterator = boost::transform_iterator<Transform, STObject::list_type::const_iterator>

Public Member Functions

 STTx ()=delete
 STTx (STTx const &other)=default
STTxoperator= (STTx const &other)=delete
 STTx (SerialIter &sit)
 STTx (SerialIter &&sit)
 STTx (STObject &&object)
 STTx (TxType type, std::function< void(STObject &)> assembler)
 Constructs a transaction.
SerializedTypeID getSType () const override
std::string getFullText () const override
Blob getSignature () const
uint256 getSigningHash () const
TxType getTxnType () const
Blob getSigningPubKey () const
SeqProxy getSeqProxy () const
boost::container::flat_set< AccountIDgetMentionedAccounts () const
uint256 getTransactionID () const
json::Value getJson (JsonOptions options) const override
json::Value getJson (JsonOptions options, bool binary) const
void sign (PublicKey const &publicKey, SecretKey const &secretKey, std::optional< std::reference_wrapper< SField const > > signatureTarget={})
std::expected< void, std::stringcheckSign (Rules const &rules) const
 Check the signature.
std::expected< void, std::stringcheckBatchSign (Rules const &rules) const
std::string getMetaSQL (std::uint32_t inLedger, std::string const &escapedMetaData) const
std::string getMetaSQL (Serializer rawTxn, std::uint32_t inLedger, TxnSql status, std::string const &escapedMetaData) const
std::vector< uint256getBatchTransactionIDs () const
 The IDs of the inner transactions of a Batch.
std::vector< std::shared_ptr< STTx const > > const & getBatchTransactions () const
 The inner transactions of a Batch, built and validated at construction.
AccountID getInitiator () const
 The account responsible for the authorization: the delegate when sfDelegate is present, otherwise the account.
AccountID getFeePayerID () const
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, bool requireCanonicalOrder=false)
void set (std::unique_ptr< STBase > v)
 Set a field.
void set (STBase &&v)
bool isEquivalent (STBase const &t) const override
bool isDefault () const override
void add (Serializer &s) const override
std::string getText () 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
STBasegetIndex (int offset)
STBase const * peekAtPIndex (int offset) const
STBasegetPIndex (int offset)
int getFieldIndex (SField const &field) const
SField const & getFieldSType (int index) const
STBase const & peekAtField (SField const &field) const
STBasegetField (SField const &field)
STBase const * peekAtPField (SField const &field) const
STBasegetPField (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 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)
STObjectpeekFieldObject (SField const &field)
STArraypeekFieldArray (SField const &field)
bool isFieldPresent (SField const &field) const
STBasemakeFieldPresent (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== (STBase const &t) const
template<typename T, typename V>
V const & getFieldByConstRef (SField const &field, V const &empty) 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 Blob getSignature (STObject const &sigObject)
static std::string const & getMetaSQLInsertReplaceHeader ()
static STObject makeInnerObject (SField const &name)

Public Attributes

friend Object
friend Object

Static Public Attributes

static constexpr std::size_t kMinMultiSigners = 1
static constexpr std::size_t kMaxMultiSigners = 32

Static Protected Member Functions

template<class T>
static STBaseemplace (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

std::expected< void, std::stringcheckSign (Rules const &rules, STObject const &sigObject) const
 Check the signature.
std::expected< void, std::stringcheckSingleSign (STObject const &sigObject) const
std::expected< void, std::stringcheckMultiSign (Rules const &rules, STObject const &sigObject) const
std::expected< void, std::stringcheckBatchSingleSign (STObject const &batchSigner, std::vector< uint256 > const &txIds) const
std::expected< void, std::stringcheckBatchMultiSign (STObject const &batchSigner, Rules const &rules, std::vector< uint256 > const &txIds) const
void buildBatchTxns ()
STBasecopy (std::size_t n, void *buf) const override
STBasemove (std::size_t n, void *buf) override
void add (Serializer &s, WhichFields whichFields) const
template<typename T>
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)

Static Private Member Functions

static std::vector< STBase const * > getSortedFields (STObject const &objToSort, WhichFields whichFields)
static auto & getCounter () noexcept

Private Attributes

uint256 tid_
TxType txType_
std::optional< std::vector< std::shared_ptr< STTx const > > > batchTxns_
list_type v_
SOTemplate const * type_ {}
SField const * fName_

Friends

class detail::STVar

Detailed Description

Definition at line 40 of file STTx.h.

Member Typedef Documentation

◆ list_type

Definition at line 69 of file STObject.h.

◆ iterator

using xrpl::STObject::iterator = boost::transform_iterator<Transform, STObject::list_type::const_iterator>
inherited

Definition at line 75 of file STObject.h.

Member Enumeration Documentation

◆ WhichFields

enum class xrpl::STObject::WhichFields : bool
strongprivateinherited
Enumerator
OmitSigningFields 
WithAllFields 

Definition at line 439 of file STObject.h.

Constructor & Destructor Documentation

◆ STTx() [1/6]

xrpl::STTx::STTx ( )
delete

◆ STTx() [2/6]

xrpl::STTx::STTx ( STTx const & other)
default

◆ STTx() [3/6]

xrpl::STTx::STTx ( SerialIter & sit)
explicit

Definition at line 78 of file STTx.cpp.

◆ STTx() [4/6]

xrpl::STTx::STTx ( SerialIter && sit)
explicit

Definition at line 220 of file STTx.h.

◆ STTx() [5/6]

xrpl::STTx::STTx ( STObject && object)
explicit

Definition at line 70 of file STTx.cpp.

◆ STTx() [6/6]

xrpl::STTx::STTx ( TxType type,
std::function< void(STObject &)> assembler )

Constructs a transaction.

The returned transaction will have the specified type and any fields that the callback function adds to the object that's passed in.

Definition at line 95 of file STTx.cpp.

Member Function Documentation

◆ operator=()

STTx & xrpl::STTx::operator= ( STTx const & other)
delete

◆ getSType()

SerializedTypeID xrpl::STTx::getSType ( ) const
nodiscardoverridevirtual

Reimplemented from xrpl::STObject.

Definition at line 130 of file STTx.cpp.

◆ getFullText()

std::string xrpl::STTx::getFullText ( ) const
nodiscardoverridevirtual

Reimplemented from xrpl::STObject.

Definition at line 136 of file STTx.cpp.

◆ getSignature() [1/2]

Blob xrpl::STTx::getSignature ( STObject const & sigObject)
static

Definition at line 186 of file STTx.cpp.

◆ getSignature() [2/2]

Blob xrpl::STTx::getSignature ( ) const
nodiscard

Definition at line 79 of file STTx.h.

◆ getSigningHash() [1/2]

uint256 xrpl::STTx::getSigningHash ( ) const
nodiscard

Definition at line 180 of file STTx.cpp.

◆ getTxnType()

TxType xrpl::STTx::getTxnType ( ) const
nodiscard

Definition at line 226 of file STTx.h.

◆ getSigningPubKey()

Blob xrpl::STTx::getSigningPubKey ( ) const
nodiscard

Definition at line 232 of file STTx.h.

◆ getSeqProxy()

SeqProxy xrpl::STTx::getSeqProxy ( ) const
nodiscard

Definition at line 199 of file STTx.cpp.

◆ getMentionedAccounts()

boost::container::flat_set< AccountID > xrpl::STTx::getMentionedAccounts ( ) const
nodiscard

Definition at line 147 of file STTx.cpp.

◆ getTransactionID()

uint256 xrpl::STTx::getTransactionID ( ) const
nodiscard

Definition at line 238 of file STTx.h.

◆ getJson() [1/2]

json::Value xrpl::STTx::getJson ( JsonOptions options) const
nodiscardoverridevirtual

Reimplemented from xrpl::STObject.

Definition at line 338 of file STTx.cpp.

◆ getJson() [2/2]

json::Value xrpl::STTx::getJson ( JsonOptions options,
bool binary ) const
nodiscard

Definition at line 347 of file STTx.cpp.

◆ sign()

void xrpl::STTx::sign ( PublicKey const & publicKey,
SecretKey const & secretKey,
std::optional< std::reference_wrapper< SField const > > signatureTarget = {} )

Definition at line 216 of file STTx.cpp.

◆ checkSign() [1/2]

std::expected< void, std::string > xrpl::STTx::checkSign ( Rules const & rules) const
nodiscard

Check the signature.

Parameters
rulesThe current ledger rules.
Returns
true if valid signature. If invalid, the error message string.

Definition at line 257 of file STTx.cpp.

◆ checkBatchSign()

std::expected< void, std::string > xrpl::STTx::checkBatchSign ( Rules const & rules) const
nodiscard

Definition at line 287 of file STTx.cpp.

◆ getMetaSQLInsertReplaceHeader()

std::string const & xrpl::STTx::getMetaSQLInsertReplaceHeader ( )
static

Definition at line 375 of file STTx.cpp.

◆ getMetaSQL() [1/2]

std::string xrpl::STTx::getMetaSQL ( std::uint32_t inLedger,
std::string const & escapedMetaData ) const
nodiscard

Definition at line 387 of file STTx.cpp.

◆ getMetaSQL() [2/2]

std::string xrpl::STTx::getMetaSQL ( Serializer rawTxn,
std::uint32_t inLedger,
TxnSql status,
std::string const & escapedMetaData ) const
nodiscard

Definition at line 396 of file STTx.cpp.

◆ getBatchTransactionIDs()

std::vector< uint256 > xrpl::STTx::getBatchTransactionIDs ( ) const
nodiscard

The IDs of the inner transactions of a Batch.

Definition at line 634 of file STTx.cpp.

◆ getBatchTransactions()

std::vector< std::shared_ptr< STTx const > > const & xrpl::STTx::getBatchTransactions ( ) const
nodiscard

The inner transactions of a Batch, built and validated at construction.

Always seated for Batch STTx instances (construction throws if oversized).

Definition at line 645 of file STTx.cpp.

◆ getInitiator()

AccountID xrpl::STTx::getInitiator ( ) const
nodiscard

The account responsible for the authorization: the delegate when sfDelegate is present, otherwise the account.

Definition at line 656 of file STTx.cpp.

◆ getFeePayerID()

AccountID xrpl::STTx::getFeePayerID ( ) const
nodiscard

Definition at line 670 of file STTx.cpp.

◆ checkSign() [2/2]

std::expected< void, std::string > xrpl::STTx::checkSign ( Rules const & rules,
STObject const & sigObject ) const
nodiscardprivate

Check the signature.

Parameters
rulesThe current ledger rules.
sigObjectReference to object that contains the signature fields. Will be *this more often than not.
Returns
true if valid signature. If invalid, the error message string.

Definition at line 238 of file STTx.cpp.

◆ checkSingleSign()

std::expected< void, std::string > xrpl::STTx::checkSingleSign ( STObject const & sigObject) const
nodiscardprivate

Definition at line 450 of file STTx.cpp.

◆ checkMultiSign()

std::expected< void, std::string > xrpl::STTx::checkMultiSign ( Rules const & rules,
STObject const & sigObject ) const
nodiscardprivate

Definition at line 569 of file STTx.cpp.

◆ checkBatchSingleSign()

std::expected< void, std::string > xrpl::STTx::checkBatchSingleSign ( STObject const & batchSigner,
std::vector< uint256 > const & txIds ) const
nodiscardprivate

Definition at line 457 of file STTx.cpp.

◆ checkBatchMultiSign()

std::expected< void, std::string > xrpl::STTx::checkBatchMultiSign ( STObject const & batchSigner,
Rules const & rules,
std::vector< uint256 > const & txIds ) const
nodiscardprivate

Definition at line 544 of file STTx.cpp.

◆ buildBatchTxns()

void xrpl::STTx::buildBatchTxns ( )
private

Definition at line 594 of file STTx.cpp.

◆ copy()

STBase * xrpl::STTx::copy ( std::size_t n,
void * buf ) const
overrideprivatevirtual

Reimplemented from xrpl::STObject.

Definition at line 117 of file STTx.cpp.

◆ move()

STBase * xrpl::STTx::move ( std::size_t n,
void * buf )
overrideprivatevirtual

Reimplemented from xrpl::STObject.

Definition at line 123 of file STTx.cpp.

◆ makeInnerObject()

STObject xrpl::STObject::makeInnerObject ( SField const & name)
staticinherited

Definition at line 79 of file STObject.cpp.

◆ begin()

STObject::iterator xrpl::STObject::begin ( ) const
nodiscardinherited

Definition at line 964 of file STObject.h.

◆ end()

STObject::iterator xrpl::STObject::end ( ) const
nodiscardinherited

Definition at line 970 of file STObject.h.

◆ empty()

bool xrpl::STObject::empty ( ) const
nodiscardinherited

Definition at line 976 of file STObject.h.

◆ reserve()

void xrpl::STObject::reserve ( std::size_t n)
inherited

Definition at line 982 of file STObject.h.

◆ applyTemplate()

void xrpl::STObject::applyTemplate ( SOTemplate const & type)
inherited

Definition at line 158 of file STObject.cpp.

◆ applyTemplateFromSField()

void xrpl::STObject::applyTemplateFromSField ( SField const & sField)
inherited

Definition at line 207 of file STObject.cpp.

◆ isFree()

bool xrpl::STObject::isFree ( ) const
nodiscardinherited

Definition at line 988 of file STObject.h.

◆ set() [1/4]

void xrpl::STObject::set ( SOTemplate const & type)
inherited

Definition at line 138 of file STObject.cpp.

◆ set() [2/4]

bool xrpl::STObject::set ( SerialIter & u,
int depth = 0,
bool requireCanonicalOrder = false )
inherited

Definition at line 216 of file STObject.cpp.

◆ set() [3/4]

void xrpl::STObject::set ( std::unique_ptr< STBase > v)
inherited

Set a field.

if the field already exists, it is replaced.

Definition at line 709 of file STObject.cpp.

◆ set() [4/4]

void xrpl::STObject::set ( STBase && v)
inherited

Definition at line 715 of file STObject.cpp.

◆ isEquivalent()

bool xrpl::STObject::isEquivalent ( STBase const & t) const
nodiscardoverridevirtualinherited

Reimplemented from xrpl::STBase.

Definition at line 351 of file STObject.cpp.

◆ isDefault()

bool xrpl::STObject::isDefault ( ) const
nodiscardoverridevirtualinherited

Reimplemented from xrpl::STBase.

Definition at line 117 of file STObject.cpp.

◆ add() [1/2]

void xrpl::STObject::add ( Serializer & s) const
overridevirtualinherited

Reimplemented from xrpl::STBase.

Definition at line 123 of file STObject.cpp.

◆ add() [2/2]

void xrpl::STObject::add ( Serializer & s,
WhichFields whichFields ) const
privateinherited

Definition at line 898 of file STObject.cpp.

◆ getText()

std::string xrpl::STObject::getText ( ) const
nodiscardoverridevirtualinherited

Reimplemented from xrpl::STBase.

Definition at line 332 of file STObject.cpp.

◆ addWithoutSigningFields()

void xrpl::STObject::addWithoutSigningFields ( Serializer & s) const
inherited

Definition at line 994 of file STObject.h.

◆ getSerializer()

Serializer xrpl::STObject::getSerializer ( ) const
nodiscardinherited

Definition at line 1003 of file STObject.h.

◆ emplaceBack()

template<class... Args>
std::size_t xrpl::STObject::emplaceBack ( Args &&... args)
inherited

Definition at line 1012 of file STObject.h.

◆ getCount()

int xrpl::STObject::getCount ( ) const
nodiscardinherited

Definition at line 1019 of file STObject.h.

◆ setFlag()

bool xrpl::STObject::setFlag ( std::uint32_t f)
inherited

Definition at line 487 of file STObject.cpp.

◆ clearFlag()

bool xrpl::STObject::clearFlag ( std::uint32_t f)
inherited

Definition at line 499 of file STObject.cpp.

◆ isFlag()

bool xrpl::STObject::isFlag ( std::uint32_t f) const
nodiscardinherited

Definition at line 511 of file STObject.cpp.

◆ getFlags()

std::uint32_t xrpl::STObject::getFlags ( ) const
nodiscardinherited

Definition at line 517 of file STObject.cpp.

◆ getHash()

uint256 xrpl::STObject::getHash ( HashPrefix prefix) const
nodiscardinherited

Definition at line 375 of file STObject.cpp.

◆ getSigningHash() [2/2]

uint256 xrpl::STObject::getSigningHash ( HashPrefix prefix) const
nodiscardinherited

Definition at line 384 of file STObject.cpp.

◆ peekAtIndex()

STBase const & xrpl::STObject::peekAtIndex ( int offset) const
nodiscardinherited

Definition at line 1025 of file STObject.h.

◆ getIndex()

STBase & xrpl::STObject::getIndex ( int offset)
inherited

Definition at line 1031 of file STObject.h.

◆ peekAtPIndex()

STBase const * xrpl::STObject::peekAtPIndex ( int offset) const
nodiscardinherited

Definition at line 1037 of file STObject.h.

◆ getPIndex()

STBase * xrpl::STObject::getPIndex ( int offset)
inherited

Definition at line 1043 of file STObject.h.

◆ getFieldIndex()

int xrpl::STObject::getFieldIndex ( SField const & field) const
nodiscardinherited

Definition at line 393 of file STObject.cpp.

◆ getFieldSType()

SField const & xrpl::STObject::getFieldSType ( int index) const
nodiscardinherited

Definition at line 431 of file STObject.cpp.

◆ peekAtField()

STBase const & xrpl::STObject::peekAtField ( SField const & field) const
nodiscardinherited

Definition at line 409 of file STObject.cpp.

◆ getField()

STBase & xrpl::STObject::getField ( SField const & field)
inherited

Definition at line 420 of file STObject.cpp.

◆ peekAtPField()

STBase const * xrpl::STObject::peekAtPField ( SField const & field) const
nodiscardinherited

Definition at line 437 of file STObject.cpp.

◆ getPField()

STBase * xrpl::STObject::getPField ( SField const & field,
bool createOkay = false )
inherited

Definition at line 448 of file STObject.cpp.

◆ getFieldU8()

unsigned char xrpl::STObject::getFieldU8 ( SField const & field) const
nodiscardinherited

Definition at line 589 of file STObject.cpp.

◆ getFieldU16()

std::uint16_t xrpl::STObject::getFieldU16 ( SField const & field) const
nodiscardinherited

Definition at line 595 of file STObject.cpp.

◆ getFieldU32()

std::uint32_t xrpl::STObject::getFieldU32 ( SField const & field) const
nodiscardinherited

Definition at line 601 of file STObject.cpp.

◆ getFieldU64()

std::uint64_t xrpl::STObject::getFieldU64 ( SField const & field) const
nodiscardinherited

Definition at line 607 of file STObject.cpp.

◆ getFieldH128()

uint128 xrpl::STObject::getFieldH128 ( SField const & field) const
nodiscardinherited

Definition at line 613 of file STObject.cpp.

◆ getFieldH160()

uint160 xrpl::STObject::getFieldH160 ( SField const & field) const
nodiscardinherited

Definition at line 619 of file STObject.cpp.

◆ getFieldH192()

uint192 xrpl::STObject::getFieldH192 ( SField const & field) const
nodiscardinherited

Definition at line 625 of file STObject.cpp.

◆ getFieldH256()

uint256 xrpl::STObject::getFieldH256 ( SField const & field) const
nodiscardinherited

Definition at line 631 of file STObject.cpp.

◆ getFieldI32()

std::int32_t xrpl::STObject::getFieldI32 ( SField const & field) const
nodiscardinherited

Definition at line 637 of file STObject.cpp.

◆ getAccountID()

AccountID xrpl::STObject::getAccountID ( SField const & field) const
nodiscardinherited

Definition at line 643 of file STObject.cpp.

◆ getFieldVL()

Blob xrpl::STObject::getFieldVL ( SField const & field) const
nodiscardinherited

Definition at line 649 of file STObject.cpp.

◆ getFieldAmount()

STAmount const & xrpl::STObject::getFieldAmount ( SField const & field) const
nodiscardinherited

Definition at line 657 of file STObject.cpp.

◆ getFieldPathSet()

STPathSet const & xrpl::STObject::getFieldPathSet ( SField const & field) const
nodiscardinherited

Definition at line 664 of file STObject.cpp.

◆ getFieldV256()

STVector256 const & xrpl::STObject::getFieldV256 ( SField const & field) const
nodiscardinherited

Definition at line 671 of file STObject.cpp.

◆ getFieldObject()

STObject xrpl::STObject::getFieldObject ( SField const & field) const
nodiscardinherited

Definition at line 678 of file STObject.cpp.

◆ getFieldArray()

STArray const & xrpl::STObject::getFieldArray ( SField const & field) const
nodiscardinherited

Definition at line 688 of file STObject.cpp.

◆ getFieldCurrency()

STCurrency const & xrpl::STObject::getFieldCurrency ( SField const & field) const
nodiscardinherited

Definition at line 695 of file STObject.cpp.

◆ getFieldNumber()

STNumber const & xrpl::STObject::getFieldNumber ( SField const & field) const
nodiscardinherited

Definition at line 702 of file STObject.cpp.

◆ operator[]() [1/4]

template<class T>
T::value_type xrpl::STObject::operator[] ( TypedField< T > const & f) const
inherited

Get the value of a field.

Parameters
ATypedField built from an SField value representing the desired object field. In typical use, the TypedField will be implicitly constructed.
Returns
The value of the specified field.
Exceptions
STObject::FieldErrif the field is not present.

Definition at line 1050 of file STObject.h.

◆ operator[]() [2/4]

template<class T>
std::optional< std::decay_t< typename T::value_type > > xrpl::STObject::operator[] ( OptionaledField< T > const & of) const
inherited

Get the value of a field as a std::optional.

Parameters
AnOptionaledField 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.
Returns
std::nullopt if the field is not present, else the value of the specified field.

Definition at line 1057 of file STObject.h.

◆ operator[]() [3/4]

template<class T>
auto xrpl::STObject::operator[] ( TypedField< T > const & f)
inherited

Get a modifiable field value.

Parameters
ATypedField built from an SField value representing the desired object field. In typical use, the TypedField will be implicitly constructed.
Returns
A modifiable reference to the value of the specified field.
Exceptions
STObject::FieldErrif the field is not present.

Definition at line 1064 of file STObject.h.

◆ operator[]() [4/4]

template<class T>
auto xrpl::STObject::operator[] ( OptionaledField< T > const & of)
inherited

Return a modifiable field value as std::optional.

Parameters
AnOptionaledField 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.
Returns
Transparent proxy object to an optional holding a modifiable reference to the value of the specified field. Returns std::nullopt if the field is not present.

Definition at line 1071 of file STObject.h.

◆ at() [1/4]

template<class T>
T::value_type xrpl::STObject::at ( TypedField< T > const & f) const
nodiscardinherited

Get the value of a field.

Parameters
ATypedField built from an SField value representing the desired object field. In typical use, the TypedField will be implicitly constructed.
Returns
The value of the specified field.
Exceptions
STObject::FieldErrif the field is not present.

Definition at line 1078 of file STObject.h.

◆ at() [2/4]

template<class T>
std::optional< std::decay_t< typename T::value_type > > xrpl::STObject::at ( OptionaledField< T > const & of) const
nodiscardinherited

Get the value of a field as std::optional.

Parameters
AnOptionaledField 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.
Returns
std::nullopt if the field is not present, else the value of the specified field.

Definition at line 1110 of file STObject.h.

◆ at() [3/4]

template<class T>
auto xrpl::STObject::at ( TypedField< T > const & f)
inherited

Get a modifiable field value.

Parameters
ATypedField built from an SField value representing the desired object field. In typical use, the TypedField will be implicitly constructed.
Returns
A modifiable reference to the value of the specified field.
Exceptions
STObject::FieldErrif the field is not present.

Definition at line 1138 of file STObject.h.

◆ at() [4/4]

template<class T>
auto xrpl::STObject::at ( OptionaledField< T > const & of)
inherited

Return a modifiable field value as std::optional.

Parameters
AnOptionaledField 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.
Returns
Transparent proxy object to an optional holding a modifiable reference to the value of the specified field. Returns std::nullopt if the field is not present.

Definition at line 1145 of file STObject.h.

◆ setFieldU8()

void xrpl::STObject::setFieldU8 ( SField const & field,
unsigned char v )
inherited

Definition at line 731 of file STObject.cpp.

◆ setFieldU16()

void xrpl::STObject::setFieldU16 ( SField const & field,
std::uint16_t v )
inherited

Definition at line 737 of file STObject.cpp.

◆ setFieldU32()

void xrpl::STObject::setFieldU32 ( SField const & field,
std::uint32_t v )
inherited

Definition at line 743 of file STObject.cpp.

◆ setFieldU64()

void xrpl::STObject::setFieldU64 ( SField const & field,
std::uint64_t v )
inherited

Definition at line 749 of file STObject.cpp.

◆ setFieldH128()

void xrpl::STObject::setFieldH128 ( SField const & field,
uint128 const & v )
inherited

Definition at line 755 of file STObject.cpp.

◆ setFieldH192()

void xrpl::STObject::setFieldH192 ( SField const & field,
uint192 const & v )
inherited

Definition at line 761 of file STObject.cpp.

◆ setFieldH256()

void xrpl::STObject::setFieldH256 ( SField const & field,
uint256 const & v )
inherited

Definition at line 767 of file STObject.cpp.

◆ setFieldI32()

void xrpl::STObject::setFieldI32 ( SField const & field,
std::int32_t v )
inherited

Definition at line 773 of file STObject.cpp.

◆ setFieldVL() [1/2]

void xrpl::STObject::setFieldVL ( SField const & field,
Blob const & v )
inherited

Definition at line 791 of file STObject.cpp.

◆ setFieldVL() [2/2]

void xrpl::STObject::setFieldVL ( SField const & field,
Slice const & s )
inherited

Definition at line 797 of file STObject.cpp.

◆ setAccountID()

void xrpl::STObject::setAccountID ( SField const & field,
AccountID const & v )
inherited

Definition at line 785 of file STObject.cpp.

◆ setFieldAmount()

void xrpl::STObject::setFieldAmount ( SField const & field,
STAmount const & v )
inherited

Definition at line 803 of file STObject.cpp.

◆ setFieldIssue()

void xrpl::STObject::setFieldIssue ( SField const & field,
STIssue const & v )
inherited

Definition at line 815 of file STObject.cpp.

◆ setFieldCurrency()

void xrpl::STObject::setFieldCurrency ( SField const & field,
STCurrency const & v )
inherited

Definition at line 809 of file STObject.cpp.

◆ setFieldNumber()

void xrpl::STObject::setFieldNumber ( SField const & field,
STNumber const & v )
inherited

Definition at line 821 of file STObject.cpp.

◆ setFieldPathSet()

void xrpl::STObject::setFieldPathSet ( SField const & field,
STPathSet const & v )
inherited

Definition at line 827 of file STObject.cpp.

◆ setFieldV256()

void xrpl::STObject::setFieldV256 ( SField const & field,
STVector256 const & v )
inherited

Definition at line 779 of file STObject.cpp.

◆ setFieldArray()

void xrpl::STObject::setFieldArray ( SField const & field,
STArray const & v )
inherited

Definition at line 833 of file STObject.cpp.

◆ setFieldObject()

void xrpl::STObject::setFieldObject ( SField const & field,
STObject const & v )
inherited

Definition at line 839 of file STObject.cpp.

◆ setFieldH160()

template<class Tag>
void xrpl::STObject::setFieldH160 ( SField const & field,
BaseUInt< 160, Tag > const & v )
inherited

Definition at line 1152 of file STObject.h.

◆ peekFieldObject()

STObject & xrpl::STObject::peekFieldObject ( SField const & field)
inherited

Definition at line 475 of file STObject.cpp.

◆ peekFieldArray()

STArray & xrpl::STObject::peekFieldArray ( SField const & field)
inherited

Definition at line 481 of file STObject.cpp.

◆ isFieldPresent()

bool xrpl::STObject::isFieldPresent ( SField const & field) const
nodiscardinherited

Definition at line 464 of file STObject.cpp.

◆ makeFieldPresent()

STBase * xrpl::STObject::makeFieldPresent ( SField const & field)
inherited

Definition at line 528 of file STObject.cpp.

◆ makeFieldAbsent()

void xrpl::STObject::makeFieldAbsent ( SField const & field)
inherited

Definition at line 550 of file STObject.cpp.

◆ delField() [1/2]

bool xrpl::STObject::delField ( SField const & field)
inherited

Definition at line 565 of file STObject.cpp.

◆ delField() [2/2]

void xrpl::STObject::delField ( int index)
inherited

Definition at line 577 of file STObject.cpp.

◆ getStyle()

SOEStyle xrpl::STObject::getStyle ( SField const & field) const
nodiscardinherited

Definition at line 583 of file STObject.cpp.

◆ hasMatchingEntry()

bool xrpl::STObject::hasMatchingEntry ( STBase const & t) const
nodiscardinherited

Definition at line 284 of file STObject.cpp.

◆ operator==() [1/2]

bool xrpl::STObject::operator== ( STObject const & o) const
inherited

Definition at line 858 of file STObject.cpp.

◆ operator==() [2/2]

bool xrpl::STBase::operator== ( STBase const & t) const
inherited

Definition at line 36 of file STBase.cpp.

◆ getSortedFields()

std::vector< STBase const * > xrpl::STObject::getSortedFields ( STObject const & objToSort,
WhichFields whichFields )
staticprivateinherited

Definition at line 926 of file STObject.cpp.

◆ getFieldByValue()

template<typename T>
V xrpl::STObject::getFieldByValue ( SField const & field) const
privateinherited

Definition at line 1175 of file STObject.h.

◆ getFieldByConstRef() [1/2]

template<typename T, typename V>
V const & xrpl::STObject::getFieldByConstRef ( SField const & field,
V const & empty ) const
privateinherited

◆ getFieldByConstRef() [2/2]

template<typename T, typename V>
V const & xrpl::STObject::getFieldByConstRef ( SField const & field,
V const & empty ) const
inherited

Definition at line 1202 of file STObject.h.

◆ setFieldUsingSetValue()

template<typename T, typename V>
void xrpl::STObject::setFieldUsingSetValue ( SField const & field,
V value )
privateinherited

Definition at line 1228 of file STObject.h.

◆ setFieldUsingAssignment()

template<typename T>
void xrpl::STObject::setFieldUsingAssignment ( SField const & field,
T const & value )
privateinherited

Definition at line 1251 of file STObject.h.

◆ peekField()

template<typename T>
T & xrpl::STObject::peekField ( SField const & field)
privateinherited

Definition at line 1272 of file STObject.h.

◆ downcast() [1/3]

template<class D>
D & xrpl::STBase::downcast ( )
inherited

Definition at line 206 of file STBase.h.

◆ downcast() [2/3]

template<class D>
D const & xrpl::STBase::downcast ( ) const
inherited

◆ downcast() [3/3]

template<class D>
D const & xrpl::STBase::downcast ( ) const
nodiscardinherited

Definition at line 216 of file STBase.h.

◆ setFName()

void xrpl::STBase::setFName ( SField const & n)
inherited

A STBase is a field.

This sets the name.

Definition at line 113 of file STBase.cpp.

◆ getFName()

SField const & xrpl::STBase::getFName ( ) const
nodiscardinherited

Definition at line 120 of file STBase.cpp.

◆ addFieldID()

void xrpl::STBase::addFieldID ( Serializer & s) const
inherited

Definition at line 126 of file STBase.cpp.

◆ emplace()

template<class T>
STBase * xrpl::STBase::emplace ( std::size_t n,
void * buf,
T && val )
staticprotectedinherited

Definition at line 226 of file STBase.h.

◆ getCounter()

auto & xrpl::CountedObject< STObject >::getCounter ( )
staticprivatenoexceptinherited

Definition at line 113 of file CountedObject.h.

◆ detail::STVar

friend class detail::STVar
friend

Definition at line 196 of file STTx.h.

Member Data Documentation

◆ tid_

uint256 xrpl::STTx::tid_
private

Definition at line 42 of file STTx.h.

◆ txType_

TxType xrpl::STTx::txType_
private

Definition at line 43 of file STTx.h.

◆ kMinMultiSigners

std::size_t xrpl::STTx::kMinMultiSigners = 1
staticconstexpr

Definition at line 46 of file STTx.h.

◆ kMaxMultiSigners

std::size_t xrpl::STTx::kMaxMultiSigners = 32
staticconstexpr

Definition at line 47 of file STTx.h.

◆ batchTxns_

std::optional<std::vector<std::shared_ptr<STTx const> > > xrpl::STTx::batchTxns_
private

Definition at line 197 of file STTx.h.

◆ v_

list_type xrpl::STObject::v_
privateinherited

Definition at line 71 of file STObject.h.

◆ type_

SOTemplate const* xrpl::STObject::type_ {}
privateinherited

Definition at line 72 of file STObject.h.

◆ fName_

SField const* xrpl::STBase::fName_
privateinherited

Definition at line 130 of file STBase.h.

◆ Object [1/2]

Definition at line 138 of file CountedObject.h.

◆ Object [2/2]

friend xrpl::CountedObject< STTx >::STTx
inherited

Definition at line 138 of file CountedObject.h.