20 #ifndef RIPPLE_PROTOCOL_STINTEGER_H_INCLUDED
21 #define RIPPLE_PROTOCOL_STINTEGER_H_INCLUDED
23 #include <ripple/basics/CountedObject.h>
24 #include <ripple/protocol/STBase.h>
28 template <
typename Integer>
29 class STInteger :
public STBase,
public CountedObject<STInteger<Integer>>
63 value() const noexcept;
68 operator Integer() const;
72 copy(
std::
size_t n,
void* buf) const override;
74 move(
std::
size_t n,
void* buf) override;
84 template <typename Integer>
89 template <
typename Integer>
95 template <
typename Integer>
99 return emplace(n, buf, *
this);
102 template <
typename Integer>
106 return emplace(n, buf, std::move(*
this));
109 template <
typename Integer>
113 assert(getFName().isBinary());
114 assert(getFName().fieldType == getSType());
118 template <
typename Integer>
125 template <
typename Integer>
130 return v && (value_ == v->value_);
133 template <
typename Integer>
141 template <
typename Integer>
148 template <
typename Integer>
155 template <
typename Integer>
void add(Serializer &s) const override
Json::Value getJson(JsonOptions) const override
bool isDefault() const override
value_type value() const noexcept
STBase * move(std::size_t n, void *buf) override
STInteger & operator=(value_type const &v)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Note, should be treated as flags that can be | and &.
STBase * copy(std::size_t n, void *buf) const override
A type which can be exported to a well known binary format.
std::string getText() const override
bool isEquivalent(const STBase &t) const override
SerializedTypeID getSType() const override