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)
97 :
STVar(STI_NOTPRESENT, name)
104 Throw<std::runtime_error>(
"Maximum nesting depth of STVar exceeded");
111 (
id == STI_NOTPRESENT) || (
id == name.fieldType),
112 "ripple::detail::STVar::STVar(SerializedTypeID) : valid type input");
127template <
typename... Args>
132 auto constructWithDepth = [&]<
typename T>() {
147 constexpr bool alwaysFalse =
149 static_assert(alwaysFalse,
"Invalid STVar constructor arguments");
155 case STI_NOTPRESENT: {
159 construct<STBase>(field);
208 constructWithDepth.template operator()<
STObject>();
211 constructWithDepth.template operator()<
STArray>();
216 case STI_XCHAIN_BRIDGE:
223 Throw<std::runtime_error>(
"Unknown object type");
virtual STBase * move(std::size_t n, void *buf)
virtual ~STBase()=default
virtual STBase * copy(std::size_t n, void *buf) const
STVar & operator=(STVar const &rhs)
std::aligned_storage< max_size >::type d_
void constructST(SerializedTypeID id, int depth, Args &&... arg)
Construct requested Serializable Type according to id.
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.