void knitting_options_validator::validate(const knitting_options& o) { if (o.target().empty()) { BOOST_LOG_SEV(lg, error) << missing_target; BOOST_THROW_EXCEPTION(validation_error(missing_target)); } if (o.output_directory_path().empty()) { BOOST_LOG_SEV(lg, error) << missing_output_dir; BOOST_THROW_EXCEPTION(validation_error(missing_output_dir)); } }
std::size_t knitting_options_hasher::hash(const knitting_options& v) { std::size_t seed(0); combine(seed, v.verbose()); combine(seed, hash_boost_filesystem_path(v.target())); combine(seed, v.delete_extra_files()); combine(seed, v.force_write()); combine(seed, hash_std_vector_std_string(v.ignore_patterns())); combine(seed, hash_boost_filesystem_path(v.output_directory_path())); return seed; }