aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/yson_pull/detail/output/stream.h
diff options
context:
space:
mode:
authorMikhail Borisov <borisov.mikhail@gmail.com>2022-02-10 16:45:40 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:40 +0300
commit5d50718e66d9c037dc587a0211110b7d25a66185 (patch)
treee98df59de24d2ef7c77baed9f41e4875a2fef972 /library/cpp/yson_pull/detail/output/stream.h
parenta6a92afe03e02795227d2641b49819b687f088f8 (diff)
downloadydb-5d50718e66d9c037dc587a0211110b7d25a66185.tar.gz
Restoring authorship annotation for Mikhail Borisov <borisov.mikhail@gmail.com>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/yson_pull/detail/output/stream.h')
-rw-r--r--library/cpp/yson_pull/detail/output/stream.h92
1 files changed, 46 insertions, 46 deletions
diff --git a/library/cpp/yson_pull/detail/output/stream.h b/library/cpp/yson_pull/detail/output/stream.h
index 98ab7d9555..d4810f3353 100644
--- a/library/cpp/yson_pull/detail/output/stream.h
+++ b/library/cpp/yson_pull/detail/output/stream.h
@@ -1,56 +1,56 @@
-#pragma once
-
-#include "buffered.h"
-
+#pragma once
+
+#include "buffered.h"
+
#include <library/cpp/yson_pull/detail/macros.h>
#include <library/cpp/yson_pull/exceptions.h>
-
-#include <util/stream/output.h>
-#include <util/stream/file.h>
-#include <util/system/file.h>
-
-namespace NYsonPull {
- namespace NDetail {
- namespace NOutput {
- class TStream: public TBuffered<TStream> {
+
+#include <util/stream/output.h>
+#include <util/stream/file.h>
+#include <util/system/file.h>
+
+namespace NYsonPull {
+ namespace NDetail {
+ namespace NOutput {
+ class TStream: public TBuffered<TStream> {
IOutputStream* Output;
-
- public:
+
+ public:
TStream(IOutputStream* output, size_t buffer_size)
- : TBuffered<TStream>(buffer_size)
- , Output(output)
- {
- }
-
- void write(TStringBuf data) {
- Output->Write(data);
- }
- };
-
+ : TBuffered<TStream>(buffer_size)
+ , Output(output)
+ {
+ }
+
+ void write(TStringBuf data) {
+ Output->Write(data);
+ }
+ };
+
template <typename TOutput>
- class TOwned: public TBuffered<TOwned<TOutput>> {
- TOutput Output;
-
- public:
+ class TOwned: public TBuffered<TOwned<TOutput>> {
+ TOutput Output;
+
+ public:
template <typename... Args>
- TOwned(size_t buffer_size, Args&&... args)
- : TBuffered<TOwned>(buffer_size)
- , Output(std::forward<Args>(args)...)
- {
- }
-
- void write(TStringBuf data) {
- Output.Write(data);
- }
- };
-
+ TOwned(size_t buffer_size, Args&&... args)
+ : TBuffered<TOwned>(buffer_size)
+ , Output(std::forward<Args>(args)...)
+ {
+ }
+
+ void write(TStringBuf data) {
+ Output.Write(data);
+ }
+ };
+
class TFHandle: public TOwned<TUnbufferedFileOutput> {
- public:
- TFHandle(int fd, size_t buffer_size)
+ public:
+ TFHandle(int fd, size_t buffer_size)
: TOwned<TUnbufferedFileOutput>(buffer_size, Duplicate(fd))
- {
- }
- };
- }
+ {
+ }
+ };
+ }
} // namespace NDetail
}