rippled
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Static Protected Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
ripple::STTx Class Referencefinal

#include <STTx.h>

Inheritance diagram for ripple::STTx:
Inheritance graph
[legend]
Collaboration diagram for ripple::STTx:
Collaboration graph
[legend]

Public Types

enum class  RequireFullyCanonicalSig : bool { no , yes }
 
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
 
std::uint32_t getSeqValue () const
 Returns the first non-zero value of (Sequence, TicketSequence).
 
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={})
 
Expected< void, std::stringcheckSign (RequireFullyCanonicalSig requireCanonicalSig, Rules const &rules) const
 Check the signature.
 
Expected< void, std::stringcheckBatchSign (RequireFullyCanonicalSig requireCanonicalSig, 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, char status, std::string const &escapedMetaData) const
 
std::vector< uint256 > const & getBatchTransactionIDs () const
 Retrieves a batch of transaction IDs from the STTx.
 
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)
 
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 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
 
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 >
auto operator[] (TypedField< T > const &f) -> ValueProxy< T >
 
template<class T >
auto operator[] (OptionaledField< T > const &of) -> OptionalProxy< T >
 
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.
 
template<class T >
auto at (TypedField< T > const &f) -> ValueProxy< T >
 
template<class T >
auto at (OptionaledField< T > const &of) -> OptionalProxy< T >
 
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)
 
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)
 
bool hasMatchingEntry (STBase const &)
 
bool operator== (STObject const &o) const
 
bool operator== (STBase const &t) const
 
bool operator!= (STObject const &o) const
 
bool operator!= (STBase const &t) const
 
template<typename T , typename V >
getFieldByValue (SField const &field) 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 std::size_t maxMultiSigners (Rules const *rules=0)
 
static Blob getSignature (STObject const &sigObject)
 
static std::string const & getMetaSQLInsertReplaceHeader ()
 
static STObject makeInnerObject (SField const &name)
 

Static Public Attributes

static std::size_t const minMultiSigners = 1
 

Static Protected Member Functions

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

Expected< void, std::stringcheckSign (RequireFullyCanonicalSig requireCanonicalSig, Rules const &rules, STObject const &sigObject) const
 Check the signature.
 
Expected< void, std::stringcheckSingleSign (RequireFullyCanonicalSig requireCanonicalSig, STObject const &sigObject) const
 
Expected< void, std::stringcheckMultiSign (RequireFullyCanonicalSig requireCanonicalSig, Rules const &rules, STObject const &sigObject) const
 
Expected< void, std::stringcheckBatchSingleSign (STObject const &batchSigner, RequireFullyCanonicalSig requireCanonicalSig) const
 
Expected< void, std::stringcheckBatchMultiSign (STObject const &batchSigner, RequireFullyCanonicalSig requireCanonicalSig, Rules const &rules) const
 
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 , typename V = typename std::remove_cv<typename std::remove_reference< decltype(std::declval<T>().value())>::type, ::type >
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 tx_type_
 
std::vector< uint256batchTxnIds_
 
list_type v_
 
SOTemplate const * mType
 
SField const * fName
 

Friends

class detail::STVar
 

Detailed Description

Definition at line 47 of file STTx.h.

Member Typedef Documentation

◆ list_type

Definition at line 77 of file STObject.h.

◆ iterator

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

Definition at line 83 of file STObject.h.

Member Enumeration Documentation

◆ RequireFullyCanonicalSig

enum class ripple::STTx::RequireFullyCanonicalSig : bool
strong
Enumerator
no 
yes 

Definition at line 134 of file STTx.h.

◆ WhichFields

enum ripple::STObject::WhichFields : bool
privateinherited
Enumerator
omitSigningFields 
withAllFields 

Definition at line 430 of file STObject.h.

Constructor & Destructor Documentation

◆ STTx() [1/6]

ripple::STTx::STTx ( )
delete

◆ STTx() [2/6]

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

◆ STTx() [3/6]

ripple::STTx::STTx ( SerialIter sit)
explicit

Definition at line 97 of file STTx.cpp.

◆ STTx() [4/6]

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

Definition at line 232 of file STTx.h.

