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

#include <STValidation.h>

Inheritance diagram for xrpl::STValidation:
Inheritance graph
[legend]
Collaboration diagram for xrpl::STValidation:
Collaboration graph
[legend]

Public Types

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

Public Member Functions

template<class LookupNodeID >
 STValidation (SerialIter &sit, LookupNodeID &&lookupNodeID, bool checkSignature)
 Construct a STValidation from a peer from serialized data.
 
template<typename F >
 STValidation (NetClock::time_point signTime, PublicKey const &pk, SecretKey const &sk, NodeID const &nodeID, F &&f)
 Construct, sign and trust a new STValidation issued by this node.
 
uint256 getLedgerHash () const
 
uint256 getConsensusHash () const
 
NetClock::time_point getSignTime () const
 
NetClock::time_point getSeenTime () const noexcept
 
PublicKey const & getSignerPublic () const noexcept
 
NodeID const & getNodeID () const noexcept
 
bool isValid () const noexcept
 
bool isFull () const noexcept
 
bool isTrusted () const noexcept
 
uint256 getSigningHash () const
 
void setTrusted ()
 
void setUntrusted ()
 
void setSeen (NetClock::time_point s)
 
Blob getSerialized () const
 
Blob getSignature () const
 
std::string render () 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)
 
void set (std::unique_ptr< STBase > v)
 Set a field.
 
void set (STBase &&v)
 
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
 
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)
 
SOEStyle getStyle (SField const &field) const
 
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 STObject makeInnerObject (SField const &name)
 

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

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 SOTemplate const & validationFormat ()
 
static std::vector< STBase const * > getSortedFields (STObject const &objToSort, WhichFields whichFields)
 
static auto & getCounter () noexcept
 

Private Attributes

bool mTrusted = false
 
std::optional< bool > valid_
 
PublicKey const signingPubKey_
 
NodeID const nodeID_
 
NetClock::time_point seenTime_ = {}
 
list_type v_
 
SOTemplate const * mType
 
SField const * fName
 

Friends

class detail::STVar
 

Detailed Description

Definition at line 24 of file STValidation.h.

Member Typedef Documentation

◆ list_type

Definition at line 57 of file STObject.h.

◆ iterator

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

Definition at line 63 of file STObject.h.

Member Enumeration Documentation

◆ WhichFields

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

Definition at line 411 of file STObject.h.

Constructor & Destructor Documentation

◆ STValidation() [1/2]

template<class LookupNodeID >
xrpl::STValidation::STValidation ( SerialIter sit,
LookupNodeID &&  lookupNodeID,
bool  checkSignature 
)

Construct a STValidation from a peer from serialized data.

Parameters
sitIterator over serialized data
lookupNodeIDInvocable with signature NodeID(PublicKey const&) used to find the Node ID based on the public key that signed the validation. For manifest based validators, this should be the NodeID of the master public key.
checkSignatureWhether to verify the data was signed properly
Note
Throws if the object is not valid

Definition at line 141 of file STValidation.h.

◆ STValidation() [2/2]

template<typename F >
xrpl::STValidation::STValidation ( NetClock::time_point  signTime,
PublicKey const &  pk,
SecretKey const &  sk,
NodeID const &  nodeID,
F &&  f 
)

Construct, sign and trust a new STValidation issued by this node.

Parameters
signTimeWhen the validation is signed
publicKeyThe current signing public key
secretKeyThe current signing secret key
nodeIDID corresponding to node's public master key
fcallback function to "fill" the validation with necessary data

Definition at line 171 of file STValidation.h.

Member Function Documentation

◆ getLedgerHash()

uint256 xrpl::STValidation::getLedgerHash ( ) const

Definition at line 74 of file STValidation.cpp.

◆ getConsensusHash()

uint256 xrpl::STValidation::getConsensusHash ( ) const

Definition at line 80 of file STValidation.cpp.

◆ getSignTime()

NetClock::time_point xrpl::STValidation::getSignTime ( ) const

Definition at line 86 of file STValidation.cpp.

◆ getSeenTime()

NetClock::time_point xrpl::STValidation::getSeenTime ( ) const
noexcept

Definition at line 92 of file STValidation.cpp.

