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:39 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:39 +0300
commita6a92afe03e02795227d2641b49819b687f088f8 (patch)
treef6984a1d27d5a7ec88a6fdd6e20cd5b7693b6ece /library/cpp/yson_pull/detail/output/stream.h
parentc6dc8b8bd530985bc4cce0137e9a5de32f1087cb (diff)
downloadydb-a6a92afe03e02795227d2641b49819b687f088f8.tar.gz
Restoring authorship annotation for Mikhail Borisov <borisov.mikhail@gmail.com>. Commit 1 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 d4810f3353..98ab7d9555 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
}