aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/containers/comptrie/writeable_node.h
blob: a5878176e34a13fed3c29343a0cb58057707f364 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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;
    };
 
}