xrpld
Loading...
Searching...
No Matches
xrpl::STBlob Class Reference

#include <STBlob.h>

Inheritance diagram for xrpl::STBlob:
Collaboration diagram for xrpl::STBlob:

Public Types

using value_type = Slice

Public Member Functions

 STBlob ()=default
 STBlob (STBlob const &rhs)
 STBlob (SField const &f, void const *data, std::size_t size)
 STBlob (SField const &f, Buffer &&b)
 STBlob (SField const &n)
 STBlob (SerialIter &, SField const &name=sfGeneric)
std::size_t size () const
std::uint8_t const * data () const
SerializedTypeID getSType () const override
std::string getText () const override
void add (Serializer &s) const override
bool isEquivalent (STBase const &t) const override
bool isDefault () const override
STBloboperator= (Slice const &slice)
value_type value () const noexcept
STBloboperator= (Buffer &&buffer)
void setValue (Buffer &&b)
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
virtual json::Value getJson (JsonOptions=JsonOptions::Values::None) const
void setFName (SField const &n)
 A STBase is a field.
SField const & getFName () const
void addFieldID (Serializer &s) const

Public Attributes

friend Object

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 auto & getCounter () noexcept

Private Attributes

Buffer value_
SField const * fName_

Friends

class detail::STVar

Detailed Description

Definition at line 14 of file STBlob.h.

Member Typedef Documentation

◆ value_type

Definition at line 19 of file STBlob.h.

Constructor & Destructor Documentation

◆ STBlob() [1/6]

xrpl::STBlob::STBlob ( )
default

◆ STBlob() [2/6]

xrpl::STBlob::STBlob ( STBlob const & rhs)

Definition at line 71 of file STBlob.h.

◆ STBlob() [3/6]

xrpl::STBlob::STBlob ( SField const & f,
void const * data,
std::size_t size )

Definition at line 76 of file STBlob.h.

◆ STBlob() [4/6]

xrpl::STBlob::STBlob ( SField const & f,
Buffer && b )

Definition at line 81 of file STBlob.h.

◆ STBlob() [5/6]

xrpl::STBlob::STBlob ( SField const & n)

Definition at line 85 of file STBlob.h.

◆ STBlob() [6/6]

xrpl::STBlob::STBlob ( SerialIter & st,
SField const & name = sfGeneric )

Definition at line 15 of file STBlob.cpp.

Member Function Documentation

◆ size()

std::size_t xrpl::STBlob::size ( ) const
nodiscard

Definition at line 90 of file STBlob.h.

◆ data()

std::uint8_t const * xrpl::STBlob::data ( ) const
nodiscard

Definition at line 96 of file STBlob.h.

◆ getSType()

SerializedTypeID xrpl::STBlob::getSType ( ) const
nodiscardoverridevirtual

Reimplemented from xrpl::STBase.

Definition at line 32 of file STBlob.cpp.

◆ getText()

std::string xrpl::STBlob::getText ( ) const
nodiscardoverridevirtual

Reimplemented from xrpl::STBase.

Definition at line 38 of file STBlob.cpp.

◆ add()

void xrpl::STBlob::add ( Serializer & s) const
overridevirtual

Reimplemented from xrpl::STBase.

Definition at line 44 of file STBlob.cpp.

◆ isEquivalent()

bool xrpl::STBlob::isEquivalent ( STBase const & t) const
nodiscardoverridevirtual

Reimplemented from xrpl::STBase.

Definition at line 54 of file STBlob.cpp.

◆ isDefault()

bool xrpl::STBlob::isDefault ( ) const
nodiscardoverridevirtual

Reimplemented from xrpl::STBase.

Definition at line 61 of file STBlob.cpp.

◆ operator=() [1/2]

STBlob & xrpl::STBlob::operator= ( Slice const & slice)

Definition at line 102 of file STBlob.h.

◆ value()

STBlob::value_type xrpl::STBlob::value ( ) const
nodiscardnoexcept

Definition at line 109 of file STBlob.h.

◆ operator=() [2/2]

STBlob & xrpl::STBlob::operator= ( Buffer && buffer)

Definition at line 115 of file STBlob.h.

◆ setValue()

void xrpl::STBlob::setValue ( Buffer && b)

Definition at line 122 of file STBlob.h.

◆ copy()

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

Reimplemented from xrpl::STBase.

Definition at line 20 of file STBlob.cpp.

◆ move()

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

Reimplemented from xrpl::STBase.

Definition at line 26 of file STBlob.cpp.

◆ operator==()

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

Definition at line 36 of file STBase.cpp.

◆ operator!=()

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

Definition at line 42 of file STBase.cpp.

◆ downcast() [1/3]

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

Definition at line 195 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
nodiscardinherited

Definition at line 205 of file STBase.h.

◆ getFullText()

std::string xrpl::STBase::getFullText ( ) const
nodiscardvirtualinherited

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

Definition at line 66 of file STBase.cpp.

◆ getJson()

◆ setFName()

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

A STBase is a field.

This sets the name.

Definition at line 119 of file STBase.cpp.

◆ getFName()

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

Definition at line 126 of file STBase.cpp.

◆ addFieldID()

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

Definition at line 132 of file STBase.cpp.

◆ emplace()

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

Definition at line 215 of file STBase.h.

◆ getCounter()

auto & xrpl::CountedObject< STBlob >::getCounter ( )
staticprivatenoexceptinherited

Definition at line 109 of file CountedObject.h.

◆ detail::STVar

friend class detail::STVar
friend

Definition at line 68 of file STBlob.h.

Member Data Documentation

◆ value_

Buffer xrpl::STBlob::value_
private

Definition at line 16 of file STBlob.h.

◆ fName_

SField const* xrpl::STBase::fName_
privateinherited

Definition at line 118 of file STBase.h.

◆ Object

friend xrpl::CountedObject< STBlob >::STBlob
inherited

Definition at line 134 of file CountedObject.h.