MCPcopy Create free account
hub / github.com/catboost/catboost / AddEnumItem

Method AddEnumItem

tools/enum_parser/parse_enum/parse_enum.cpp:67–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65 }
66
67 void AddEnumItem() {
68 if (!CurrentItem.CppName) {
69 // uninitialized element should have no value too
70 Y_ASSERT(!CurrentItem.Value.Defined());
71 return;
72 }
73
74 // enum item C++ name should not be empty
75 Y_ASSERT(CurrentItem.CppName);
76 CurrentItem.NormalizeValue();
77 CurrentEnum.Items.push_back(CurrentItem);
78 CurrentItem.Clear();
79 InEnumState = Begin;
80 }
81
82 template<class T>
83 void AppendValue(const T& text) {

Callers

nothing calls this directly

Calls 4

NormalizeValueMethod · 0.80
DefinedMethod · 0.45
push_backMethod · 0.45
ClearMethod · 0.45

Tested by

no test coverage detected