aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/protobuf/json/json_output.h
diff options
context:
space:
mode:
authorAnton Samokhvalov <pg83@yandex.ru>2022-02-10 16:45:15 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:15 +0300
commit72cb13b4aff9bc9cf22e49251bc8fd143f82538f (patch)
treeda2c34829458c7d4e74bdfbdf85dff449e9e7fb8 /library/cpp/protobuf/json/json_output.h
parent778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5 (diff)
downloadydb-72cb13b4aff9bc9cf22e49251bc8fd143f82538f.tar.gz
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/protobuf/json/json_output.h')
-rw-r--r--library/cpp/protobuf/json/json_output.h126
1 files changed, 63 insertions, 63 deletions
diff --git a/library/cpp/protobuf/json/json_output.h b/library/cpp/protobuf/json/json_output.h
index df143af57a..8007909fda 100644
--- a/library/cpp/protobuf/json/json_output.h
+++ b/library/cpp/protobuf/json/json_output.h
@@ -4,76 +4,76 @@
#include <util/generic/strbuf.h>
namespace NProtobufJson {
- class IJsonOutput {
- public:
- template <typename T>
- IJsonOutput& Write(const T& t) {
- DoWrite(t);
- return *this;
- }
- IJsonOutput& WriteNull() {
- DoWriteNull();
- return *this;
- }
+ class IJsonOutput {
+ public:
+ template <typename T>
+ IJsonOutput& Write(const T& t) {
+ DoWrite(t);
+ return *this;
+ }
+ IJsonOutput& WriteNull() {
+ DoWriteNull();
+ return *this;
+ }
- IJsonOutput& BeginList() {
- DoBeginList();
- return *this;
- }
- IJsonOutput& EndList() {
- DoEndList();
- return *this;
- }
+ IJsonOutput& BeginList() {
+ DoBeginList();
+ return *this;
+ }
+ IJsonOutput& EndList() {
+ DoEndList();
+ return *this;
+ }
- IJsonOutput& BeginObject() {
- DoBeginObject();
- return *this;
- }
- IJsonOutput& WriteKey(const TStringBuf& key) {
- DoWriteKey(key);
- return *this;
- }
- IJsonOutput& EndObject() {
- DoEndObject();
- return *this;
- }
+ IJsonOutput& BeginObject() {
+ DoBeginObject();
+ return *this;
+ }
+ IJsonOutput& WriteKey(const TStringBuf& key) {
+ DoWriteKey(key);
+ return *this;
+ }
+ IJsonOutput& EndObject() {
+ DoEndObject();
+ return *this;
+ }
- IJsonOutput& WriteRawJson(const TStringBuf& str) {
- DoWriteRawJson(str);
- return *this;
- }
+ IJsonOutput& WriteRawJson(const TStringBuf& str) {
+ DoWriteRawJson(str);
+ return *this;
+ }
- virtual ~IJsonOutput() {
- }
+ virtual ~IJsonOutput() {
+ }
- protected:
- virtual void DoWrite(const TStringBuf& s) = 0;
- virtual void DoWrite(const TString& s) = 0;
- virtual void DoWrite(int i) = 0;
- void DoWrite(long i) {
- DoWrite(static_cast<long long>(i));
- }
- virtual void DoWrite(long long i) = 0;
- virtual void DoWrite(unsigned int i) = 0;
- void DoWrite(unsigned long i) {
- DoWrite(static_cast<unsigned long long>(i));
- }
- virtual void DoWrite(unsigned long long i) = 0;
- virtual void DoWrite(float f) = 0;
- virtual void DoWrite(double f) = 0;
- virtual void DoWrite(bool b) = 0;
- virtual void DoWriteNull() = 0;
+ protected:
+ virtual void DoWrite(const TStringBuf& s) = 0;
+ virtual void DoWrite(const TString& s) = 0;
+ virtual void DoWrite(int i) = 0;
+ void DoWrite(long i) {
+ DoWrite(static_cast<long long>(i));
+ }
+ virtual void DoWrite(long long i) = 0;
+ virtual void DoWrite(unsigned int i) = 0;
+ void DoWrite(unsigned long i) {
+ DoWrite(static_cast<unsigned long long>(i));
+ }
+ virtual void DoWrite(unsigned long long i) = 0;
+ virtual void DoWrite(float f) = 0;
+ 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 DoBeginList() = 0;
+ virtual void DoEndList() = 0;
- virtual void DoBeginObject() = 0;
- virtual void DoWriteKey(const TStringBuf& key) = 0;
- virtual void DoEndObject() = 0;
+ virtual void DoBeginObject() = 0;
+ virtual void DoWriteKey(const TStringBuf& key) = 0;
+ virtual void DoEndObject() = 0;
- virtual void DoWriteRawJson(const TStringBuf& str) = 0;
- };
+ virtual void DoWriteRawJson(const TStringBuf& str) = 0;
+ };
- using TJsonMapOutputPtr = THolder<IJsonOutput>;
+ using TJsonMapOutputPtr = THolder<IJsonOutput>;
-}
+}