rippled
Classes | 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
ripple::STObject Class Reference
Inheritance diagram for ripple::STObject:
Inheritance graph
[legend]
Collaboration diagram for ripple::STObject:
Collaboration graph
[legend]

Classes

class  FieldErr
 
class  OptionalProxy
 
class  Proxy
 
struct  Transform
 
class  ValueProxy
 

Public Types

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

Public Member Functions

virtual ~STObject ()=default
 
 STObject (STObject const &)=default
 
template<typename F >
 STObject (SOTemplate const &type, SField const &name, F &&f)
 
STObjectoperator= (STObject const &)=default
 
 STObject (STObject &&)
 
STObjectoperator= (STObject &&other)
 
 STObject (const SOTemplate &type, SField const &name)
 
 STObject (const SOTemplate &type, SerialIter &sit, SField const &name)
 
 STObject (SerialIter &sit, SField const &name, int depth=0)
 
 STObject (SerialIter &&sit, SField const &name)
 
 STObject (SField const &name)
 
iterator begin () const
 
iterator end () const
 
bool empty () const
 
void reserve (std::size_t n)
 
void applyTemplate (const SOTemplate &type)
 
void applyTemplateFromSField (SField const &)
 
bool isFree () const
 
void set (const SOTemplate &)
 
bool set (SerialIter &u, int depth=0)
 
SerializedTypeID getSType () const override
 
bool isEquivalent (const STBase &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 options) 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
 
const STBasepeekAtIndex (int offset) const
 
STBasegetIndex (int offset)
 
const STBasepeekAtPIndex (int offset) const
 
STBasegetPIndex (int offset)
 
int getFieldIndex (SField const &field) const
 
SField const & getFieldSType (int index) const
 
const STBasepeekAtField (SField const &field) const
 
STBasegetField (SField const &field)
 
