MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / validate

Method validate

utils/command_line/CommandLineParser.h:183–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181}
182
183inline bool CommandLineParser::validate() const
184{
185 bool is_valid = true;
186
187 for (const auto &option : _options)
188 {
189 if (option.second->is_required() && !option.second->is_set())
190 {
191 is_valid = false;
192 std::cerr << "ERROR: Option '" << option.second->name() << "' is required but not given!\n";
193 }
194 }
195
196 for (const auto &option : _positional_options)
197 {
198 if (option->is_required() && !option->is_set())
199 {
200 is_valid = false;
201 std::cerr << "ERROR: Option '" << option->name() << "' is required but not given!\n";
202 }
203 }
204
205 for (const auto &option : _unknown_options)
206 {
207 std::cerr << "WARNING: Skipping unknown option '" << option << "'!\n";
208 }
209
210 for (const auto &option : _invalid_options)
211 {
212 std::cerr << "WARNING: Skipping invalid option '" << option << "'!\n";
213 }
214
215 return is_valid;
216}
217
218inline void CommandLineParser::print_help(const std::string &program_name) const
219{

Callers

nothing calls this directly

Calls 3

is_requiredMethod · 0.80
is_setMethod · 0.80
nameMethod · 0.45

Tested by

no test coverage detected