1#include <xrpl/basics/contract.h>
2#include <xrpl/beast/utility/instrumentation.h>
3#include <xrpl/protocol/SField.h>
4#include <xrpl/protocol/STAccount.h>
5#include <xrpl/protocol/STAmount.h>
6#include <xrpl/protocol/STArray.h>
7#include <xrpl/protocol/STBase.h>
8#include <xrpl/protocol/STBitString.h>
9#include <xrpl/protocol/STBlob.h>
10#include <xrpl/protocol/STCurrency.h>
11#include <xrpl/protocol/STInteger.h>
12#include <xrpl/protocol/STIssue.h>
13#include <xrpl/protocol/STNumber.h>
14#include <xrpl/protocol/STObject.h>
15#include <xrpl/protocol/STPathSet.h>
16#include <xrpl/protocol/STVector256.h>
17#include <xrpl/protocol/STXChainBridge.h>
18#include <xrpl/protocol/Serializer.h>
19#include <xrpl/protocol/detail/STVar.h>
40 if (other.
p_ !=
nullptr)
103 Throw<std::runtime_error>(
"Maximum nesting depth of STVar exceeded");
110 (
id == STI_NOTPRESENT) || (
id == name.fieldType),
111 "xrpl::detail::STVar::STVar(SerializedTypeID) : valid type input");
126template <
typename... Args>
131 auto constructWithDepth = [&]<
typename T>() {
143 static_assert(alwaysFalse,
"Invalid STVar constructor arguments");
149 case STI_NOTPRESENT: {
152 construct<STBase>(field);
201 constructWithDepth.template operator()<
STObject>();
204 constructWithDepth.template operator()<
STArray>();
209 case STI_XCHAIN_BRIDGE:
216 Throw<std::runtime_error>(
"Unknown object type");
virtual STBase * copy(std::size_t n, void *buf) const
virtual STBase * move(std::size_t n, void *buf)
virtual ~STBase()=default
void constructST(SerializedTypeID id, int depth, Args &&... arg)
Construct requested Serializable Type according to id.
std::aligned_storage< max_size >::type d_
STVar & operator=(STVar const &rhs)
static std::size_t constexpr max_size
T forward_as_tuple(T... args)
nonPresentObject_t nonPresentObject
defaultObject_t defaultObject
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.