◆ STTx() [5/6]

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

Definition at line 90 of file STTx.cpp.

◆ STTx() [6/6]

ripple::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 113 of file STTx.cpp.

Member Function Documentation

◆ maxMultiSigners()

static std::size_t ripple::STTx::maxMultiSigners ( Rules const *  rules = 0)
static

Definition at line 57 of file STTx.h.

◆ operator=()

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

◆ getSType()

SerializedTypeID ripple::STTx::getSType ( ) const
overridevirtual

Reimplemented from ripple::STObject.

Definition at line 145 of file STTx.cpp.

◆ getFullText()

std::string ripple::STTx::getFullText ( ) const
overridevirtual

Reimplemented from ripple::STObject.

Definition at line 151 of file STTx.cpp.

◆ getSignature() [1/2]

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

Definition at line 203 of file STTx.cpp.

◆ getSignature() [2/2]

Blob ripple::STTx::getSignature ( ) const

Definition at line 94 of file STTx.h.

◆ getSigningHash() [1/2]

uint256 ripple::STTx::getSigningHash ( ) const

Definition at line 197 of file STTx.cpp.

◆ getTxnType()

TxType ripple::STTx::getTxnType ( ) const

Definition at line 237 of file STTx.h.

◆ getSigningPubKey()

Blob ripple::STTx::getSigningPubKey ( ) const

Definition at line 243 of file STTx.h.

◆ getSeqProxy()

SeqProxy ripple::STTx::getSeqProxy ( ) const

Definition at line 216 of file STTx.cpp.

◆ getSeqValue()

std::uint32_t ripple::STTx::getSeqValue ( ) const

Returns the first non-zero value of (Sequence, TicketSequence).

Definition at line 231 of file STTx.cpp.

◆ getMentionedAccounts()

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

Definition at line 162 of file STTx.cpp.

◆ getTransactionID()

uint256 ripple::STTx::getTransactionID ( ) const

Definition at line 249 of file STTx.h.

◆ getJson() [1/2]

Json::Value ripple::STTx::getJson ( JsonOptions  options) const
overridevirtual

Reimplemented from ripple::STObject.

Definition at line 338 of file STTx.cpp.

◆ getJson() [2/2]

Json::Value ripple::STTx::getJson ( JsonOptions  options,
bool  binary 
) const

Definition at line 347 of file STTx.cpp.

◆ sign()

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

Definition at line 237 of file STTx.cpp.

◆ checkSign() [1/2]

Expected< void, std::string > ripple::STTx::checkSign ( RequireFullyCanonicalSig  requireCanonicalSig,
Rules const &  rules 
) const

Check the signature.

Parameters
requireCanonicalSigIf true, check that the signature is fully canonical. If false, only check that the signature is valid.
rulesThe current ledger rules.
Returns
true if valid signature. If invalid, the error message string.

Definition at line 282 of file STTx.cpp.

◆ checkBatchSign()

Expected< void, std::string > ripple::STTx::checkBatchSign ( RequireFullyCanonicalSig  requireCanonicalSig,
Rules const &  rules 
) const

Definition at line 302 of file STTx.cpp.

◆ getMetaSQLInsertReplaceHeader()

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

Definition at line 375 of file STTx.cpp.

◆ getMetaSQL() [1/2]

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

Definition at line 387 of file STTx.cpp.

◆ getMetaSQL() [2/2]

std::string ripple::STTx::getMetaSQL ( Serializer  rawTxn,
std::uint32_t  inLedger,
char  status,
std::string const &  escapedMetaData 
) const

Definition at line 397 of file STTx.cpp.

◆ getBatchTransactionIDs()

std::vector< uint256 > const & ripple::STTx::getBatchTransactionIDs ( ) const

Retrieves a batch of transaction IDs from the STTx.

This function returns a vector of transaction IDs by extracting them from the field array sfRawTransactions within the STTx. If the batch transaction IDs have already been computed and cached in batchTxnIds_, it returns the cached vector. Otherwise, it computes the transaction IDs, caches them, and then returns the vector.