const STBasepeekAtPField (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
 
uint256 getFieldH256 (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
 
const STVector256getFieldV256 (SField const &field) const
 
const STArraygetFieldArray (SField const &field) const
 
const STCurrencygetFieldCurrency (SField const &field) const
 
template<class T >
T::value_type operator[] (TypedField< T > const &f) const
 Get the value of a field. More...
 
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. More...
 
template<class T >
ValueProxy< T > operator[] (TypedField< T > const &f)
 Get a modifiable field value. More...
 
template<class T >
OptionalProxy< T > operator[] (OptionaledField< T > const &of)
 Return a modifiable field value as std::optional. More...
 
template<class T >
T::value_type at (TypedField< T > const &f) const
 Get the value of a field. More...
 
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. More...
 
template<class T >
ValueProxy< T > at (TypedField< T > const &f)
 Get a modifiable field value. More...
 
template<class T >
OptionalProxy< T > at (OptionaledField< T > const &of)
 Return a modifiable field value as std::optional. More...
 
void set (std::unique_ptr< STBase > v)
 Set a field. More...
 
void set (STBase &&v)
 
void setFieldU8 (SField const &field, unsigned char)
 
void setFieldU16 (SField const &field, std::uint16_t)
 
void setFieldU32 (SField const &field, std::uint32_t)
 
void setFieldU64 (SField const &field, std::uint64_t)
 
void setFieldH128 (SField const &field, uint128 const &)
 
void setFieldH256 (SField const &field, uint256 const &)
 
void 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 setFieldPathSet (SField const &field, STPathSet const &)
 
void setFieldV256 (SField const &field, STVector256 const &v)
 
void setFieldArray (SField const &field, STArray 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 (const STBase &)
 
bool operator== (const STObject &o) const
 
bool operator!= (const STObject &o) const
 
template<class T >
auto operator[] (TypedField< T > const &f) -> ValueProxy< T >
 
template<class T >
auto operator[] (OptionaledField< T > const &of) -> OptionalProxy< T >
 
template<class T >
auto at (TypedField< T > const &f) -> ValueProxy< T >
 
template<class T >
auto at (OptionaledField< T > const &of) -> OptionalProxy< T >
 
template<typename T , typename V >
getFieldByValue (SField const &field) const
 
bool operator== (const STBase &t) const
 
bool operator!= (const STBase &t) const
 
template<class D >
D & downcast ()
 
template<class D >
D const & downcast () const
 
void setFName (SField const &n)
 A STBase is a field. More...
 
SField const & getFName () const
 
void addFieldID (Serializer &s) const
 

Static Public Member Functions

static STObject makeInnerObject (SField const &name, Rules const &rules)
 

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

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)
 
STBasecopy (std::size_t n, void *buf) const override
 
STBasemove (std::size_t n, void *buf) override
 

Static Private Member Functions

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

Private Attributes

list_type v_
 
SOTemplate const * mType
 
SField const * fName
 

Friends

class detail::STVar
 

Detailed Description

Definition at line 55 of file STObject.h.

Member Typedef Documentation

◆ list_type

Definition at line 76 of file STObject.h.

◆ iterator

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

Definition at line 83 of file STObject.h.

Member Enumeration Documentation

◆ WhichFields

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

Definition at line 415 of file STObject.h.

Constructor & Destructor Documentation

◆ ~STObject()

virtual ripple::STObject::~STObject ( )
virtualdefault

◆ STObject() [1/8]

ripple::STObject::STObject ( STObject const &  )
default

◆ STObject() [2/8]

template<typename F >
ripple::STObject::STObject ( SOTemplate const &  type,
SField const &  name,
F &&  f 
)

Definition at line 89 of file STObject.h.

◆ STObject() [3/8]

ripple::STObject::STObject ( STObject &&  other)

Definition at line 32 of file STObject.cpp.

◆ STObject() [4/8]

ripple::STObject::STObject ( const SOTemplate type,
SField const &  name 
)

Definition at line 41 of file STObject.cpp.

◆ STObject() [5/8]

ripple::STObject::STObject ( const SOTemplate type,
SerialIter sit,
SField const &  name 
)

Definition at line 46 of file STObject.cpp.

◆ STObject() [6/8]

ripple::STObject::STObject ( SerialIter sit,
SField const &  name,
int  depth = 0 
)
noexcept

Definition at line 54 of file STObject.cpp.

◆ STObject() [7/8]

ripple::STObject::STObject ( SerialIter &&  sit,
SField const &  name 
)

Definition at line 866 of file STObject.h.

◆ STObject() [8/8]

ripple::STObject::STObject ( SField const &  name)
explicit

Definition at line 37 of file STObject.cpp.

Member Function Documentation

◆ operator=() [1/2]

STObject& ripple::STObject::operator= ( STObject const &  )
default

◆ operator=() [2/2]

STObject & ripple::STObject::operator= ( STObject &&  other)

Definition at line 107 of file STObject.cpp.

◆ makeInnerObject()

STObject ripple::STObject::makeInnerObject ( SField const &  name,
Rules const &  rules 
)
static

Definition at line 64 of file STObject.cpp.

◆ begin()

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

Definition at line 872 of file STObject.h.

◆ end()

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

Definition at line 878 of file STObject.h.

◆ empty()

bool ripple::STObject::empty ( ) const

Definition at line 884 of file STObject.h.

◆ reserve()

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

Definition at line 890 of file STObject.h.

◆ applyTemplate()

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

Definition at line 132 of file STObject.cpp.

◆ applyTemplateFromSField()

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

Definition at line 186 of file STObject.cpp.

◆ isFree()

bool ripple::STObject::isFree ( ) const

Definition at line 896 of file STObject.h.

◆ set() [1/4]

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

Definition at line 116 of file STObject.cpp.

◆ set() [2/4]

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

Definition at line 196 of file STObject.cpp.

◆ getSType()

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

Reimplemented from ripple::STBase.

Reimplemented in ripple::STTx.

Definition at line 89 of file STObject.cpp.

◆ isEquivalent()

bool ripple::STObject::isEquivalent ( const STBase t) const
overridevirtual

Reimplemented from ripple::STBase.

Definition at line 320 of file STObject.cpp.

◆ isDefault()

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

Reimplemented from ripple::STBase.

Definition at line 95 of file STObject.cpp.

◆ add() [1/2]

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

Reimplemented from ripple::STBase.

Definition at line 101 of file STObject.cpp.

◆ getFullText()

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

Reimplemented from ripple::STBase.

Reimplemented in ripple::STTx.

Definition at line 270 of file STObject.cpp.

◆ getText()

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

Reimplemented from ripple::STBase.

Definition at line 301 of file STObject.cpp.

◆ getJson()

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

Reimplemented from ripple::STBase.

Reimplemented in ripple::STTx.

Definition at line 766 of file STObject.cpp.

◆ addWithoutSigningFields()

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

Definition at line 902 of file STObject.h.

◆ getSerializer()

Serializer ripple::STObject::getSerializer ( ) const

Definition at line 911 of file STObject.h.

◆ emplace_back()

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

Definition at line 920 of file STObject.h.

◆ getCount()

int ripple::STObject::getCount ( ) const

Definition at line 927 of file STObject.h.

◆ setFlag()

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

Definition at line 467 of file STObject.cpp.

◆ clearFlag()

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

Definition at line 479 of file STObject.cpp.

◆ isFlag()

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

Definition at line 491 of file STObject.cpp.

◆ getFlags()

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

Definition at line 497 of file STObject.cpp.

◆ getHash()

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

Definition at line 355 of file STObject.cpp.

◆ getSigningHash()

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

Definition at line 364 of file STObject.cpp.

◆ peekAtIndex()

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

Definition at line 933 of file STObject.h.

◆ getIndex()

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

Definition at line 939 of file STObject.h.

◆ peekAtPIndex()

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

Definition at line 945 of file STObject.h.

◆ getPIndex()

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

Definition at line 951 of file STObject.h.

◆ getFieldIndex()

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

Definition at line 373 of file STObject.cpp.

◆ getFieldSType()

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

Definition at line 411 of file STObject.cpp.

◆ peekAtField()

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

Definition at line 389 of file STObject.cpp.

◆ getField()

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

Definition at line 400 of file STObject.cpp.

◆ peekAtPField()

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

Definition at line 417 of file STObject.cpp.

◆ getPField()

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

Definition at line 428 of file STObject.cpp.

◆ getFieldU8()

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

Definition at line 563 of file STObject.cpp.

◆ getFieldU16()

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

Definition at line 569 of file STObject.cpp.

◆ getFieldU32()

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

Definition at line 575 of file STObject.cpp.

◆ getFieldU64()

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

Definition at line 581 of file STObject.cpp.

◆ getFieldH128()

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

Definition at line 587 of file STObject.cpp.

◆ getFieldH160()

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

Definition at line 593 of file STObject.cpp.

◆ getFieldH256()

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

Definition at line 599 of file STObject.cpp.

◆ getAccountID()

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

Definition at line 605 of file STObject.cpp.

◆ getFieldVL()

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

Definition at line 611 of file STObject.cpp.

◆ getFieldAmount()

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

Definition at line 619 of file STObject.cpp.

◆ getFieldPathSet()

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

Definition at line 626 of file STObject.cpp.

◆ getFieldV256()

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

Definition at line 633 of file STObject.cpp.

◆ getFieldArray()

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

Definition at line 640 of file STObject.cpp.

◆ getFieldCurrency()

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

Definition at line 647 of file STObject.cpp.

◆ operator[]() [1/6]

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

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 958 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

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

◆ operator[]() [3/6]

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

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)

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() [1/6]

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

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 986 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

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

◆ at() [3/6]

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

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)

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.

