diff options
author | Vasily Gerasimov <UgnineSirdis@gmail.com> | 2022-02-10 16:49:10 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:10 +0300 |
commit | 1eb755fbca92172a6aec2f57371b2b3a19dfab43 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/protobuf/json/json_output.h | |
parent | 6cdc8f140213c595e4ad38bc3d97fcef1146b8c3 (diff) | |
download | ydb-1eb755fbca92172a6aec2f57371b2b3a19dfab43.tar.gz |
Restoring authorship annotation for Vasily Gerasimov <UgnineSirdis@gmail.com>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/protobuf/json/json_output.h')
-rw-r--r-- | library/cpp/protobuf/json/json_output.h | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/library/cpp/protobuf/json/json_output.h b/library/cpp/protobuf/json/json_output.h index 2fc7934171..df143af57a 100644 --- a/library/cpp/protobuf/json/json_output.h +++ b/library/cpp/protobuf/json/json_output.h @@ -1,9 +1,9 @@ -#pragma once - -#include <util/generic/ptr.h> -#include <util/generic/strbuf.h> - -namespace NProtobufJson { +#pragma once + +#include <util/generic/ptr.h> +#include <util/generic/strbuf.h> + +namespace NProtobufJson { class IJsonOutput { public: template <typename T> @@ -15,7 +15,7 @@ namespace NProtobufJson { DoWriteNull(); return *this; } - + IJsonOutput& BeginList() { DoBeginList(); return *this; @@ -24,7 +24,7 @@ namespace NProtobufJson { DoEndList(); return *this; } - + IJsonOutput& BeginObject() { DoBeginObject(); return *this; @@ -37,15 +37,15 @@ namespace NProtobufJson { DoEndObject(); return *this; } - + IJsonOutput& WriteRawJson(const TStringBuf& str) { DoWriteRawJson(str); return *this; } - + virtual ~IJsonOutput() { } - + protected: virtual void DoWrite(const TStringBuf& s) = 0; virtual void DoWrite(const TString& s) = 0; @@ -63,17 +63,17 @@ namespace NProtobufJson { virtual void DoWrite(double f) = 0; virtual void DoWrite(bool b) = 0; virtual void DoWriteNull() = 0; - + virtual void DoBeginList() = 0; virtual void DoEndList() = 0; - + virtual void DoBeginObject() = 0; virtual void DoWriteKey(const TStringBuf& key) = 0; virtual void DoEndObject() = 0; - + virtual void DoWriteRawJson(const TStringBuf& str) = 0; }; - + using TJsonMapOutputPtr = THolder<IJsonOutput>; - + } |