aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/yt/string/enum.h
blob: 774ad5eb02ee107a413a01acbd4731ff08838877 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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_