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

Method Init

library/cpp/getopt/small/last_getopt_parser.cpp:8–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6
7namespace NLastGetopt {
8 void TOptsParser::Init(const TOpts* opts, int argc, const char* argv[]) {
9 opts->Validate();
10
11 Opts_ = opts;
12
13 if (argc < 1)
14 throw TUsageException() << "argv must have at least one argument";
15
16 Argc_ = argc;
17 Argv_ = argv;
18
19 ProgramName_ = argv[0];
20
21 Pos_ = 1;
22 Sop_ = 0;
23 CurrentOpt_ = nullptr;
24 CurrentValue_ = nullptr;
25 GotMinusMinus_ = false;
26 Stopped_ = false;
27 OptsSeen_.clear();
28 OptsDefault_.clear();
29 }
30
31 void TOptsParser::Init(const TOpts* opts, int argc, char* argv[]) {
32 Init(opts, argc, const_cast<const char**>(argv));

Callers

nothing calls this directly

Calls 4

TUsageExceptionClass · 0.85
InitFunction · 0.50
ValidateMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected