diff options
author | Devtools Arcadia <arcadia-devtools@yandex-team.ru> | 2022-02-07 18:08:42 +0300 |
---|---|---|
committer | Devtools Arcadia <arcadia-devtools@mous.vla.yp-c.yandex.net> | 2022-02-07 18:08:42 +0300 |
commit | 1110808a9d39d4b808aef724c861a2e1a38d2a69 (patch) | |
tree | e26c9fed0de5d9873cce7e00bc214573dc2195b7 /library/cpp/containers/comptrie/writeable_node.h | |
download | ydb-1110808a9d39d4b808aef724c861a2e1a38d2a69.tar.gz |
intermediate changes
ref:cde9a383711a11544ce7e107a78147fb96cc4029
Diffstat (limited to 'library/cpp/containers/comptrie/writeable_node.h')
-rw-r--r-- | library/cpp/containers/comptrie/writeable_node.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/library/cpp/containers/comptrie/writeable_node.h b/library/cpp/containers/comptrie/writeable_node.h new file mode 100644 index 0000000000..5454e579ef --- /dev/null +++ b/library/cpp/containers/comptrie/writeable_node.h @@ -0,0 +1,26 @@ +#pragma once + +#include <cstddef> + +namespace NCompactTrie { + class TNode; + + class TWriteableNode { + public: + const char* LeafPos; + size_t LeafLength; + + size_t ForwardOffset; + size_t LeftOffset; + size_t RightOffset; + char Label; + + TWriteableNode(); + TWriteableNode(const TNode& node, const char* data); + + // When you call this, the offsets should be relative to the end of the node. Use NPOS to indicate an absent offset. + size_t Pack(char* buffer) const; + size_t Measure() const; + }; + +} |