diff options
author | amatanhead <amatanhead@yandex-team.ru> | 2022-02-10 16:50:04 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:50:04 +0300 |
commit | b6f3a80f7c2c8b7dbb0c01b056fdc1fd8cd820e9 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/getopt/small/formatted_output.h | |
parent | 8879605a63ac17539be5b3bd41b529791f4d4b02 (diff) | |
download | ydb-b6f3a80f7c2c8b7dbb0c01b056fdc1fd8cd820e9.tar.gz |
Restoring authorship annotation for <amatanhead@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/getopt/small/formatted_output.h')
-rw-r--r-- | library/cpp/getopt/small/formatted_output.h | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/library/cpp/getopt/small/formatted_output.h b/library/cpp/getopt/small/formatted_output.h index f239dd7fdb..6fd16b73f9 100644 --- a/library/cpp/getopt/small/formatted_output.h +++ b/library/cpp/getopt/small/formatted_output.h @@ -1,32 +1,32 @@ -#pragma once - -#include <util/generic/algorithm.h> -#include <util/generic/vector.h> -#include <util/string/builder.h> -#include <util/memory/tempbuf.h> - -namespace NLastGetopt { - /// Utility for printing indented lines. Used by completion generators. - class TFormattedOutput { - public: - struct IndentGuard { - explicit IndentGuard(TFormattedOutput* output); - virtual ~IndentGuard(); - TFormattedOutput* Output; - }; - - public: - /// Increase indentation and return a RAII object that'll decrease it back automatically. - IndentGuard Indent(); - - /// Append a new indented line to the stream. - TStringBuilder& Line(); - - /// Collect all lines into a stream. - void Print(IOutputStream& out); - - private: - int IndentLevel_ = 0; - TVector<std::pair<int, TStringBuilder>> Lines_; - }; -} +#pragma once + +#include <util/generic/algorithm.h> +#include <util/generic/vector.h> +#include <util/string/builder.h> +#include <util/memory/tempbuf.h> + +namespace NLastGetopt { + /// Utility for printing indented lines. Used by completion generators. + class TFormattedOutput { + public: + struct IndentGuard { + explicit IndentGuard(TFormattedOutput* output); + virtual ~IndentGuard(); + TFormattedOutput* Output; + }; + + public: + /// Increase indentation and return a RAII object that'll decrease it back automatically. + IndentGuard Indent(); + + /// Append a new indented line to the stream. + TStringBuilder& Line(); + + /// Collect all lines into a stream. + void Print(IOutputStream& out); + + private: + int IndentLevel_ = 0; + TVector<std::pair<int, TStringBuilder>> Lines_; + }; +} |