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

Function ToString

library/cpp/yson/token.cpp:209–232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207 }
208
209 TString ToString(const TToken& token) {
210 switch (token.GetType()) {
211 case ETokenType::EndOfStream:
212 return TString();
213
214 case ETokenType::String:
215 return TString(token.GetStringValue());
216
217 case ETokenType::Int64:
218 return ::ToString(token.GetInt64Value());
219
220 case ETokenType::Uint64:
221 return ::ToString(token.GetUint64Value());
222
223 case ETokenType::Double:
224 return ::ToString(token.GetDoubleValue());
225
226 case ETokenType::Boolean:
227 return token.GetBooleanValue() ? "true" : "false";
228
229 default:
230 return TokenTypeToString(token.GetType());
231 }
232 }
233
234 ////////////////////////////////////////////////////////////////////////////////
235

Callers 15

FloatToStringWithNanInfFunction · 0.70
OnInt64ScalarMethod · 0.70
OnUint64ScalarMethod · 0.70
CheckTypeMethod · 0.70
TFastLZCodecMethod · 0.50
TZStd08RegistrarMethod · 0.50
TZStd06CodecMethod · 0.50
TBZipCodecMethod · 0.50
CPrefixMethod · 0.50
TBrotliCodecMethod · 0.50
TLzmaCodecMethod · 0.50
TZLibCodecMethod · 0.50

Calls 6

TokenTypeToStringFunction · 0.85
GetInt64ValueMethod · 0.80
GetUint64ValueMethod · 0.80
GetDoubleValueMethod · 0.80
GetBooleanValueMethod · 0.80
GetTypeMethod · 0.45

Tested by 2

TestGeneralVectorMethod · 0.40
TestReadMethod · 0.40