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

Method ToString

library/cpp/json/ut/json_reader_fast_ut.cpp:57–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55 }
56
57 TString ToString() const {
58 switch (Type) {
59 default:
60 return "YOUFAILED";
61 case E_ERROR:
62 return Sprintf("error: %s", Str.data());
63 case E_DICT_OPEN:
64 return "{";
65 case E_DICT_CLOSE:
66 return "}";
67 case E_ARR_OPEN:
68 return "[";
69 case E_ARR_CLOSE:
70 return "]";
71 case E_NULL:
72 return "null";
73 case E_BOOL:
74 return INum ? "true" : "false";
75 case E_INT:
76 return ::ToString(INum);
77 case E_FLT:
78 return ::ToString(DNum);
79 case E_STR:
80 return Sprintf("%s", Str.data());
81 case E_KEY:
82 return Sprintf("key: %s", Str.data());
83 }
84 }
85 };
86
87 using TEvents = TVector<TEvent>;

Callers 1

AssertMethod · 0.45

Calls 3

SprintfFunction · 0.85
ToStringFunction · 0.50
dataMethod · 0.45

Tested by

no test coverage detected