A validator that checks if each value in a container appears in a list of valid values.
More...
#include <seqan3/argument_parser/validators.hpp>
|
using | inner_value_type = typename value_type::value_type |
| Underlying type of the container.
|
|
using | value_type = option_value_type |
| Type of values that are tested by validator (container)
|
|
|
(Note that these are not member functions.)
|
|
You can expect these (meta-)functions on all types that implement seqan3::validator_concept.
|
void | operator() (value_type const &cmp) const |
| Validates the value 'cmp' and throws a seqan3::validation_error on failure. More...
|
|
template<container_concept option_value_type>
class seqan3::value_list_validator< option_value_type >
A validator that checks if each value in a container appears in a list of valid values.
- Template Parameters
-
◆ value_list_validator() [1/2]
template<container_concept option_value_type>
Constructing from a vector.
- Parameters
-
[in] | v | The vector of valid values to test. |
◆ value_list_validator() [2/2]
template<container_concept option_value_type>
Constructing from an initializer_list.
- Parameters
-
[in] | v | The initializer_list of valid values to test. |
◆ operator()()
template<container_concept option_value_type>
Tests whether cmp lies inside values.
- Parameters
-
cmp | The input value to check. |
- Exceptions
-
◆ operator()()
Validates the value 'cmp' and throws a seqan3::validation_error on failure.
- Template Parameters
-
- Parameters
-
[in,out] | cmp | The value to be validated. |
- Exceptions
-
seqan3::validation_error | if value 'cmp' does not pass validation. |
- Attention
- This is a concept requirement, not an actual function (however types satisfying this concept will provide an implementation).
The documentation for this class was generated from the following file: