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

#include <STCurrency.h>

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

Public Types

using value_type = Currency
 

Public Member Functions

 STCurrency ()=default
 
 STCurrency (SerialIter &sit, SField const &name)
 
 STCurrency (SField const &name, Currency const &currency)
 
 STCurrency (SField const &name)
 
Currency const & currency () const
 
Currency const & value () const noexcept
 
void setCurrency (Currency const &currency)
 
SerializedTypeID getSType () const override
 
std::string getText () const override
 
Json::Value getJson (JsonOptions) const override
 
void add (Serializer &s) const override
 
bool isEquivalent (STBase const &t) const override
 
bool isDefault () const override
 
bool operator== (STBase const &t) const
 
bool operator!= (STBase const &t) const
 
template<class D >
D & downcast ()
 
template<class D >
D const & downcast () const
 
template<class D >
D const & downcast () const
 
virtual std::string getFullText () const
 
void setFName (SField const &n)
 A STBase is a field.
 
SField const & getFName () const
 
void addFieldID (Serializer &s) const
 

Static Protected Member Functions

template<class T >
static STBaseemplace (std::size_t n, void *buf, T &&val)
 

Private Member Functions

STBasecopy (std::size_t n, void *buf) const override
 
STBasemove (std::size_t n, void *buf) override
 

Static Private Member Functions

static std::unique_ptr< STCurrencyconstruct (SerialIter &, SField const &name)
 

Private Attributes

Currency currency_ {}
 
SField const * fName
 

Friends

class detail::STVar
 

Detailed Description

Definition at line 31 of file STCurrency.h.

Member Typedef Documentation

◆ value_type

Definition at line 37 of file STCurrency.h.

Constructor & Destructor Documentation

◆ STCurrency() [1/4]

ripple::STCurrency::STCurrency ( )
default

◆ STCurrency() [2/4]

ripple::STCurrency::STCurrency ( SerialIter sit,
SField const &  name 
)
explicit

Definition at line 40 of file STCurrency.cpp.

◆ STCurrency() [3/4]

ripple::STCurrency::STCurrency ( SField const &  name,
Currency const &  currency 
)
explicit

Definition at line 45 of file STCurrency.cpp.

◆ STCurrency() [4/4]

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

Definition at line 36 of file STCurrency.cpp.

Member Function Documentation

◆ currency()

Currency const & ripple::STCurrency::currency ( ) const

Definition at line 89 of file STCurrency.h.

◆ value()

Currency const & ripple::STCurrency::value ( ) const
noexcept

Definition at line 95 of file STCurrency.h.

◆ setCurrency()

void ripple::STCurrency::setCurrency ( Currency const &  currency)

Definition at line 101 of file STCurrency.h.

◆ getSType()

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

Reimplemented from ripple::STBase.

Definition at line 51 of file STCurrency.cpp.

◆ getText()

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

Reimplemented from ripple::STBase.

Definition at line 57 of file STCurrency.cpp.

◆ getJson()

Json::Value ripple::STCurrency::getJson ( JsonOptions  ) const
overridevirtual

Reimplemented from ripple::STBase.

Definition at line 63 of file STCurrency.cpp.

◆ add()

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

Reimplemented from ripple::STBase.

Definition at line 69 of file STCurrency.cpp.

◆ isEquivalent()

bool ripple::STCurrency::isEquivalent ( STBase const &  t) const
overridevirtual

Reimplemented from ripple::STBase.

Definition at line 75 of file STCurrency.cpp.

◆ isDefault()

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

Reimplemented from ripple::STBase.

Definition at line 82 of file STCurrency.cpp.

◆ construct()

std::unique_ptr< STCurrency > ripple::STCurrency::construct ( SerialIter sit,
SField const &  name 
)
staticprivate

Definition at line 88 of file STCurrency.cpp.

◆ copy()

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

Reimplemented from ripple::STBase.

Definition at line 94 of file STCurrency.cpp.

◆ move()

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

Reimplemented from ripple::STBase.

Definition at line 100 of file STCurrency.cpp.

◆ operator==()

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

Definition at line 51 of file STBase.cpp.

◆ operator!=()

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

Definition at line 57 of file STBase.cpp.

◆ 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.

◆ getFullText()

std::string ripple::STBase::getFullText ( ) const
virtualinherited

Reimplemented in ripple::STAmount, ripple::STArray, ripple::STLedgerEntry, ripple::STObject, and ripple::STTx.

Definition at line 81 of file STBase.cpp.

◆ 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.

Friends And Related Symbol Documentation

◆ detail::STVar

friend class detail::STVar
friend

Definition at line 82 of file STCurrency.h.

Member Data Documentation

◆ currency_

Currency ripple::STCurrency::currency_ {}
private

Definition at line 34 of file STCurrency.h.

◆ fName

SField const* ripple::STBase::fName
privateinherited

Definition at line 136 of file STBase.h.