◆ set() [3/4]

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

Set a field.

if the field already exists, it is replaced.

Definition at line 654 of file STObject.cpp.

◆ set() [4/4]

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

Definition at line 660 of file STObject.cpp.

◆ setFieldU8()

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

Definition at line 676 of file STObject.cpp.

◆ setFieldU16()

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

Definition at line 682 of file STObject.cpp.

◆ setFieldU32()

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

Definition at line 688 of file STObject.cpp.

◆ setFieldU64()

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

Definition at line 694 of file STObject.cpp.

◆ setFieldH128()

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

Definition at line 700 of file STObject.cpp.

◆ setFieldH256()

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

Definition at line 706 of file STObject.cpp.

◆ setFieldVL() [1/2]

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

Definition at line 724 of file STObject.cpp.

◆ setFieldVL() [2/2]

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

Definition at line 730 of file STObject.cpp.

◆ setAccountID()

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

Definition at line 718 of file STObject.cpp.

◆ setFieldAmount()

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

Definition at line 736 of file STObject.cpp.

◆ setFieldIssue()

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

Definition at line 748 of file STObject.cpp.

◆ setFieldCurrency()

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

Definition at line 742 of file STObject.cpp.

◆ setFieldPathSet()

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

Definition at line 754 of file STObject.cpp.