◆ getSignerPublic()

PublicKey const & xrpl::STValidation::getSignerPublic ( ) const
noexcept

Definition at line 211 of file STValidation.h.

◆ getNodeID()

NodeID const & xrpl::STValidation::getNodeID ( ) const
noexcept

Definition at line 217 of file STValidation.h.

◆ isValid()

bool xrpl::STValidation::isValid ( ) const
noexcept

Definition at line 98 of file STValidation.cpp.

◆ isFull()

bool xrpl::STValidation::isFull ( ) const
noexcept

Definition at line 113 of file STValidation.cpp.

◆ isTrusted()

bool xrpl::STValidation::isTrusted ( ) const
noexcept

Definition at line 223 of file STValidation.h.

◆ getSigningHash() [1/2]

uint256 xrpl::STValidation::getSigningHash ( ) const

Definition at line 68 of file STValidation.cpp.

◆ setTrusted()

void xrpl::STValidation::setTrusted ( )

Definition at line 229 of file STValidation.h.

◆ setUntrusted()

void xrpl::STValidation::setUntrusted ( )

Definition at line 235 of file STValidation.h.

◆ setSeen()

void xrpl::STValidation::setSeen ( NetClock::time_point  s)

Definition at line 241 of file STValidation.h.

◆ getSerialized()

Blob xrpl::STValidation::getSerialized ( ) const

Definition at line 125 of file STValidation.cpp.

◆ getSignature()

Blob xrpl::STValidation::getSignature ( ) const

Definition at line 119 of file STValidation.cpp.

◆ render()

std::string xrpl::STValidation::render ( ) const

Definition at line 117 of file STValidation.h.

◆ validationFormat()

SOTemplate const & xrpl::STValidation::validationFormat ( )
staticprivate

Definition at line 34 of file STValidation.cpp.

◆ copy()

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

Reimplemented from xrpl::STObject.

Definition at line 22 of file STValidation.cpp.

◆ move()

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

Reimplemented from xrpl::STObject.

Definition at line 28 of file STValidation.cpp.

◆ makeInnerObject()

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

Definition at line 72 of file STObject.cpp.

◆ begin()

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

Definition at line 927 of file STObject.h.

◆ end()

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

Definition at line 933 of file STObject.h.

◆ empty()

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

Definition at line 939 of file STObject.h.

◆ reserve()

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

Definition at line 945 of file STObject.h.

◆ applyTemplate()

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

Definition at line 148 of file STObject.cpp.

◆ applyTemplateFromSField()

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

Definition at line 197 of file STObject.cpp.

◆ isFree()

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

Definition at line 951 of file STObject.h.

◆ set() [1/4]

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

Definition at line 132 of file STObject.cpp.

◆ set() [2/4]

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

Definition at line 206 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 684 of file STObject.cpp.

◆ set() [4/4]

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

Definition at line 690 of file STObject.cpp.

◆ getSType()

SerializedTypeID xrpl::STObject::getSType ( ) const
overridevirtualinherited

Reimplemented from xrpl::STBase.

Reimplemented in xrpl::STTx.

Definition at line 105 of file STObject.cpp.

◆ isEquivalent()

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

Reimplemented from xrpl::STBase.

Definition at line 327 of file STObject.cpp.

◆ isDefault()

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

Reimplemented from xrpl::STBase.

Definition at line 111 of file STObject.cpp.

◆ add() [1/2]

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

Reimplemented from xrpl::STBase.

Definition at line 117 of file STObject.cpp.

◆ add() [2/2]

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

Definition at line 870 of file STObject.cpp.

◆ getFullText()

std::string xrpl::STObject::getFullText ( ) const
overridevirtualinherited

Reimplemented from xrpl::STBase.

Reimplemented in xrpl::STTx.

Definition at line 277 of file STObject.cpp.

◆ getText()

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

Reimplemented from xrpl::STBase.

Definition at line 308 of file STObject.cpp.

◆ getJson()

Json::Value xrpl::STObject::getJson ( JsonOptions  options = JsonOptions::none) const
overridevirtualinherited

Reimplemented from xrpl::STBase.

Reimplemented in xrpl::STTx.

Definition at line 814 of file STObject.cpp.

