3#include <xrpl/basics/CountedObject.h>
4#include <xrpl/beast/utility/instrumentation.h>
5#include <xrpl/json/json_value.h>
6#include <xrpl/protocol/SField.h>
7#include <xrpl/protocol/STBase.h>
8#include <xrpl/protocol/Serializer.h>
16template <
typename Integer>
56 operator Integer() const;
60 copy(
std::
size_t n,
void* buf) const override;
74template <typename Integer>
79template <
typename Integer>
84template <
typename Integer>
91template <
typename Integer>
95 return emplace(n, buf, std::move(*
this));
98template <
typename Integer>
102 XRPL_ASSERT(
getFName().isBinary(),
"xrpl::STInteger::add : field is binary");
103 XRPL_ASSERT(
getFName().fieldType ==
getSType(),
"xrpl::STInteger::add : field type match");
107template <
typename Integer>
114template <
typename Integer>
118 auto const* v =
dynamic_cast<STInteger const*
>(&t);
119 return v && (
value_ == v->value_);
122template <
typename Integer>
130template <
typename Integer>
137template <
typename Integer>
144template <
typename Integer>
146operator Integer()
const
A type which can be exported to a well known binary format.
SField const & getFName() const
static STBase * emplace(std::size_t n, void *buf, T &&val)
value_type value() const noexcept
SerializedTypeID getSType() const override
void add(Serializer &s) const override
STBase * move(std::size_t n, void *buf) override
STInteger(SField const &n, Integer v=0)
STInteger(SerialIter &sit, SField const &name)
STInteger & operator=(value_type const &v)
STBase * copy(std::size_t n, void *buf) const override
friend class xrpl::detail::STVar
void setValue(unsigned char v)
json::Value getJson(JsonOptions) const override
bool isEquivalent(STBase const &t) const override
std::string getText() const override
bool isDefault() const override
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
STInteger< std::uint64_t > STUInt64
STInteger< std::uint16_t > STUInt16
STInteger< std::int32_t > STInt32
STInteger< unsigned char > STUInt8
STInteger< std::uint32_t > STUInt32
Note, should be treated as flags that can be | and &.