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

Method PrintFlags

util/generic/flags.cpp:6–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4#include <util/system/yassert.h>
5
6void ::NPrivate::PrintFlags(IOutputStream& stream, ui64 value, size_t size) {
7 /* Note that this function is in cpp because we need to break circular
8 * dependency between TFlags and ENumberFormat. */
9 stream << "TFlags(";
10
11 switch (size) {
12 case 1:
13 stream << Bin(static_cast<ui8>(value), HF_FULL);
14 break;
15 case 2:
16 stream << Bin(static_cast<ui16>(value), HF_FULL);
17 break;
18 case 4:
19 stream << Bin(static_cast<ui32>(value), HF_FULL);
20 break;
21 case 8:
22 stream << Bin(static_cast<ui64>(value), HF_FULL);
23 break;
24 default:
25 Y_ABORT_UNLESS(false);
26 }
27
28 stream << ")";
29}

Callers

nothing calls this directly

Calls 1

BinFunction · 0.85

Tested by

no test coverage detected