Returns
A vector of uint256 containing the batch transaction IDs.
Note
The function asserts that the sfRawTransactions field array is not empty and that the size of the computed batch transaction IDs matches the size of the sfRawTransactions field array.

Definition at line 629 of file STTx.cpp.

◆ checkSign() [2/2]

Expected< void, std::string > ripple::STTx::checkSign ( RequireFullyCanonicalSig  requireCanonicalSig,
Rules const &  rules,
STObject const &  sigObject 
) const
private

Check the signature.

Parameters
requireCanonicalSigIf true, check that the signature is fully canonical. If false, only check that the signature is valid.
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 259 of file STTx.cpp.

◆ checkSingleSign()

Expected< void, std::string > ripple::STTx::checkSingleSign ( RequireFullyCanonicalSig  requireCanonicalSig,
STObject const &  sigObject 
) const
private

Definition at line 454 of file STTx.cpp.

◆ checkMultiSign()

Expected< void, std::string > ripple::STTx::checkMultiSign ( RequireFullyCanonicalSig  requireCanonicalSig,
Rules const &  rules,
STObject const &  sigObject 
) const
private

Definition at line 583 of file STTx.cpp.

◆ checkBatchSingleSign()

Expected< void, std::string > ripple::STTx::checkBatchSingleSign ( STObject const &  batchSigner,
RequireFullyCanonicalSig  requireCanonicalSig 
) const
private

Definition at line 465 of file STTx.cpp.

◆ checkBatchMultiSign()

Expected< void, std::string > ripple::STTx::checkBatchMultiSign ( STObject const &  batchSigner,
RequireFullyCanonicalSig  requireCanonicalSig,
Rules const &  rules 
) const
private

Definition at line 557 of file STTx.cpp.

◆ copy()

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

Reimplemented from ripple::STObject.

Definition at line 132 of file STTx.cpp.

◆ move()

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

Reimplemented from ripple::STObject.

Definition at line 138 of file STTx.cpp.

◆ makeInnerObject()

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

Definition at line 95 of file STObject.cpp.

◆ begin()

STObject::iterator ripple::STObject::begin ( ) const
inherited

Definition at line 933 of file STObject.h.

◆ end()

STObject::iterator ripple::STObject::end ( ) const
inherited

Definition at line 939 of file STObject.h.

◆ empty()

bool ripple::STObject::empty ( ) const
inherited

Definition at line 945 of file STObject.h.

◆ reserve()

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

Definition at line 951 of file STObject.h.

◆ applyTemplate()

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

Definition at line 172 of file STObject.cpp.

◆ applyTemplateFromSField()

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

Definition at line 226 of file STObject.cpp.

◆ isFree()

bool ripple::STObject::isFree ( ) const
inherited

Definition at line 957 of file STObject.h.

◆ set() [1/4]

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

Definition at line 156 of file STObject.cpp.

◆ set() [2/4]

bool ripple::STObject::set ( SerialIter u,
int  depth = 0 
)
inherited

Definition at line 236 of file STObject.cpp.

◆ set() [3/4]

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

Set a field.

if the field already exists, it is replaced.

Definition at line 723 of file STObject.cpp.

◆ set() [4/4]

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

Definition at line 729 of file STObject.cpp.

◆ isEquivalent()

bool ripple::STObject::isEquivalent ( STBase const &  t) const
overridevirtualinherited

Reimplemented from ripple::STBase.

Definition at line 360 of file STObject.cpp.

◆ isDefault()

bool ripple::STObject::isDefault ( ) const
overridevirtualinherited

Reimplemented from ripple::STBase.

Definition at line 135 of file STObject.cpp.

◆ add() [1/2]

void ripple::STObject::add ( Serializer s) const
overridevirtualinherited

Reimplemented from ripple::STBase.

Definition at line 141 of file STObject.cpp.

◆ add() [2/2]

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

Definition at line 909 of file STObject.cpp.

◆ getText()

std::string ripple::STObject::getText ( ) const
overridevirtualinherited

Reimplemented from ripple::STBase.

Definition at line 341 of file STObject.cpp.

◆ addWithoutSigningFields()

