diff options
author | Devtools Arcadia <arcadia-devtools@yandex-team.ru> | 2022-02-07 18:08:42 +0300 |
---|---|---|
committer | Devtools Arcadia <arcadia-devtools@mous.vla.yp-c.yandex.net> | 2022-02-07 18:08:42 +0300 |
commit | 1110808a9d39d4b808aef724c861a2e1a38d2a69 (patch) | |
tree | e26c9fed0de5d9873cce7e00bc214573dc2195b7 /library/cpp/yt/string/enum.h | |
download | ydb-1110808a9d39d4b808aef724c861a2e1a38d2a69.tar.gz |
intermediate changes
ref:cde9a383711a11544ce7e107a78147fb96cc4029
Diffstat (limited to 'library/cpp/yt/string/enum.h')
-rw-r--r-- | library/cpp/yt/string/enum.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/library/cpp/yt/string/enum.h b/library/cpp/yt/string/enum.h new file mode 100644 index 0000000000..10dc02610f --- /dev/null +++ b/library/cpp/yt/string/enum.h @@ -0,0 +1,31 @@ +#pragma once + +#include "string.h" + +#include <library/cpp/yt/misc/enum.h> + +#include <optional> + +namespace NYT { + +//////////////////////////////////////////////////////////////////////////////// + +TString DecodeEnumValue(TStringBuf value); +TString EncodeEnumValue(TStringBuf value); + +template <class T> +T ParseEnum(TStringBuf value); + +template <class T> +void FormatEnum(TStringBuilderBase* builder, T value, bool lowerCase); + +template <class T> +TString FormatEnum(T value, typename TEnumTraits<T>::TType* = nullptr); + +//////////////////////////////////////////////////////////////////////////////// + +} // namespace NYT + +#define ENUM_INL_H_ +#include "enum-inl.h" +#undef ENUM_INL_H_ |