◆ addWithoutSigningFields()

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

Definition at line 957 of file STObject.h.

◆ getSerializer()

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

Definition at line 966 of file STObject.h.

◆ emplace_back()

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

Definition at line 975 of file STObject.h.

◆ getCount()

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

Definition at line 982 of file STObject.h.

◆ setFlag()

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

Definition at line 462 of file STObject.cpp.

◆ clearFlag()

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

Definition at line 474 of file STObject.cpp.

◆ isFlag()

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

Definition at line 486 of file STObject.cpp.

◆ getFlags()

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

Definition at line 492 of file STObject.cpp.

◆ getHash()

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

Definition at line 350 of file STObject.cpp.

◆ getSigningHash() [2/2]

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

Definition at line 359 of file STObject.cpp.

◆ peekAtIndex()

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

Definition at line 988 of file STObject.h.

◆ getIndex()

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

Definition at line 994 of file STObject.h.

◆ peekAtPIndex()

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

Definition at line 1000 of file STObject.h.

◆ getPIndex()

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

Definition at line 1006 of file STObject.h.

◆ getFieldIndex()

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

Definition at line 368 of file STObject.cpp.

◆ getFieldSType()

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

Definition at line 406 of file STObject.cpp.

◆ peekAtField()

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

Definition at line 384 of file STObject.cpp.

◆ getField()

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

Definition at line 395 of file STObject.cpp.

◆ peekAtPField()

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

Definition at line 412 of file STObject.cpp.

◆ getPField()

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

Definition at line 423 of file STObject.cpp.

◆ getFieldU8()

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

Definition at line 564 of file STObject.cpp.

◆ getFieldU16()

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

Definition at line 570 of file STObject.cpp.

◆ getFieldU32()

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

Definition at line 576 of file STObject.cpp.

◆ getFieldU64()

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

Definition at line 582 of file STObject.cpp.

◆ getFieldH128()

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

Definition at line 588 of file STObject.cpp.

◆ getFieldH160()

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

Definition at line 594 of file STObject.cpp.

◆ getFieldH192()

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

Definition at line 600 of file STObject.cpp.

◆ getFieldH256()

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

Definition at line 606 of file STObject.cpp.

◆ getFieldI32()

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

Definition at line 612 of file STObject.cpp.

◆ getAccountID()

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

Definition at line 618 of file STObject.cpp.

◆ getFieldVL()

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

Definition at line 624 of file STObject.cpp.

◆ getFieldAmount()

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

Definition at line 632 of file STObject.cpp.

◆ getFieldPathSet()

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

Definition at line 639 of file STObject.cpp.

◆ getFieldV256()

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

Definition at line 646 of file STObject.cpp.

◆ getFieldObject()

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

Definition at line 653 of file STObject.cpp.

◆ getFieldArray()

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

Definition at line 663 of file STObject.cpp.

◆ getFieldCurrency()

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

Definition at line 670 of file STObject.cpp.

◆ getFieldNumber()

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

Definition at line 677 of file STObject.cpp.

◆ operator[]() [1/6]

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

◆ operator[]() [2/6]

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

◆ operator[]() [3/6]

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

◆ operator[]() [4/6]

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

◆ operator[]() [5/6]

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

Definition at line 1027 of file STObject.h.

◆ operator[]() [6/6]

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

Definition at line 1034 of file STObject.h.

◆ at() [1/6]

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

◆ at() [2/6]

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

◆ at() [3/6]

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

◆ at() [4/6]

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

◆ at() [5/6]

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

Definition at line 1094 of file STObject.h.

◆ at() [6/6]

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

Definition at line 1101 of file STObject.h.

◆ setFieldU8()

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

Definition at line 706 of file STObject.cpp.

◆ setFieldU16()

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

Definition at line 712 of file STObject.cpp.

◆ setFieldU32()

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

Definition at line 718 of file STObject.cpp.

◆ setFieldU64()

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

Definition at line 724 of file STObject.cpp.

◆ setFieldH128()

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

Definition at line 730 of file STObject.cpp.

◆ setFieldH256()

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

Definition at line 736 of file STObject.cpp.

◆ setFieldI32()

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

Definition at line 742 of file STObject.cpp.

