diff --git a/Change_8cpp_source.html b/Change_8cpp_source.html index 78d6894c0e..82522cc855 100644 --- a/Change_8cpp_source.html +++ b/Change_8cpp_source.html @@ -573,7 +573,7 @@ $(function() {
ripple::PreflightContext::j
const beast::Journal j
Definition: Transactor.h:38
ripple::Application::getOPs
virtual NetworkOPs & getOPs()=0
ripple::ApplyContext::app
Application & app
Definition: ApplyContext.h:47
-
ripple::STUInt256
STBitString< 256 > STUInt256
Definition: STBitString.h:80
+
ripple::STUInt256
STBitString< 256 > STUInt256
Definition: STBitString.h:86
ripple::ApplyView::dirRemove
bool dirRemove(Keylet const &directory, std::uint64_t page, uint256 const &key, bool keepRoot)
Remove an entry from a directory.
Definition: ApplyView.cpp:189
ripple::publicKeyType
std::optional< KeyType > publicKeyType(Slice const &slice)
Returns the type of public key.
Definition: PublicKey.cpp:206
ripple::sfLowNode
const SF_UINT64 sfLowNode
diff --git a/SField_8h_source.html b/SField_8h_source.html index 72c28950bb..5c103f2cfd 100644 --- a/SField_8h_source.html +++ b/SField_8h_source.html @@ -114,7 +114,7 @@ $(function() {
43 class STAccount;
44 class STAmount;
45 class STBlob;
-
46 template <std::size_t>
+
46 template <int>
47 class STBitString;
48 template <class>
49 class STInteger;
diff --git a/STBitString_8h_source.html b/STBitString_8h_source.html index f1e58c3897..b37afa6d88 100644 --- a/STBitString_8h_source.html +++ b/STBitString_8h_source.html @@ -96,195 +96,201 @@ $(function() {
25 
26 namespace ripple {
27 
-
28 template <std::size_t Bits>
-
29 class STBitString final : public STBase
-
30 {
-
31 public:
-
32  using value_type = base_uint<Bits>;
-
33 
-
34 private:
-
35  value_type value_;
+
28 // The template parameter could be an unsigned type, however there's a bug in
+
29 // gdb (last checked in gdb 12.1) that prevents gdb from finding the RTTI
+
30 // information of a template parameterized by an unsigned type. This RTTI
+
31 // information is needed to write gdb pretty printers.
+
32 template <int Bits>
+
33 class STBitString final : public STBase
+
34 {
+
35  static_assert(Bits > 0, "Number of bits must be positive");
36 
37 public:
-
38  STBitString() = default;
+
38  using value_type = base_uint<Bits>;
39 
-
40  STBitString(SField const& n);
-
41  STBitString(const value_type& v);
-
42  STBitString(SField const& n, const value_type& v);
-
43  STBitString(SerialIter& sit, SField const& name);
-
44 
-
45  SerializedTypeID
-
46  getSType() const override;
-
47 
-
48  std::string
-
49  getText() const override;
+
40 private:
+
41  value_type value_;
+
42 
+
43 public:
+
44  STBitString() = default;
+
45 
+
46  STBitString(SField const& n);
+
47  STBitString(const value_type& v);
+
48  STBitString(SField const& n, const value_type& v);
+
49  STBitString(SerialIter& sit, SField const& name);
50 
-
51  bool
-
52  isEquivalent(const STBase& t) const override;
+
51  SerializedTypeID
+
52  getSType() const override;
53 
-
54  void
-
55  add(Serializer& s) const override;
+
54  std::string
+
55  getText() const override;
56 
57  bool
-
58  isDefault() const override;
+
58  isEquivalent(const STBase& t) const override;
59 
-
60  template <typename Tag>
-
61  void
-
62  setValue(base_uint<Bits, Tag> const& v);
-
63 
-
64  value_type const&
-
65  value() const;
-
66 
-
67  operator value_type() const;
-
68 
-
69 private:
-
70  STBase*
-
71  copy(std::size_t n, void* buf) const override;
-
72  STBase*
-
73  move(std::size_t n, void* buf) override;
+
60  void
+
61  add(Serializer& s) const override;
+
62 
+
63  bool
+
64  isDefault() const override;
+
65 
+
66  template <typename Tag>
+
67  void
+
68  setValue(base_uint<Bits, Tag> const& v);
+
69 
+
70  value_type const&
+
71  value() const;
+
72 
+
73  operator value_type() const;
74 
-
75  friend class detail::STVar;
-
76 };
-
77 
-
78 using STUInt128 = STBitString<128>;
-
79 using STUInt160 = STBitString<160>;
-
80 using STUInt256 = STBitString<256>;
-
81 
-
82 template <std::size_t Bits>
-
83 inline STBitString<Bits>::STBitString(SField const& n) : STBase(n)
-
84 {
-
85 }
-
86 
-
87 template <std::size_t Bits>
-
88 inline STBitString<Bits>::STBitString(const value_type& v) : value_(v)
-
89 {
-
90 }
-
91 
-
92 template <std::size_t Bits>
-
93 inline STBitString<Bits>::STBitString(SField const& n, const value_type& v)
-
94  : STBase(n), value_(v)
+
75 private:
+
76  STBase*
+
77  copy(std::size_t n, void* buf) const override;
+
78  STBase*
+
79  move(std::size_t n, void* buf) override;
+
80 
+
81  friend class detail::STVar;
+
82 };
+
83 
+
84 using STUInt128 = STBitString<128>;
+
85 using STUInt160 = STBitString<160>;
+
86 using STUInt256 = STBitString<256>;
+
87 
+
88 template <int Bits>
+
89 inline STBitString<Bits>::STBitString(SField const& n) : STBase(n)
+
90 {
+
91 }
+
92 
+
93 template <int Bits>
+
94 inline STBitString<Bits>::STBitString(const value_type& v) : value_(v)
95 {
96 }
97 
-
98 template <std::size_t Bits>
-
99 inline STBitString<Bits>::STBitString(SerialIter& sit, SField const& name)
-
100  : STBitString(name, sit.getBitString<Bits>())
+
98 template <int Bits>
+
99 inline STBitString<Bits>::STBitString(SField const& n, const value_type& v)
+
100  : STBase(n), value_(v)
101 {
102 }
103 
-
104 template <std::size_t Bits>
-
105 STBase*
-
106 STBitString<Bits>::copy(std::size_t n, void* buf) const
-
107 {
-
108  return emplace(n, buf, *this);
-
109 }
-
110 
-
111 template <std::size_t Bits>
-
112 STBase*
-
113 STBitString<Bits>::move(std::size_t n, void* buf)
-
114 {
-
115  return emplace(n, buf, std::move(*this));
-
116 }
-
117 
-
118 template <>
-
119 inline SerializedTypeID
-
120 STUInt128::getSType() const
-
121 {
-
122  return STI_UINT128;
-
123 }
-
124 
-
125 template <>
-
126 inline SerializedTypeID
-
127 STUInt160::getSType() const
-
128 {
-
129  return STI_UINT160;
-
130 }
-
131 
-
132 template <>
-
133 inline SerializedTypeID
-
134 STUInt256::getSType() const
-
135 {
-
136  return STI_UINT256;
-
137 }
-
138 
-
139 template <std::size_t Bits>
-
140 std::string
-
141 STBitString<Bits>::getText() const
-
142 {
-
143  return to_string(value_);
-
144 }
-
145 
-
146 template <std::size_t Bits>
-
147 bool
-
148 STBitString<Bits>::isEquivalent(const STBase& t) const
-
149 {
-
150  const STBitString* v = dynamic_cast<const STBitString*>(&t);
-
151  return v && (value_ == v->value_);
-
152 }
-
153 
-
154 template <std::size_t Bits>
-
155 void
-
156 STBitString<Bits>::add(Serializer& s) const
-
157 {
-
158  assert(getFName().isBinary());
-
159  assert(getFName().fieldType == getSType());
-
160  s.addBitString<Bits>(value_);
-
161 }
-
162 
-
163 template <std::size_t Bits>
-
164 template <typename Tag>
-
165 void
-
166 STBitString<Bits>::setValue(base_uint<Bits, Tag> const& v)
-
167 {
-
168  value_ = v;
-
169 }
-
170 
-
171 template <std::size_t Bits>
-
172 typename STBitString<Bits>::value_type const&
-
173 STBitString<Bits>::value() const
-
174 {
-
175  return value_;
-
176 }
-
177 
-
178 template <std::size_t Bits>
-
179 STBitString<Bits>::operator value_type() const
+
104 template <int Bits>
+
105 inline STBitString<Bits>::STBitString(SerialIter& sit, SField const& name)
+
106  : STBitString(name, sit.getBitString<Bits>())
+
107 {
+
108 }
+
109 
+
110 template <int Bits>
+
111 STBase*
+
112 STBitString<Bits>::copy(std::size_t n, void* buf) const
+
113 {
+
114  return emplace(n, buf, *this);
+
115 }
+
116 
+
117 template <int Bits>
+
118 STBase*
+
119 STBitString<Bits>::move(std::size_t n, void* buf)
+
120 {
+
121  return emplace(n, buf, std::move(*this));
+
122 }
+
123 
+
124 template <>
+
125 inline SerializedTypeID
+
126 STUInt128::getSType() const
+
127 {
+
128  return STI_UINT128;
+
129 }
+
130 
+
131 template <>
+
132 inline SerializedTypeID
+
133 STUInt160::getSType() const
+
134 {
+
135  return STI_UINT160;
+
136 }
+
137 
+
138 template <>
+
139 inline SerializedTypeID
+
140 STUInt256::getSType() const
+
141 {
+
142  return STI_UINT256;
+
143 }
+
144 
+
145 template <int Bits>
+
146 std::string
+
147 STBitString<Bits>::getText() const
+
148 {
+
149  return to_string(value_);
+
150 }
+
151 
+
152 template <int Bits>
+
153 bool
+
154 STBitString<Bits>::isEquivalent(const STBase& t) const
+
155 {
+
156  const STBitString* v = dynamic_cast<const STBitString*>(&t);
+
157  return v && (value_ == v->value_);
+
158 }
+
159 
+
160 template <int Bits>
+
161 void
+
162 STBitString<Bits>::add(Serializer& s) const
+
163 {
+
164  assert(getFName().isBinary());
+
165  assert(getFName().fieldType == getSType());
+
166  s.addBitString<Bits>(value_);
+
167 }
+
168 
+
169 template <int Bits>
+
170 template <typename Tag>
+
171 void
+
172 STBitString<Bits>::setValue(base_uint<Bits, Tag> const& v)
+
173 {
+
174  value_ = v;
+
175 }
+
176 
+
177 template <int Bits>
+
178 typename STBitString<Bits>::value_type const&
+
179 STBitString<Bits>::value() const
180 {
181  return value_;
182 }
183 
-
184 template <std::size_t Bits>
-
185 bool
-
186 STBitString<Bits>::isDefault() const
-
187 {
-
188  return value_ == beast::zero;
-
189 }
-
190 
-
191 } // namespace ripple
-
192 
-
193 #endif
+
184 template <int Bits>
+
185 STBitString<Bits>::operator value_type() const
+
186 {
+
187  return value_;
+
188 }
+
189 
+
190 template <int Bits>
+
191 bool
+
192 STBitString<Bits>::isDefault() const
+
193 {
+
194  return value_ == beast::zero;
+
195 }
+
196 
+
197 } // namespace ripple
+
198 
+
199 #endif
std::string
STL class.
ripple::STI_UINT128
@ STI_UINT128
Definition: SField.h:61
-
ripple::STBitString::value
value_type const & value() const
Definition: STBitString.h:173
+
ripple::STBitString::value
value_type const & value() const
Definition: STBitString.h:179
ripple::SerializedTypeID
SerializedTypeID
Definition: SField.h:52
ripple::STI_UINT160
@ STI_UINT160
Definition: SField.h:72
-
ripple::STBitString::value_
value_type value_
Definition: STBitString.h:35
-
ripple::STBitString::setValue
void setValue(base_uint< Bits, Tag > const &v)
Definition: STBitString.h:166
-
ripple::STBitString::copy
STBase * copy(std::size_t n, void *buf) const override
Definition: STBitString.h:106
+
ripple::STBitString::value_
value_type value_
Definition: STBitString.h:41
+
ripple::STBitString::setValue
void setValue(base_uint< Bits, Tag > const &v)
Definition: STBitString.h:172
+
ripple::STBitString::copy
STBase * copy(std::size_t n, void *buf) const override
Definition: STBitString.h:112
ripple::STBitString
Definition: SField.h:47
-
ripple::STBitString::move
STBase * move(std::size_t n, void *buf) override
Definition: STBitString.h:113
-
ripple::STBitString::add
void add(Serializer &s) const override
Definition: STBitString.h:156
+
ripple::STBitString::move
STBase * move(std::size_t n, void *buf) override
Definition: STBitString.h:119
+
ripple::STBitString::add
void add(Serializer &s) const override
Definition: STBitString.h:162
ripple::base_uint< Bits >
-
ripple::STBitString::value_type
base_uint< Bits > value_type
Definition: STBitString.h:32
-
ripple::STBitString::isDefault
bool isDefault() const override
Definition: STBitString.h:186
-
ripple::STBitString::getSType
SerializedTypeID getSType() const override
Definition: STBitString.h:120
+
ripple::STBitString::value_type
base_uint< Bits > value_type
Definition: STBitString.h:38
+
ripple::STBitString::isDefault
bool isDefault() const override
Definition: STBitString.h:192
+
ripple::STBitString::getSType
SerializedTypeID getSType() const override
Definition: STBitString.h:126
ripple::STBitString::STBitString
STBitString()=default
ripple::SerialIter
Definition: Serializer.h:310
-
ripple::STBitString::isEquivalent
bool isEquivalent(const STBase &t) const override
Definition: STBitString.h:148
+
ripple::STBitString::isEquivalent
bool isEquivalent(const STBase &t) const override
Definition: STBitString.h:154
ripple::Serializer
Definition: Serializer.h:39
ripple
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition: RCLCensorshipDetector.h:29
ripple::Serializer::addBitString
int addBitString(base_uint< Bits, Tag > const &v)
Definition: Serializer.h:97
-
ripple::STBitString::getText
std::string getText() const override
Definition: STBitString.h:141
+
ripple::STBitString::getText
std::string getText() const override
Definition: STBitString.h:147
ripple::SField
Identifies fields.
Definition: SField.h:112
ripple::STBase
A type which can be exported to a well known binary format.
Definition: STBase.h:66
std::size_t
diff --git a/STObject_8h_source.html b/STObject_8h_source.html index 6af7076c1e..623b97b84f 100644 --- a/STObject_8h_source.html +++ b/STObject_8h_source.html @@ -1218,7 +1218,7 @@ $(function() {
ripple::STObject::setFieldVL
void setFieldVL(SField const &field, Blob const &)
Definition: STObject.cpp:695
ripple::STObject::getFieldVL
Blob getFieldVL(SField const &field) const
Definition: STObject.cpp:595
ripple::STObject::isDefault
bool isDefault() const override
Definition: STObject.cpp:79
-
ripple::STBitString::setValue
void setValue(base_uint< Bits, Tag > const &v)
Definition: STBitString.h:166
+
ripple::STBitString::setValue
void setValue(base_uint< Bits, Tag > const &v)
Definition: STBitString.h:172
ripple::STObject::OptionalProxy::operator==
friend bool operator==(std::nullopt_t, OptionalProxy const &rhs) noexcept
Definition: STObject.h:554
ripple::STObject::~STObject
virtual ~STObject()=default
ripple::STObject::getFieldH160
uint160 getFieldH160(SField const &field) const
Definition: STObject.cpp:577
diff --git a/classripple_1_1STBitString.html b/classripple_1_1STBitString.html index a552f8fb12..534cf93458 100644 --- a/classripple_1_1STBitString.html +++ b/classripple_1_1STBitString.html @@ -142,7 +142,7 @@ Friends  

Detailed Description

-

template<std::size_t Bits>
+

template<int Bits>
class ripple::STBitString< Bits >

@@ -154,7 +154,7 @@ class ripple::STBitString< Bits >

-template<std::size_t Bits>
+template<int Bits>
@@ -162,7 +162,7 @@ template<std::size_t Bits>
using ripple::STBitString< Bits >::value_type = base_uint<Bits>
-

Definition at line 32 of file STBitString.h.

+

Definition at line 38 of file STBitString.h.

@@ -173,7 +173,7 @@ template<std::size_t Bits>
-template<std::size_t Bits>
+template<int Bits>
@@ -200,7 +200,7 @@ template<std::size_t Bits>
-template<std::size_t Bits>
+template<int Bits>
@@ -212,7 +212,7 @@ template<std::size_t Bits>
ripple::STBitString< Bits >::STBitString
-

Definition at line 83 of file STBitString.h.

+

Definition at line 89 of file STBitString.h.

@@ -222,7 +222,7 @@ template<std::size_t Bits>
-template<std::size_t Bits>
+template<int Bits>
@@ -234,7 +234,7 @@ template<std::size_t Bits>
ripple::STBitString< Bits >::STBitString
-

Definition at line 88 of file STBitString.h.

+

Definition at line 94 of file STBitString.h.

@@ -244,7 +244,7 @@ template<std::size_t Bits>
-template<std::size_t Bits>
+template<int Bits>
@@ -266,7 +266,7 @@ template<std::size_t Bits>
ripple::STBitString< Bits >::STBitString
-

Definition at line 93 of file STBitString.h.

+

Definition at line 99 of file STBitString.h.

@@ -276,7 +276,7 @@ template<std::size_t Bits>
-template<std::size_t Bits>
+template<int Bits>
@@ -298,7 +298,7 @@ template<std::size_t Bits>
ripple::STBitString< Bits >::STBitString
-

Definition at line 99 of file STBitString.h.

+

Definition at line 105 of file STBitString.h.

@@ -323,7 +323,7 @@ template<std::size_t Bits>
-

Definition at line 120 of file STBitString.h.

+

Definition at line 126 of file STBitString.h.

@@ -333,7 +333,7 @@ template<std::size_t Bits>
-template<std::size_t Bits>
+template<int Bits>
@@ -349,7 +349,7 @@ template<std::size_t Bits>
-

Definition at line 141 of file STBitString.h.

+

Definition at line 147 of file STBitString.h.

@@ -359,7 +359,7 @@ template<std::size_t Bits>
-template<std::size_t Bits>
+template<int Bits>
@@ -379,7 +379,7 @@ template<std::size_t Bits>
-

Definition at line 148 of file STBitString.h.

+

Definition at line 154 of file STBitString.h.

@@ -389,7 +389,7 @@ template<std::size_t Bits>
-template<std::size_t Bits>
+template<int Bits>
@@ -409,7 +409,7 @@ template<std::size_t Bits>
-

Definition at line 156 of file STBitString.h.

+

Definition at line 162 of file STBitString.h.

@@ -419,7 +419,7 @@ template<std::size_t Bits>
-template<std::size_t Bits>
+template<int Bits>
@@ -435,7 +435,7 @@ template<std::size_t Bits>
-

Definition at line 186 of file STBitString.h.

+

Definition at line 192 of file STBitString.h.

@@ -445,7 +445,7 @@ template<std::size_t Bits>
-template<std::size_t Bits>
+template<int Bits>
template<typename Tag >
@@ -459,7 +459,7 @@ template<typename Tag >
-

Definition at line 166 of file STBitString.h.

+

Definition at line 172 of file STBitString.h.

@@ -469,7 +469,7 @@ template<typename Tag >
-template<std::size_t Bits>
+template<int Bits>
@@ -477,7 +477,7 @@ template<std::size_t Bits>
STBitString< Bits >::value_type const & ripple::STBitString< Bits >::value
-

Definition at line 173 of file STBitString.h.

+

Definition at line 179 of file STBitString.h.

@@ -487,7 +487,7 @@ template<std::size_t Bits>
-template<std::size_t Bits>
+template<int Bits>
@@ -495,7 +495,7 @@ template<std::size_t Bits>
ripple::STBitString< Bits >::operator value_type
-

Definition at line 179 of file STBitString.h.

+

Definition at line 185 of file STBitString.h.

@@ -505,7 +505,7 @@ template<std::size_t Bits>
-template<std::size_t Bits>
+template<int Bits>
@@ -535,7 +535,7 @@ template<std::size_t Bits>
-

Definition at line 106 of file STBitString.h.

+

Definition at line 112 of file STBitString.h.

@@ -545,7 +545,7 @@ template<std::size_t Bits>
-template<std::size_t Bits>
+template<int Bits>
@@ -575,7 +575,7 @@ template<std::size_t Bits>
-

Definition at line 113 of file STBitString.h.

+

Definition at line 119 of file STBitString.h.

@@ -586,7 +586,7 @@ template<std::size_t Bits>
-template<std::size_t Bits>
+template<int Bits>
@@ -602,7 +602,7 @@ template<std::size_t Bits>
-

Definition at line 75 of file STBitString.h.

+

Definition at line 81 of file STBitString.h.

@@ -613,7 +613,7 @@ template<std::size_t Bits>
-template<std::size_t Bits>
+template<int Bits>
@@ -629,7 +629,7 @@ template<std::size_t Bits>
-

Definition at line 35 of file STBitString.h.

+

Definition at line 41 of file STBitString.h.

diff --git a/namespaceripple.html b/namespaceripple.html index bf5462f017..3d9e2e5b03 100644 --- a/namespaceripple.html +++ b/namespaceripple.html @@ -6972,7 +6972,7 @@ template<class Value , class Hash = hardened_hash<strong_hash>, class
-

Definition at line 78 of file STBitString.h.

+

Definition at line 84 of file STBitString.h.

@@ -6988,7 +6988,7 @@ template<class Value , class Hash = hardened_hash<strong_hash>, class
-

Definition at line 79 of file STBitString.h.

+

Definition at line 85 of file STBitString.h.

@@ -7004,7 +7004,7 @@ template<class Value , class Hash = hardened_hash<strong_hash>, class
-

Definition at line 80 of file STBitString.h.

+

Definition at line 86 of file STBitString.h.