Platform.Data.Doublets C++
Loading...
Searching...
No Matches
InternalLinksTargetsRecursionlessSizeBalancedTreeMethods.h
Go to the documentation of this file.
2{
3 template <typename TLinksOptions>
6 InternalLinksTargetsRecursionlessSizeBalancedTreeMethods<TLinksOptions>, TLinksOptions>
7 {
8 public:
9 using LinksOptionsType = TLinksOptions;
10 using LinkAddressType = typename LinksOptionsType::LinkAddressType;
11 using LinkType = typename LinksOptionsType::LinkType;
12 using WriteHandlerType = typename LinksOptionsType::WriteHandlerType;
13 using ReadHandlerType = typename LinksOptionsType::ReadHandlerType;
14
15 public:
16 // Intentional CRTP customization of the base tree algorithm.
17 // cppcheck-suppress duplInheritedMember
18 static constexpr auto Constants = LinksOptionsType::Constants;
21
22 public:
23 InternalLinksTargetsRecursionlessSizeBalancedTreeMethods(std::byte* linksDataParts, std::byte* linksIndexParts,
24 std::byte* header)
25 : base(linksDataParts, linksIndexParts, header)
26 {
27 }
28
29 public:
31 {
32 return &(this->GetLinkIndexPartReference(node).LeftAsTarget);
33 }
34
35 public:
37 {
38 return &(this->GetLinkIndexPartReference(node).RightAsTarget);
39 }
40
41 public:
43 {
44 return this->GetLinkIndexPartReference(node).LeftAsTarget;
45 }
46
47 public:
49 {
50 return this->GetLinkIndexPartReference(node).RightAsTarget;
51 }
52
53 public:
55 {
56 this->GetLinkIndexPartReference(node).LeftAsTarget = left;
57 }
58
59 public:
61 {
62 this->GetLinkIndexPartReference(node).RightAsTarget = right;
63 }
64
65 public:
67 {
68 return this->GetLinkIndexPartReference(node).SizeAsTarget;
69 }
70
71 public:
73 {
74 this->GetLinkIndexPartReference(node).SizeAsTarget = size;
75 }
76
77 public:
78 // Intentional CRTP customization of the base tree algorithm.
79 // cppcheck-suppress duplInheritedMember
81 {
82 return this->GetLinkIndexPartReference(link).RootAsTarget;
83 }
84
85 public:
86 // Intentional CRTP customization of the base tree algorithm.
87 // cppcheck-suppress duplInheritedMember
89 {
90 return this->GetLinkDataPartReference(link).Target;
91 }
92
93 public:
94 // Intentional CRTP customization of the base tree algorithm.
95 // cppcheck-suppress duplInheritedMember
97 {
98 return this->GetLinkDataPartReference(link).Source;
99 }
100
101 public:
103 {
104 auto& link = this->GetLinkIndexPartReference(node);
105 link.LeftAsTarget = 0;
106 link.RightAsTarget = 0;
107 link.SizeAsTarget = 0;
108 }
109
110 public:
111 // Intentional CRTP customization of the base tree algorithm.
112 // cppcheck-suppress duplInheritedMember
114 {
115 return this->SearchCore(this->GetTreeRoot(target), source);
116 }
117 };
118} // namespace Platform::Data::Doublets::Memory::Split::Generic
LinkAddressType SearchCore(LinkAddressType root, LinkAddressType key)
Definition InternalLinksRecursionlessSizeBalancedTreeMethodsBase.h:100
RawLinkIndexPart< LinkAddressType > & GetLinkIndexPartReference(LinkAddressType link)
Definition InternalLinksRecursionlessSizeBalancedTreeMethodsBase.h:68
RawLinkDataPart< LinkAddressType > & GetLinkDataPartReference(LinkAddressType link)
Definition InternalLinksRecursionlessSizeBalancedTreeMethodsBase.h:61
Definition InternalLinksTargetsRecursionlessSizeBalancedTreeMethods.h:7
void SetSize(LinkAddressType node, LinkAddressType size)
Definition InternalLinksTargetsRecursionlessSizeBalancedTreeMethods.h:72
LinkAddressType GetLeft(LinkAddressType node)
Definition InternalLinksTargetsRecursionlessSizeBalancedTreeMethods.h:42
typename LinksOptionsType::WriteHandlerType WriteHandlerType
Definition InternalLinksTargetsRecursionlessSizeBalancedTreeMethods.h:12
static constexpr auto Constants
Definition InternalLinksTargetsRecursionlessSizeBalancedTreeMethods.h:18
void SetRight(LinkAddressType node, LinkAddressType right)
Definition InternalLinksTargetsRecursionlessSizeBalancedTreeMethods.h:60
LinkAddressType GetRight(LinkAddressType node)
Definition InternalLinksTargetsRecursionlessSizeBalancedTreeMethods.h:48
typename LinksOptionsType::ReadHandlerType ReadHandlerType
Definition InternalLinksTargetsRecursionlessSizeBalancedTreeMethods.h:13
typename LinksOptionsType::LinkAddressType LinkAddressType
Definition InternalLinksTargetsRecursionlessSizeBalancedTreeMethods.h:10
LinkAddressType GetTreeRoot(LinkAddressType link)
Definition InternalLinksTargetsRecursionlessSizeBalancedTreeMethods.h:80
LinkAddressType Search(LinkAddressType source, LinkAddressType target)
Definition InternalLinksTargetsRecursionlessSizeBalancedTreeMethods.h:113
LinkAddressType GetBasePartValue(LinkAddressType link)
Definition InternalLinksTargetsRecursionlessSizeBalancedTreeMethods.h:88
void SetLeft(LinkAddressType node, LinkAddressType left)
Definition InternalLinksTargetsRecursionlessSizeBalancedTreeMethods.h:54
LinkAddressType GetKeyPartValue(LinkAddressType link)
Definition InternalLinksTargetsRecursionlessSizeBalancedTreeMethods.h:96
LinkAddressType GetSize(LinkAddressType node)
Definition InternalLinksTargetsRecursionlessSizeBalancedTreeMethods.h:66
LinkAddressType * GetRightReference(LinkAddressType node)
Definition InternalLinksTargetsRecursionlessSizeBalancedTreeMethods.h:36
typename LinksOptionsType::LinkType LinkType
Definition InternalLinksTargetsRecursionlessSizeBalancedTreeMethods.h:11
void ClearNode(LinkAddressType node)
Definition InternalLinksTargetsRecursionlessSizeBalancedTreeMethods.h:102
TLinksOptions LinksOptionsType
Definition InternalLinksTargetsRecursionlessSizeBalancedTreeMethods.h:9
InternalLinksTargetsRecursionlessSizeBalancedTreeMethods(std::byte *linksDataParts, std::byte *linksIndexParts, std::byte *header)
Definition InternalLinksTargetsRecursionlessSizeBalancedTreeMethods.h:23
LinkAddressType * GetLeftReference(LinkAddressType node)
Definition InternalLinksTargetsRecursionlessSizeBalancedTreeMethods.h:30
Definition ExternalLinksRecursionlessSizeBalancedTreeMethodsBase.h:2