◆ setFieldVL() [1/2]

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

Definition at line 760 of file STObject.cpp.

◆ setFieldVL() [2/2]

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

Definition at line 766 of file STObject.cpp.

◆ setAccountID()

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

Definition at line 754 of file STObject.cpp.

◆ setFieldAmount()

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

Definition at line 772 of file STObject.cpp.

◆ setFieldIssue()

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

Definition at line 784 of file STObject.cpp.

◆ setFieldCurrency()

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

Definition at line 778 of file STObject.cpp.

◆ setFieldNumber()

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

Definition at line 790 of file STObject.cpp.

◆ setFieldPathSet()

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

Definition at line 796 of file STObject.cpp.

◆ setFieldV256()

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

Definition at line 748 of file STObject.cpp.

◆ setFieldArray()

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

Definition at line 802 of file STObject.cpp.

◆ setFieldObject()

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

Definition at line 808 of file STObject.cpp.

◆ setFieldH160()

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

Definition at line 1108 of file STObject.h.

◆ peekFieldObject()

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

Definition at line 450 of file STObject.cpp.

◆ peekFieldArray()

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

Definition at line 456 of file STObject.cpp.

◆ isFieldPresent()

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

Definition at line 439 of file STObject.cpp.

◆ makeFieldPresent()

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

Definition at line 503 of file STObject.cpp.

◆ makeFieldAbsent()

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

Definition at line 525 of file STObject.cpp.

◆ delField() [1/2]

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

Definition at line 540 of file STObject.cpp.

◆ delField() [2/2]

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

Definition at line 552 of file STObject.cpp.

◆ getStyle()

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

Definition at line 558 of file STObject.cpp.

◆ hasMatchingEntry()

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

Definition at line 266 of file STObject.cpp.

◆ operator==() [1/2]

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

Definition at line 827 of file STObject.cpp.

◆ operator==() [2/2]

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

Definition at line 32 of file STBase.cpp.

◆ operator!=() [1/2]

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

Definition at line 1126 of file STObject.h.

◆ operator!=() [2/2]

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

Definition at line 38 of file STBase.cpp.

◆ getSortedFields()

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

Definition at line 894 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 xrpl::STObject::getFieldByValue ( SField const &  field) const
privateinherited

◆ getFieldByValue() [2/2]

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

Definition at line 1133 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 1160 of file STObject.h.

◆ setFieldUsingSetValue()

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

Definition at line 1183 of file STObject.h.

◆ setFieldUsingAssignment()

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

Definition at line 1206 of file STObject.h.

◆ peekField()

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

Definition at line 1227 of file STObject.h.

◆ downcast() [1/3]

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

Definition at line 193 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
inherited

Definition at line 203 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 115 of file STBase.cpp.

◆ getFName()

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

Definition at line 122 of file STBase.cpp.

◆ addFieldID()

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

Definition at line 128 of file STBase.cpp.

◆ emplace()

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

Definition at line 213 of file STBase.h.

◆ getCounter()

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

Definition at line 109 of file CountedObject.h.

Friends And Related Symbol Documentation

◆ detail::STVar

friend class detail::STVar
friend

Definition at line 137 of file STValidation.h.

Member Data Documentation

◆ mTrusted

bool xrpl::STValidation::mTrusted = false
private

Definition at line 26 of file STValidation.h.

◆ valid_

std::optional<bool> xrpl::STValidation::valid_
mutableprivate

Definition at line 30 of file STValidation.h.

◆ signingPubKey_

PublicKey const xrpl::STValidation::signingPubKey_
private

Definition at line 33 of file STValidation.h.

◆ nodeID_

NodeID const xrpl::STValidation::nodeID_
private

Definition at line 37 of file STValidation.h.

◆ seenTime_

NetClock::time_point xrpl::STValidation::seenTime_ = {}
private

Definition at line 39 of file STValidation.h.

◆ v_

list_type xrpl::STObject::v_
privateinherited

Definition at line 59 of file STObject.h.

◆ mType

SOTemplate const* xrpl::STObject::mType
privateinherited

Definition at line 60 of file STObject.h.

◆ fName

SField const* xrpl::STBase::fName
privateinherited

Definition at line 116 of file STBase.h.