xrpld
Loading...
Searching...
No Matches
xrpl::detail::STVar Class Reference

#include <STVar.h>

Collaboration diagram for xrpl::detail::STVar:

Public Member Functions

 ~STVar ()
 STVar (STVar const &other)
 STVar (STVar &&other)
STVaroperator= (STVar const &rhs)
STVaroperator= (STVar &&rhs)
 STVar (STBase &&t)
 STVar (STBase const &t)
 STVar (DefaultObjectT, SField const &name)
 STVar (NonPresentObjectT, SField const &name)
 STVar (SerialIter &sit, SField const &name, int depth=0)
STBaseget ()
STBaseoperator* ()
STBaseoperator-> ()
STBase const & get () const
STBase const & operator* () const
STBase const * operator-> () const

Private Member Functions

 STVar ()=default
 STVar (SerializedTypeID id, SField const &name)
void destroy ()
template<class T, class... Args>
void construct (Args &&... args)
template<typename... Args>
void constructST (SerializedTypeID id, int depth, Args &&... arg)
 Construct requested Serializable Type according to id.
bool onHeap () const

Private Attributes

std::byte d_ [kMaxSize] = {}
STBasep_ = nullptr

Static Private Attributes

static constexpr std::size_t kMaxSize = 72

Friends

template<class T, class... Args>
STVar makeStvar (Args &&... args)

Detailed Description

Definition at line 34 of file STVar.h.

Constructor & Destructor Documentation

◆ ~STVar()

xrpl::detail::STVar::~STVar ( )

Definition at line 33 of file STVar.cpp.

◆ STVar() [1/9]

xrpl::detail::STVar::STVar ( STVar const & other)

Definition at line 38 of file STVar.cpp.

◆ STVar() [2/9]

xrpl::detail::STVar::STVar ( STVar && other)

Definition at line 44 of file STVar.cpp.

◆ STVar() [3/9]

xrpl::detail::STVar::STVar ( STBase && t)

Definition at line 52 of file STVar.h.

◆ STVar() [4/9]

xrpl::detail::STVar::STVar ( STBase const & t)

Definition at line 57 of file STVar.h.

◆ STVar() [5/9]

xrpl::detail::STVar::STVar ( DefaultObjectT ,
SField const & name )

Definition at line 96 of file STVar.cpp.

◆ STVar() [6/9]

xrpl::detail::STVar::STVar ( NonPresentObjectT ,
SField const & name )

Definition at line 100 of file STVar.cpp.

◆ STVar() [7/9]

xrpl::detail::STVar::STVar ( SerialIter & sit,
SField const & name,
int depth = 0 )

Definition at line 104 of file STVar.cpp.

◆ STVar() [8/9]

xrpl::detail::STVar::STVar ( )
privatedefault

◆ STVar() [9/9]

xrpl::detail::STVar::STVar ( SerializedTypeID id,
SField const & name )
private

Definition at line 111 of file STVar.cpp.

Member Function Documentation

◆ operator=() [1/2]

STVar & xrpl::detail::STVar::operator= ( STVar const & rhs)

Definition at line 58 of file STVar.cpp.

◆ operator=() [2/2]

STVar & xrpl::detail::STVar::operator= ( STVar && rhs)

Definition at line 77 of file STVar.cpp.

◆ get() [1/2]

STBase & xrpl::detail::STVar::get ( )

Definition at line 67 of file STVar.h.

◆ operator*() [1/2]

STBase & xrpl::detail::STVar::operator* ( )

Definition at line 72 of file STVar.h.

◆ operator->() [1/2]

STBase * xrpl::detail::STVar::operator-> ( )

Definition at line 77 of file STVar.h.

◆ get() [2/2]

STBase const & xrpl::detail::STVar::get ( ) const
nodiscard

Definition at line 82 of file STVar.h.

◆ operator*() [2/2]

STBase const & xrpl::detail::STVar::operator* ( ) const

Definition at line 87 of file STVar.h.

◆ operator->() [2/2]

STBase const * xrpl::detail::STVar::operator-> ( ) const

Definition at line 92 of file STVar.h.

◆ destroy()

void xrpl::detail::STVar::destroy ( )
private

Definition at line 120 of file STVar.cpp.

◆ construct()

template<class T, class... Args>
void xrpl::detail::STVar::construct ( Args &&... args)
private

Definition at line 111 of file STVar.h.

◆ constructST()

template<typename... Args>
void xrpl::detail::STVar::constructST ( SerializedTypeID id,
int depth,
Args &&... arg )
private

Construct requested Serializable Type according to id.

The variadic args are: (SField), or (SerialIter, SField). depth is ignored in former case.

Definition at line 137 of file STVar.cpp.

◆ onHeap()

bool xrpl::detail::STVar::onHeap ( ) const
nodiscardprivate

Definition at line 133 of file STVar.h.

◆ makeStvar

template<class T, class... Args>
STVar makeStvar ( Args &&... args)
friend

Definition at line 141 of file STVar.h.

Member Data Documentation

◆ kMaxSize

std::size_t xrpl::detail::STVar::kMaxSize = 72
staticconstexprprivate

Definition at line 38 of file STVar.h.

◆ d_

std::byte xrpl::detail::STVar::d_[kMaxSize] = {}
private

Definition at line 40 of file STVar.h.

◆ p_

STBase* xrpl::detail::STVar::p_ = nullptr
private

Definition at line 41 of file STVar.h.