• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/contrib/kyua/utils/cmdline/

Lines Matching defs:raw_value

301 /// \param raw_value The argument representing an integer as provided by the
305 /// raw_value is invalid.
307 cmdline::int_option::validate(const std::string& raw_value) const
310 (void)text::to_type< int >(raw_value);
313 F("--%s") % long_name(), raw_value, "Not a valid integer");
320 /// \param raw_value The argument representing an integer as provided by the
325 /// \pre validate(raw_value) must be true.
327 cmdline::int_option::convert(const std::string& raw_value)
330 return text::to_type< int >(raw_value);
333 "validated: %s") % raw_value % e.what());
378 const std::string& /* raw_value */) const
386 /// \param raw_value The argument representing a list as provided by the user.
390 /// \pre validate(raw_value) must be true.
392 cmdline::list_option::convert(const std::string& raw_value)
395 return text::split(raw_value, ',');
398 "validated: %s") % raw_value % e.what());
442 /// \param raw_value The argument representing a path as provided by the user.
445 /// raw_value is invalid.
447 cmdline::path_option::validate(const std::string& raw_value) const
450 (void)utils::fs::path(raw_value);
453 raw_value, e.what());
460 /// \param raw_value The argument representing a path as provided by the user.
464 /// \pre validate(raw_value) must be true.
466 cmdline::path_option::convert(const std::string& raw_value)
469 return utils::fs::path(raw_value);
472 "validated: %s") % raw_value % e.what());
511 /// \param raw_value The argument provided by the user.
513 cmdline::property_option::validate(const std::string& raw_value) const
515 const std::string::size_type pos = raw_value.find('=');
518 F("--%s") % long_name(), raw_value,
521 const std::string key = raw_value.substr(0, pos);
524 F("--%s") % long_name(), raw_value, "Empty property name");
526 const std::string value = raw_value.substr(pos + 1);
529 F("--%s") % long_name(), raw_value, "Empty value");
535 /// \param raw_value The argument provided by the user.
537 /// \return raw_value The key/value pair representation of the property.
539 /// \pre validate(raw_value) must be true.
541 cmdline::property_option::convert(const std::string& raw_value)
543 const std::string::size_type pos = raw_value.find('=');
544 return std::make_pair(raw_value.substr(0, pos), raw_value.substr(pos + 1));
588 const std::string& /* raw_value */) const
596 /// \param raw_value The argument provided by the user.
598 /// \return raw_value
600 /// \pre validate(raw_value) must be true.
602 cmdline::string_option::convert(const std::string& raw_value)
604 return raw_value;