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

Function SetEnumFlags

util/draft/enum.h:104–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102// all set by default
103template <class E, size_t N, size_t B>
104inline void SetEnumFlags(const std::pair<const char*, E> (&str2Enum)[N], TStringBuf optSpec,
105 std::bitset<B>& flags, bool allIfEmpty = true) {
106 if (optSpec.empty()) {
107 SetEnumFlagsForEmptySpec(flags, allIfEmpty);
108 } else {
109 flags.reset();
110 for (const auto& it : StringSplitter(optSpec).Split(',')) {
111 E e = *EnumFromStringImpl(ToString(it.Token()).data(), str2Enum, N);
112 flags.set(e);
113 }
114 }
115}
116
117template <class E, size_t B>
118inline void SetEnumFlags(const std::pair<const char*, E>* str2Enum, TStringBuf optSpec,

Callers

nothing calls this directly

Calls 11

SetEnumFlagsForEmptySpecFunction · 0.85
StringSplitterFunction · 0.85
EnumFromStringImplFunction · 0.85
TryFromStringFunction · 0.85
ToStringFunction · 0.50
emptyMethod · 0.45
resetMethod · 0.45
SplitMethod · 0.45
dataMethod · 0.45
TokenMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected