aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/yson_pull/bridge.h
diff options
context:
space:
mode:
authormonster <monster@ydb.tech>2022-07-07 14:41:37 +0300
committermonster <monster@ydb.tech>2022-07-07 14:41:37 +0300
commit06e5c21a835c0e923506c4ff27929f34e00761c2 (patch)
tree75efcbc6854ef9bd476eb8bf00cc5c900da436a2 /library/cpp/yson_pull/bridge.h
parent03f024c4412e3aa613bb543cf1660176320ba8f4 (diff)
downloadydb-06e5c21a835c0e923506c4ff27929f34e00761c2.tar.gz
fix ya.make
Diffstat (limited to 'library/cpp/yson_pull/bridge.h')
-rw-r--r--library/cpp/yson_pull/bridge.h34
1 files changed, 0 insertions, 34 deletions
diff --git a/library/cpp/yson_pull/bridge.h b/library/cpp/yson_pull/bridge.h
deleted file mode 100644
index ac767dcba0..0000000000
--- a/library/cpp/yson_pull/bridge.h
+++ /dev/null
@@ -1,34 +0,0 @@
-#pragma once
-
-#include "consumer.h"
-#include "event.h"
-#include "writer.h"
-
-namespace NYsonPull {
- //! \brief Connect YSON stream producer and consumer.
- //!
- //! Useful for writing YSON stream filters.
- //! \p Producer must have a \p next_event() method (like \p NYsonPull::reader).
- //! \p Consumer must be like \p NYsonPull::consumer interface.
- template <typename Producer, typename Consumer>
- inline void Bridge(Producer&& producer, Consumer&& consumer) {
- for (;;) {
- auto& event = producer.NextEvent();
- consumer.OnEvent(event);
- if (event.Type() == EEventType::EndStream) {
- break;
- }
- }
- }
-
- template <typename Producer>
- inline void Bridge(Producer&& producer, TWriter& writer_) {
- Bridge(std::forward<Producer>(producer), writer_.GetConsumer());
- }
-
- template <typename Producer>
- inline void Bridge(Producer&& producer, TWriter&& writer_) {
- Bridge(std::forward<Producer>(producer), writer_.GetConsumer());
- }
-
-}