1#ifndef AUBO_SCOPE_KEYBOARD_INPUT_VALIDATOR_H
2#define AUBO_SCOPE_KEYBOARD_INPUT_VALIDATOR_H
57 virtual bool isValid(std::string value) = 0;
102 std::function<std::pair<uint32_t, uint32_t>()> range_func);
115 std::function<std::pair<uint32_t, uint32_t>()>
range_func_{
nullptr };
121 bool is_min_inclusive =
true,
122 bool is_max_inclusive =
true);
127 std::function<std::tuple<double, double, bool, bool>()> range_func);
139 std::function<std::pair<double, double>()>
range_func_{
nullptr };
140 std::function<std::tuple<double, double, bool, bool>()>
151 std::function<std::pair<size_t, size_t>()> range_func);
163 std::function<std::pair<size_t, size_t>()>
range_func_{
nullptr };
std::function< std::tuple< double, double, bool, bool >()> range_func_with_flags_
std::string getMessage(std::string value) override
\chinese 当值无效时返回有意义的提示信息。
std::function< std::pair< double, double >()> range_func_
DoubleRangeValidator(double minValue, double maxValue, bool is_min_inclusive=true, bool is_max_inclusive=true)
DoubleRangeValidator(std::function< std::pair< double, double >()> range_func)
bool isValid(std::string value) override
\chinese 验证输入值是否有效。
DoubleRangeValidator(std::function< std::tuple< double, double, bool, bool >()> range_func)
std::string getMessage(std::string value) override
\chinese 当值无效时返回有意义的提示信息。
IntegerRangeValidator(int min_value, int max_value)
IntegerRangeValidator(std::function< std::pair< int, int >()> range_func)
bool isValid(std::string value) override
\chinese 验证输入值是否有效。
std::function< std::pair< int, int >()> range_func_
std::function< std::pair< size_t, size_t >()> range_func_
StringLengthValidator(size_t min_length, size_t max_length)
bool isValid(std::string value) override
\chinese 验证输入值是否有效。
std::string getMessage(std::string value) override
\chinese 当值无效时返回有意义的提示信息。
StringLengthValidator(std::function< std::pair< size_t, size_t >()> range_func)
std::string getMessage(std::string value) override
\chinese 当值无效时返回有意义的提示信息。
UIntegerRangeValidator(uint32_t min_value, uint32_t max_value)
UIntegerRangeValidator(std::function< std::pair< uint32_t, uint32_t >()> range_func)
std::function< std::pair< uint32_t, uint32_t >()> range_func_
bool isValid(std::string value) override
\chinese 验证输入值是否有效。