rippled
Public Member Functions | Static Protected Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
ripple::STBase Class Reference

A type which can be exported to a well known binary format. More...

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

Public Member Functions

virtual ~STBase ()=default
 
 STBase ()
 
 STBase (const STBase &)=default
 
STBaseoperator= (const STBase &t)
 
 STBase (SField const &n)
 
bool operator== (const STBase &t) const
 
bool operator!= (const STBase &t) const
 
template<class D >
D & downcast ()
 
template<class D >
D const & downcast () const
 
virtual SerializedTypeID getSType () const
 
virtual std::string getFullText () const
 
virtual std::string getText () const
 
virtual Json::Value getJson (JsonOptions) const
 
virtual void add (Serializer &s) const
 
virtual bool isEquivalent (STBase const &t) const
 
virtual bool isDefault () const
 
void setFName (SField const &n)
 A STBase is a field. More...
 
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

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

Private Attributes

SField const * fName
 

Friends

class detail::STVar
 

Detailed Description

A type which can be exported to a well known binary format.

A STBase:

Like JSON, a SerializedObject is a basket which has rules on what it can hold.

Note
"ST" stands for "Serialized Type."

Definition at line 66 of file STBase.h.

Constructor & Destructor Documentation

◆ ~STBase()

virtual ripple::STBase::~STBase ( )
virtualdefault

◆ STBase() [1/3]

ripple::STBase::STBase ( )

Definition at line 27 of file STBase.cpp.

◆ STBase() [2/3]

ripple::STBase::STBase ( const STBase )
default

◆ STBase() [3/3]

ripple::STBase::STBase ( SField const &  n)
explicit

Definition at line 31 of file STBase.cpp.

Member Function Documentation

◆ operator=()

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

Definition at line 37 of file STBase.cpp.

◆ operator==()

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

Definition at line 45 of file STBase.cpp.

◆ operator!=()

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

Definition at line 51 of file STBase.cpp.

◆ downcast() [1/2]

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

Definition at line 145 of file STBase.h.

◆ downcast() [2/2]

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

Definition at line 155 of file STBase.h.

◆ getSType()

SerializedTypeID ripple::STBase::getSType ( ) const
virtual

◆ getFullText()

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

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

Definition at line 75 of file STBase.cpp.

◆ getText()

std::string ripple::STBase::getText ( ) const
virtual

◆ getJson()

Json::Value ripple::STBase::getJson ( JsonOptions  ) const
virtual

◆ add()

void ripple::STBase::add ( Serializer s) const
virtual

◆ isEquivalent()

bool ripple::STBase::isEquivalent ( STBase const &  t) const
virtual

◆ isDefault()

bool ripple::STBase::isDefault ( ) const
virtual

◆ setFName()

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

A STBase is a field.

This sets the name.

Definition at line 125 of file STBase.cpp.

◆ getFName()

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

Definition at line 132 of file STBase.cpp.

◆ addFieldID()

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

Definition at line 138 of file STBase.cpp.

◆ emplace()

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

Definition at line 165 of file STBase.h.

◆ copy()

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

◆ move()

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

Friends And Related Function Documentation

◆ detail::STVar

friend class detail::STVar
friend

Definition at line 135 of file STBase.h.

Member Data Documentation

◆ fName

SField const* ripple::STBase::fName
private

Definition at line 68 of file STBase.h.