void ripple::STObject::addWithoutSigningFields ( Serializer s) const
inherited

Definition at line 963 of file STObject.h.

◆ getSerializer()

Serializer ripple::STObject::getSerializer ( ) const
inherited

Definition at line 972 of file STObject.h.

◆ emplace_back()

template<class... Args>
std::size_t ripple::STObject::emplace_back ( Args &&...  args)
inherited

Definition at line 981 of file STObject.h.

◆ getCount()

int ripple::STObject::getCount ( ) const
inherited

Definition at line 988 of file STObject.h.

◆ setFlag()

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

Definition at line 507 of file STObject.cpp.

◆ clearFlag()

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

Definition at line 519 of file STObject.cpp.

◆ isFlag()

bool ripple::STObject::isFlag ( std::uint32_t  f) const
inherited

Definition at line 531 of file STObject.cpp.

◆ getFlags()

std::uint32_t ripple::STObject::getFlags ( void  ) const
inherited

Definition at line 537 of file STObject.cpp.

◆ getHash()

uint256 ripple::STObject::getHash ( HashPrefix  prefix) const
inherited

Definition at line 395 of file STObject.cpp.

◆ getSigningHash() [2/2]

uint256 ripple::STObject::getSigningHash ( HashPrefix  prefix) const
inherited

Definition at line 404 of file STObject.cpp.

◆ peekAtIndex()

STBase const & ripple::STObject::peekAtIndex ( int  offset) const
inherited

Definition at line 994 of file STObject.h.

◆ getIndex()

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

Definition at line 1000 of file STObject.h.

◆ peekAtPIndex()

STBase const * ripple::STObject::peekAtPIndex ( int  offset) const
inherited

Definition at line 1006 of file STObject.h.

◆ getPIndex()

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

Definition at line 1012 of file STObject.h.

◆ getFieldIndex()

int ripple::STObject::getFieldIndex ( SField const &  field) const
inherited

Definition at line 413 of file STObject.cpp.

◆ getFieldSType()

SField const & ripple::STObject::getFieldSType ( int  index) const
inherited

Definition at line 451 of file STObject.cpp.

◆ peekAtField()

STBase const & ripple::STObject::peekAtField ( SField const &  field) const
inherited

Definition at line 429 of file STObject.cpp.

◆ getField()

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

Definition at line 440 of file STObject.cpp.

◆ peekAtPField()

STBase const * ripple::STObject::peekAtPField ( SField const &  field) const
inherited

Definition at line 457 of file STObject.cpp.

◆ getPField()

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

Definition at line 468 of file STObject.cpp.

◆ getFieldU8()

unsigned char ripple::STObject::getFieldU8 ( SField const &  field) const
inherited

Definition at line 603 of file STObject.cpp.

◆ getFieldU16()

std::uint16_t ripple::STObject::getFieldU16 ( SField const &  field) const
inherited

Definition at line 609 of file STObject.cpp.

◆ getFieldU32()

std::uint32_t ripple::STObject::getFieldU32 ( SField const &  field) const
inherited

Definition at line 615 of file STObject.cpp.

◆ getFieldU64()

std::uint64_t ripple::STObject::getFieldU64 ( SField const &  field) const
inherited

Definition at line 621 of file STObject.cpp.

◆ getFieldH128()

uint128 ripple::STObject::getFieldH128 ( SField const &  field) const
inherited

Definition at line 627 of file STObject.cpp.

◆ getFieldH160()

uint160 ripple::STObject::getFieldH160 ( SField const &  field) const
inherited

Definition at line 633 of file STObject.cpp.

◆ getFieldH192()

uint192 ripple::STObject::getFieldH192 ( SField const &  field) const
inherited

Definition at line 639 of file STObject.cpp.

◆ getFieldH256()

uint256 ripple::STObject::getFieldH256 ( SField const &  field) const
inherited

Definition at line 645 of file STObject.cpp.

◆ getFieldI32()

std::int32_t ripple::STObject::getFieldI32 ( SField const &  field) const
inherited

Definition at line 651 of file STObject.cpp.

◆ getAccountID()

AccountID ripple::STObject::getAccountID ( SField const &  field) const
inherited

