aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/containers/comptrie/opaque_trie_iterator.h
diff options
context:
space:
mode:
authorsereglond <sereglond@yandex-team.ru>2022-02-10 16:47:46 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:46 +0300
commiteb3d925534734c808602b31b38b953677f0a279f (patch)
tree4222ef8dc375ee9f30b68a004ee42a0845e005b6 /library/cpp/containers/comptrie/opaque_trie_iterator.h
parent4c8065245df3ea26b7757bcb1f8218df287f9148 (diff)
downloadydb-eb3d925534734c808602b31b38b953677f0a279f.tar.gz
Restoring authorship annotation for <sereglond@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/containers/comptrie/opaque_trie_iterator.h')
-rw-r--r--library/cpp/containers/comptrie/opaque_trie_iterator.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/library/cpp/containers/comptrie/opaque_trie_iterator.h b/library/cpp/containers/comptrie/opaque_trie_iterator.h
index 195da3c191..a5c3cc1358 100644
--- a/library/cpp/containers/comptrie/opaque_trie_iterator.h
+++ b/library/cpp/containers/comptrie/opaque_trie_iterator.h
@@ -20,13 +20,13 @@ namespace NCompactTrie {
public:
TFork(const char* data, size_t offset, size_t limit, const ILeafSkipper& skipper);
-
+
bool operator==(const TFork& rhs) const;
-
+
bool HasLabelInKey() const {
return CurrentDirection == D_NEXT || CurrentDirection == D_FINAL;
}
-
+
bool NextDirection();
bool PrevDirection();
void LastDirection();
@@ -39,7 +39,7 @@ namespace NCompactTrie {
// Otherwise returns true.
bool SetDirection(TDirection direction);
TFork NextFork(const ILeafSkipper& skipper) const;
-
+
char GetLabel() const;
size_t GetValueOffset() const;
};
@@ -59,7 +59,7 @@ namespace NCompactTrie {
}
Forks.push_back(fork);
}
-
+
void Pop() {
Forks.pop_back();
if (TopHasLabelInKey()) {
@@ -73,7 +73,7 @@ namespace NCompactTrie {
const TFork& Top() const {
return Forks.back();
}
-
+
bool Empty() const {
return Forks.empty();
}
@@ -160,24 +160,24 @@ namespace NCompactTrie {
template <class TSymbol>
bool UpperBound(const typename TCompactTrieKeySelector<TSymbol>::TKeyBuf& key); // True if matched exactly.
-
+
template <class TSymbol>
typename TCompactTrieKeySelector<TSymbol>::TKey GetKey() const {
return TConvertRawKey<TSymbol>::Get(GetNarrowKey());
}
-
+
template <class TSymbol>
size_t MeasureKey() const {
return TConvertRawKey<TSymbol>::Size(MeasureNarrowKey());
}
-
+
TString GetNarrowKey() const {
return Forks.GetKey();
}
size_t MeasureNarrowKey() const {
return Forks.MeasureKey();
}
-
+
const char* GetValuePtr() const; // 0 if none
const TNode& GetNode() const { // Could be called for non-empty key and not AtEnd.
return Forks.Top().Node;
@@ -199,7 +199,7 @@ namespace NCompactTrie {
template <class TSymbol>
int LongestPrefix(const typename TCompactTrieKeySelector<TSymbol>::TKeyBuf& key); // Used in UpperBound.
};
-
+
template <class TSymbol>
int TOpaqueTrieIterator::LongestPrefix(const typename TCompactTrieKeySelector<TSymbol>::TKeyBuf& key) {
Forks.Clear();