rippled
Loading...
Searching...
No Matches
SHAMapLeafNode.h
1#ifndef XRPL_SHAMAP_SHAMAPLEAFNODE_H_INCLUDED
2#define XRPL_SHAMAP_SHAMAPLEAFNODE_H_INCLUDED
3
4#include <xrpl/shamap/SHAMapItem.h>
5#include <xrpl/shamap/SHAMapTreeNode.h>
6
7#include <cstdint>
8
9namespace ripple {
10
12{
13protected:
14 boost::intrusive_ptr<SHAMapItem const> item_;
15
17 boost::intrusive_ptr<SHAMapItem const> item,
19
21 boost::intrusive_ptr<SHAMapItem const> item,
23 SHAMapHash const& hash);
24
25public:
28 operator=(SHAMapLeafNode const&) = delete;
29
30 bool
31 isLeaf() const final override
32 {
33 return true;
34 }
35
36 bool
37 isInner() const final override
38 {
39 return false;
40 }
41
42 void
43 invariants(bool is_root = false) const final override;
44
45public:
46 boost::intrusive_ptr<SHAMapItem const> const&
47 peekItem() const;
48
55 bool
56 setItem(boost::intrusive_ptr<SHAMapItem const> i);
57
58 std::string
59 getString(SHAMapNodeID const&) const final override;
60};
61
62} // namespace ripple
63
64#endif
SHAMapLeafNode & operator=(SHAMapLeafNode const &)=delete
std::string getString(SHAMapNodeID const &) const final override
bool isInner() const final override
Determines if this is an inner node.
boost::intrusive_ptr< SHAMapItem const > item_
bool isLeaf() const final override
Determines if this is a leaf node.
bool setItem(boost::intrusive_ptr< SHAMapItem const > i)
Set the item that this node points to and update the node's hash.
SHAMapLeafNode(SHAMapLeafNode const &)=delete
void invariants(bool is_root=false) const final override
boost::intrusive_ptr< SHAMapItem const > const & peekItem() const
Identifies a node inside a SHAMap.
std::uint32_t cowid() const
Returns the SHAMap that owns this node.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:6
STL namespace.