Lines Matching refs:opt

83   const auto pivot = std::partition(options_.begin(), options_.end(), [](const Option& opt) {  in Parse()  argument
84 return opt.count != Option::COUNT_OPTIONAL && opt.count != Option::COUNT_OPTIONAL_ONCE_OR_MORE; in Parse()
88 [](const Option& opt) -> std::string { return opt.name; }); in Parse() argument
99 for (const Option& opt : options_) { in Parse() local
100 if (opt.name == arg) { in Parse()
103 if (opt.argument) { in Parse()
108 return Error("%s: missing argument\n%s", opt.name.c_str(), stream.str().c_str()); in Parse()
111 opt.action(argv[i]); in Parse()
112 mandatory_opts.erase(opt.name); in Parse()
126 for (const auto& opt : mandatory_opts) { in Parse() local
131 stream << opt << ": missing mandatory option"; in Parse()
143 for (const Option& opt : options_) { in Usage() local
145 opt.count != Option::COUNT_OPTIONAL && opt.count != Option::COUNT_OPTIONAL_ONCE_OR_MORE; in Usage()
150 if (opt.argument) { in Usage()
151 out << opt.name << " arg"; in Usage()
152 maxLength = std::max(maxLength, opt.name.size() + 4); in Usage()
154 out << opt.name; in Usage()
155 maxLength = std::max(maxLength, opt.name.size()); in Usage()
158 if (opt.count == Option::COUNT_OPTIONAL_ONCE_OR_MORE) { in Usage()
166 if (opt.count == Option::COUNT_ONCE_OR_MORE) { in Usage()
167 out << " [" << opt.name << " arg [..]]"; in Usage()
171 for (const Option& opt : options_) { in Usage() local
173 if (opt.argument) { in Usage()
174 out << (opt.name + " arg"); in Usage()
176 out << opt.name; in Usage()
178 out << " " << opt.description; in Usage()
179 if (opt.count == Option::COUNT_ONCE_OR_MORE || in Usage()
180 opt.count == Option::COUNT_OPTIONAL_ONCE_OR_MORE) { in Usage()