Lines Matching refs:opt

85   const auto pivot = std::partition(options_.begin(), options_.end(), [](const Option& opt) {  in Parse()  argument
86 return opt.count != Option::COUNT_OPTIONAL && opt.count != Option::COUNT_OPTIONAL_ONCE_OR_MORE; in Parse()
90 [](const Option& opt) -> std::string { return opt.name; }); in Parse() argument
101 for (const Option& opt : options_) { in Parse() local
102 if (opt.name == arg) { in Parse()
105 if (opt.argument) { in Parse()
110 return Error("%s: missing argument\n%s", opt.name.c_str(), stream.str().c_str()); in Parse()
113 opt.action(argv[i]); in Parse()
114 mandatory_opts.erase(opt.name); in Parse()
128 for (const auto& opt : mandatory_opts) { in Parse() local
133 stream << opt << ": missing mandatory option"; in Parse()
145 for (const Option& opt : options_) { in Usage() local
147 opt.count != Option::COUNT_OPTIONAL && opt.count != Option::COUNT_OPTIONAL_ONCE_OR_MORE; in Usage()
152 if (opt.argument) { in Usage()
153 out << opt.name << " arg"; in Usage()
154 maxLength = std::max(maxLength, opt.name.size() + 4); in Usage()
156 out << opt.name; in Usage()
157 maxLength = std::max(maxLength, opt.name.size()); in Usage()
160 if (opt.count == Option::COUNT_OPTIONAL_ONCE_OR_MORE) { in Usage()
168 if (opt.count == Option::COUNT_ONCE_OR_MORE) { in Usage()
169 out << " [" << opt.name << " arg [..]]"; in Usage()
173 for (const Option& opt : options_) { in Usage() local
175 if (opt.argument) { in Usage()
176 out << (opt.name + " arg"); in Usage()
178 out << opt.name; in Usage()
180 out << " " << opt.description; in Usage()
181 if (opt.count == Option::COUNT_ONCE_OR_MORE || in Usage()
182 opt.count == Option::COUNT_OPTIONAL_ONCE_OR_MORE) { in Usage()