Definition at line 657 of file STObject.cpp.

◆ getFieldVL()

Blob ripple::STObject::getFieldVL ( SField const &  field) const
inherited

Definition at line 663 of file STObject.cpp.

◆ getFieldAmount()

STAmount const & ripple::STObject::getFieldAmount ( SField const &  field) const
inherited

Definition at line 671 of file STObject.cpp.

◆ getFieldPathSet()

STPathSet const & ripple::STObject::getFieldPathSet ( SField const &  field) const
inherited

Definition at line 678 of file STObject.cpp.

◆ getFieldV256()

STVector256 const & ripple::STObject::getFieldV256 ( SField const &  field) const
inherited

Definition at line 685 of file STObject.cpp.

◆ getFieldObject()

STObject ripple::STObject::getFieldObject ( SField const &  field) const
inherited

Definition at line 692 of file STObject.cpp.

◆ getFieldArray()

STArray const & ripple::STObject::getFieldArray ( SField const &  field) const
inherited

Definition at line 702 of file STObject.cpp.

◆ getFieldCurrency()

STCurrency const & ripple::STObject::getFieldCurrency ( SField const &  field) const
inherited

Definition at line 709 of file STObject.cpp.

◆ getFieldNumber()

STNumber const & ripple::STObject::getFieldNumber ( SField const &  field) const
inherited

Definition at line 716 of file STObject.cpp.

◆ operator[]() [1/6]

template<class T >
T::value_type ripple::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 1019 of file STObject.h.

◆ operator[]() [2/6]

template<class T >
std::optional< std::decay_t< typename T::value_type > > ripple::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 1026 of file STObject.h.

◆ operator[]() [3/6]

template<class T >
ValueProxy< T > ripple::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.

◆ operator[]() [4/6]

template<class T >
OptionalProxy< T > ripple::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.

◆ operator[]() [5/6]

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

Definition at line 1033 of file STObject.h.

◆ operator[]() [6/6]

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

Definition at line 1040 of file STObject.h.

◆ at() [1/6]

