aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/yson/writer.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/yson/writer.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/yson/writer.h')
-rw-r--r--library/cpp/yson/writer.h104
1 files changed, 52 insertions, 52 deletions
diff --git a/library/cpp/yson/writer.h b/library/cpp/yson/writer.h
index 40f5d7d501..db4ed0f5e6 100644
--- a/library/cpp/yson/writer.h
+++ b/library/cpp/yson/writer.h
@@ -10,80 +10,80 @@ class IOutputStream;
class IZeroCopyInput;
namespace NYson {
- ////////////////////////////////////////////////////////////////////////////////
-
- class TYsonWriter
- : public TYsonConsumerBase,
- private TNonCopyable {
- public:
- class TState {
- private:
- int Depth;
- bool BeforeFirstItem;
-
- friend class TYsonWriter;
- };
-
- public:
- TYsonWriter(
- IOutputStream* stream,
+ ////////////////////////////////////////////////////////////////////////////////
+
+ class TYsonWriter
+ : public TYsonConsumerBase,
+ private TNonCopyable {
+ public:
+ class TState {
+ private:
+ int Depth;
+ bool BeforeFirstItem;
+
+ friend class TYsonWriter;
+ };
+
+ public:
+ TYsonWriter(
+ IOutputStream* stream,
EYsonFormat format = EYsonFormat::Binary,
EYsonType type = ::NYson::EYsonType::Node,
- bool enableRaw = false);
+ bool enableRaw = false);
void OnStringScalar(TStringBuf value) override;
- void OnInt64Scalar(i64 value) override;
- void OnUint64Scalar(ui64 value) override;
- void OnDoubleScalar(double value) override;
- void OnBooleanScalar(bool value) override;
- void OnEntity() override;
+ void OnInt64Scalar(i64 value) override;
+ void OnUint64Scalar(ui64 value) override;
+ void OnDoubleScalar(double value) override;
+ void OnBooleanScalar(bool value) override;
+ void OnEntity() override;
- void OnBeginList() override;
- void OnListItem() override;
- void OnEndList() override;
+ void OnBeginList() override;
+ void OnListItem() override;
+ void OnEndList() override;
- void OnBeginMap() override;
+ void OnBeginMap() override;
void OnKeyedItem(TStringBuf key) override;
- void OnEndMap() override;
+ void OnEndMap() override;
- void OnBeginAttributes() override;
- void OnEndAttributes() override;
+ void OnBeginAttributes() override;
+ void OnEndAttributes() override;
void OnRaw(TStringBuf yson, EYsonType type = ::NYson::EYsonType::Node) override;
- TState State() const;
- void Reset(const TState& state);
+ TState State() const;
+ void Reset(const TState& state);
- protected:
- IOutputStream* Stream;
- EYsonFormat Format;
- EYsonType Type;
- bool EnableRaw;
+ protected:
+ IOutputStream* Stream;
+ EYsonFormat Format;
+ EYsonType Type;
+ bool EnableRaw;
- int Depth;
- bool BeforeFirstItem;
+ int Depth;
+ bool BeforeFirstItem;
- static const int IndentSize = 4;
+ static const int IndentSize = 4;
- void WriteIndent();
- void WriteStringScalar(const TStringBuf& value);
+ void WriteIndent();
+ void WriteStringScalar(const TStringBuf& value);
- void BeginCollection(ETokenType beginToken);
- void CollectionItem(ETokenType separatorToken);
- void EndCollection(ETokenType endToken);
+ void BeginCollection(ETokenType beginToken);
+ void CollectionItem(ETokenType separatorToken);
+ void EndCollection(ETokenType endToken);
- bool IsTopLevelFragmentContext() const;
- void EndNode();
- };
+ bool IsTopLevelFragmentContext() const;
+ void EndNode();
+ };
- ////////////////////////////////////////////////////////////////////////////////
+ ////////////////////////////////////////////////////////////////////////////////
- void ReformatYsonStream(
+ void ReformatYsonStream(
IInputStream* input,
- IOutputStream* output,
+ IOutputStream* output,
EYsonFormat format = EYsonFormat::Binary,
EYsonType type = ::NYson::EYsonType::Node);
- ////////////////////////////////////////////////////////////////////////////////
+ ////////////////////////////////////////////////////////////////////////////////
} // namespace NYson