◆ setFieldV256()

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

Definition at line 712 of file STObject.cpp.

◆ setFieldArray()

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

Definition at line 760 of file STObject.cpp.

◆ setFieldH160()

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

Definition at line 1047 of file STObject.h.

◆ peekFieldObject()

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

Definition at line 455 of file STObject.cpp.

◆ peekFieldArray()

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

Definition at line 461 of file STObject.cpp.

◆ isFieldPresent()

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

Definition at line 444 of file STObject.cpp.

◆ makeFieldPresent()

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

Definition at line 508 of file STObject.cpp.

◆ makeFieldAbsent()

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

Definition at line 530 of file STObject.cpp.

◆ delField() [1/2]

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

Definition at line 545 of file STObject.cpp.

◆ delField() [2/2]

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

Definition at line 557 of file STObject.cpp.

◆ hasMatchingEntry()

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

Definition at line 259 of file STObject.cpp.

◆ operator==() [1/2]

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

Definition at line 779 of file STObject.cpp.

◆ operator!=() [1/2]

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

Definition at line 1065 of file STObject.h.

◆ add() [2/2]

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

Definition at line 822 of file STObject.cpp.

◆ getSortedFields()

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

Definition at line 847 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
private

◆ getFieldByConstRef()

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

Definition at line 1099 of file STObject.h.

◆ setFieldUsingSetValue()

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

Definition at line 1122 of file STObject.h.

◆ setFieldUsingAssignment()

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

Definition at line 1145 of file STObject.h.

◆ peekField()

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

Definition at line 1166 of file STObject.h.

◆ copy()

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

Reimplemented from ripple::STBase.

Reimplemented in ripple::STTx, and ripple::STValidation.

Definition at line 77 of file STObject.cpp.

◆ move()

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

Reimplemented from ripple::STBase.

Reimplemented in ripple::STTx, and ripple::STValidation.

Definition at line 83 of file STObject.cpp.

◆ operator[]() [5/6]

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

Definition at line 972 of file STObject.h.

◆ operator[]() [6/6]

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

Definition at line 979 of file STObject.h.

◆ at() [5/6]

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

Definition at line 1033 of file STObject.h.

◆ at() [6/6]

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

Definition at line 1040 of file STObject.h.

◆ getFieldByValue() [2/2]

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

Definition at line 1072 of file STObject.h.

◆ operator==() [2/2]

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

Definition at line 45 of file STBase.cpp.

◆ operator!=() [2/2]

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

Definition at line 51 of file STBase.cpp.

◆ downcast() [1/2]

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

Definition at line 200 of file STBase.h.

◆ downcast() [2/2]

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

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

◆ getFName()

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

Definition at line 132 of file STBase.cpp.

◆ addFieldID()

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

Definition at line 138 of file STBase.cpp.

◆ emplace()

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

Definition at line 220 of file STBase.h.

◆ getCounter()

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

Definition at line 128 of file CountedObject.h.

Friends And Related Function Documentation

◆ detail::STVar

friend class detail::STVar
friend

Definition at line 472 of file STObject.h.

Member Data Documentation

◆ v_

list_type ripple::STObject::v_
private

Definition at line 78 of file STObject.h.

◆ mType

SOTemplate const* ripple::STObject::mType
private

Definition at line 79 of file STObject.h.

◆ fName

SField const* ripple::STBase::fName
privateinherited

Definition at line 123 of file STBase.h.