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

Method GetOrElse

library/cpp/getopt/small/last_getopt_parse_result.cpp:94–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92 }
93
94 const char* TOptsParseResult::GetOrElse(const TOpt* opt, const char* defaultValue) const {
95 Y_ASSERT(opt);
96 const TOptParseResult* r = FindOptParseResult(opt);
97 if (!r || r->Empty()) {
98 return defaultValue;
99 } else {
100 return r->Back();
101 }
102 }
103
104 const char* TOptsParseResult::Get(const TString& name, bool includeDefault) const {
105 return Get(&Parser_->Opts_->GetLongOption(name), includeDefault);

Callers 15

ReadPacketHeaderTailFunction · 0.45
Y_UNIT_TESTFunction · 0.45
GetDocumentCountFunction · 0.45
mode_normalize_modelMethod · 0.45
DoMapMethod · 0.45
LoadInMatrixnetFormatFunction · 0.45
ComputeAdditiveMetricMethod · 0.45
plot.cppFile · 0.45
CalcMetricFunction · 0.45
CalcErrorsLocallyFunction · 0.45

Calls 4

HasFunction · 0.85
GetFunction · 0.50
EmptyMethod · 0.45
BackMethod · 0.45

Tested by

no test coverage detected