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 /util/stream/multi.h | |
download | ydb-1110808a9d39d4b808aef724c861a2e1a38d2a69.tar.gz |
intermediate changes
ref:cde9a383711a11544ce7e107a78147fb96cc4029
Diffstat (limited to 'util/stream/multi.h')
-rw-r--r-- | util/stream/multi.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/util/stream/multi.h b/util/stream/multi.h new file mode 100644 index 0000000000..8bfd462d99 --- /dev/null +++ b/util/stream/multi.h @@ -0,0 +1,32 @@ +#pragma once + +#include "input.h" + +/** + * @addtogroup Streams_Multi + * @{ + */ + +/** + * A proxy input stream that concatenates two slave streams into one. + */ +class TMultiInput: public IInputStream { +public: + TMultiInput(IInputStream* f, IInputStream* s) noexcept; + ~TMultiInput() override; + +private: + size_t DoRead(void* buf, size_t len) override; + size_t DoSkip(size_t len) override; + size_t DoReadTo(TString& st, char ch) override; + +private: + IInputStream* C_; + IInputStream* N_; +}; + +/** + * See also "util/stream/tee.h" for multi output. + */ + +/** @} */ |