aboutsummaryrefslogtreecommitdiffstats
path: root/util/stream/tokenizer.h
diff options
context:
space:
mode:
authorAlexander Fokin <apfokin@gmail.com>2022-02-10 16:45:38 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:38 +0300
commitbf9e69a933f89af083d895185f01ed65e4d90766 (patch)
treeb2cc84ee7850122e7ccf51d0ea21e4fa7e7a5685 /util/stream/tokenizer.h
parent863a59a65247c24db7cb06789bc5cf79d04da32f (diff)
downloadydb-bf9e69a933f89af083d895185f01ed65e4d90766.tar.gz
Restoring authorship annotation for Alexander Fokin <apfokin@gmail.com>. Commit 2 of 2.
Diffstat (limited to 'util/stream/tokenizer.h')
-rw-r--r--util/stream/tokenizer.h38
1 files changed, 19 insertions, 19 deletions
diff --git a/util/stream/tokenizer.h b/util/stream/tokenizer.h
index fc0f62d84d..b2398efdd1 100644
--- a/util/stream/tokenizer.h
+++ b/util/stream/tokenizer.h
@@ -8,21 +8,21 @@
#include <util/system/compiler.h>
#include <util/system/yassert.h>
-/**
- * @addtogroup Streams
- * @{
+/**
+ * @addtogroup Streams
+ * @{
+ */
+
+/**
+ * Simple stream tokenizer. Splits the stream into tokens that are available
+ * via iterator interface.
+ *
+ * @tparam TEndOfToken Predicate for token delimiter characters.
+ * @see TEol
*/
-
-/**
- * Simple stream tokenizer. Splits the stream into tokens that are available
- * via iterator interface.
- *
- * @tparam TEndOfToken Predicate for token delimiter characters.
- * @see TEol
- */
template <typename TEndOfToken>
class TStreamTokenizer {
-public:
+public:
class TIterator {
public:
inline TIterator(TStreamTokenizer* const parent)
@@ -143,15 +143,15 @@ public:
Y_ASSERT(blen == Buf_.Capacity());
/*
- * do reallocate
- */
+ * do reallocate
+ */
Buf_.Reserve(Buf_.Capacity() * 4);
CheckBuf();
} else {
/*
- * do move
- */
+ * do move
+ */
MemMove(BufBegin(), Cur_, blen);
}
@@ -202,8 +202,8 @@ private:
TEndOfToken Eot_;
};
-/**
- * Predicate for `TStreamTokenizer` that uses '\\n' as a delimiter.
+/**
+ * Predicate for `TStreamTokenizer` that uses '\\n' as a delimiter.
*/
struct TEol {
inline bool operator()(char ch) const noexcept {
@@ -211,4 +211,4 @@ struct TEol {
}
};
-/** @} */
+/** @} */