20#ifndef RIPPLE_PROTOCOL_STVAR_H_INCLUDED
21#define RIPPLE_PROTOCOL_STVAR_H_INCLUDED
23#include <xrpl/protocol/SField.h>
24#include <xrpl/protocol/STBase.h>
25#include <xrpl/protocol/Serializer.h>
49template <
typename... Args>
124 template <
class T,
class... Args>
136 template <
class T,
class... Args>
141 p_ =
new T(std::forward<Args>(args)...);
143 p_ =
new (&
d_) T(std::forward<Args>(args)...);
150 template <
typename... Args>
158 return static_cast<void const*
>(
p_) !=
static_cast<void const*
>(&
d_);
162template <
class T,
class... Args>
167 st.
construct<T>(std::forward<Args>(args)...);
180 return !(lhs == rhs);
A type which can be exported to a well known binary format.
virtual STBase * move(std::size_t n, void *buf)
virtual bool isEquivalent(STBase const &t) const
virtual STBase * copy(std::size_t n, void *buf) const
STVar & operator=(STVar const &rhs)
std::aligned_storage< max_size >::type d_
void construct(Args &&... args)
void constructST(SerializedTypeID id, int depth, Args &&... arg)
Construct requested Serializable Type according to id.
STBase const & operator*() const
static std::size_t constexpr max_size
STBase const * operator->() const
friend STVar make_stvar(Args &&... args)
STBase const & get() const
STVar make_stvar(Args &&... args)
bool operator==(STVar const &lhs, STVar const &rhs)
nonPresentObject_t nonPresentObject
bool operator!=(STVar const &lhs, STVar const &rhs)
defaultObject_t defaultObject
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
defaultObject_t()=default
nonPresentObject_t()=default