template<class T >
T::value_type ripple::STObject::at ( 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 1047 of file STObject.h.

◆ at() [2/6]

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

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 1080 of file STObject.h.

◆ at() [3/6]

template<class T >
ValueProxy< T > ripple::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.

◆ at() [4/6]

template<class T >
OptionalProxy< T > ripple::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.

◆ at() [5/6]

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

Definition at line 1108 of file STObject.h.

◆ at() [6/6]

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

Definition at line 1115 of file STObject.h.

◆ setFieldU8()

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

Definition at line 745 of file STObject.cpp.

◆ setFieldU16()

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

Definition at line 751 of file STObject.cpp.

◆ setFieldU32()

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

Definition at line 757 of file STObject.cpp.

◆ setFieldU64()

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

Definition at line 763 of file STObject.cpp.

◆ setFieldH128()

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

Definition at line 769 of file STObject.cpp.

◆ setFieldH256()

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

Definition at line 775 of file STObject.cpp.

◆ setFieldI32()

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

Definition at line 781 of file STObject.cpp.

◆ setFieldVL() [1/2]

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

Definition at line 799 of file STObject.cpp.

◆ setFieldVL() [2/2]

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

Definition at line 805 of file STObject.cpp.

◆ setAccountID()

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

Definition at line 793 of file STObject.cpp.

◆ setFieldAmount()

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

Definition at line 811 of file STObject.cpp.

◆ setFieldIssue()

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

Definition at line 823 of file STObject.cpp.

◆ setFieldCurrency()

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

Definition at line 817 of file STObject.cpp.

◆ setFieldNumber()

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

Definition at line 829 of file STObject.cpp.

◆ setFieldPathSet()

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

Definition at line 835 of file STObject.cpp.

◆ setFieldV256()

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

Definition at line 787 of file STObject.cpp.

◆ setFieldArray()

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

Definition at line 841 of file STObject.cpp.

◆ setFieldObject()

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

Definition at line 847 of file STObject.cpp.

◆ setFieldH160()

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

Definition at line 1122 of file STObject.h.

◆ peekFieldObject()

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

Definition at line 495 of file STObject.cpp.

◆ peekFieldArray()

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

Definition at line 501 of file STObject.cpp.

◆ isFieldPresent()

bool ripple::STObject::isFieldPresent ( SField const &  field) const
inherited

Definition at line 484 of file STObject.cpp.

◆ makeFieldPresent()

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

Definition at line 548 of file STObject.cpp.

◆ makeFieldAbsent()

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

Definition at line 570 of file STObject.cpp.

◆ delField() [1/2]

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

Definition at line 585 of file STObject.cpp.

◆ delField() [2/2]

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

Definition at line 597 of file STObject.cpp.

◆ hasMatchingEntry()

bool ripple::STObject::hasMatchingEntry ( STBase const &  t)
inherited

Definition at line 299 of file STObject.cpp.

◆ operator==() [1/2]

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

Definition at line 866 of file STObject.cpp.

◆ operator==() [2/2]

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

Definition at line 51 of file STBase.cpp.

◆ operator!=() [1/2]

bool ripple::STObject::operator!= ( STObject const &  o) const
inherited

Definition at line 1140 of file STObject.h.

◆ operator!=() [2/2]

bool ripple::STBase::operator!= ( STBase const &  t) const
inherited

Definition at line 57 of file STBase.cpp.

◆ getSortedFields()

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

Definition at line 935 of file STObject.cpp.

◆ getFieldByValue() [1/2]

template<typename T , typename V = typename std::remove_cv<typename std::remove_reference< decltype(std::declval<T>().value())>::type, ::type >
V ripple::STObject::getFieldByValue ( SField const &  field) const
privateinherited

◆ getFieldByValue() [2/2]

template<typename T , typename V >
V ripple::STObject::getFieldByValue ( SField const &  field) const
inherited

Definition at line 1147 of file STObject.h.

◆ getFieldByConstRef() [1/2]

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

◆ getFieldByConstRef() [2/2]

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

Definition at line 1174 of file STObject.h.

◆ setFieldUsingSetValue()

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

Definition at line 1197 of file STObject.h.

◆ setFieldUsingAssignment()

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

Definition at line 1220 of file STObject.h.

◆ peekField()

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

Definition at line 1241 of file STObject.h.

◆ downcast() [1/3]

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

Definition at line 213 of file STBase.h.

◆ downcast() [2/3]

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

◆ downcast() [3/3]

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

Definition at line 223 of file STBase.h.

◆ setFName()

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

A STBase is a field.

This sets the name.

Definition at line 136 of file STBase.cpp.

◆ getFName()

SField const & ripple::STBase::getFName ( ) const
inherited

Definition at line 143 of file STBase.cpp.

◆ addFieldID()

void ripple::STBase::addFieldID ( Serializer s) const
inherited

Definition at line 149 of file STBase.cpp.

◆ emplace()

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

Definition at line 233 of file STBase.h.

◆ getCounter()

static auto & ripple::CountedObject< STObject >::getCounter ( )
staticprivatenoexceptinherited

Definition at line 129 of file CountedObject.h.

Friends And Related Symbol Documentation

◆ detail::STVar

friend class detail::STVar
friend

Definition at line 211 of file STTx.h.

Member Data Documentation

◆ tid_

uint256 ripple::STTx::tid_
private

Definition at line 49 of file STTx.h.

◆ tx_type_

TxType ripple::STTx::tx_type_
private

Definition at line 50 of file STTx.h.

◆ minMultiSigners

std::size_t const ripple::STTx::minMultiSigners = 1
static

Definition at line 53 of file STTx.h.

◆ batchTxnIds_

std::vector<uint256> ripple::STTx::batchTxnIds_
mutableprivate

Definition at line 212 of file STTx.h.

◆ v_

list_type ripple::STObject::v_
privateinherited

Definition at line 79 of file STObject.h.

◆ mType

SOTemplate const* ripple::STObject::mType
privateinherited

Definition at line 80 of file STObject.h.

◆ fName

SField const* ripple::STBase::fName
privateinherited

Definition at line 136 of file STBase.h.