AuboStudio SDK  0.6.3
arcs::aubo_scope::IntegerRangeValidator结构体 参考

#include <input_validator.h>

类 arcs::aubo_scope::IntegerRangeValidator 继承关系图:
arcs::aubo_scope::IntegerRangeValidator 的协作图:

Public 成员函数

 IntegerRangeValidator (int min_value, int max_value)
 IntegerRangeValidator (std::function< std::pair< int, int >()> range_func)
bool isValid (std::string value) override
 \chinese 验证输入值是否有效。
std::string getMessage (std::string value) override
 \chinese 当值无效时返回有意义的提示信息。

Private 成员函数

void updateValue ()

Private 属性

int min_value_ { INT_MIN }
int max_value_ { INT_MAX }
std::function< std::pair< int, int >()> range_func_ { nullptr }

详细描述

在文件 input_validator.h77 行定义.

构造及析构函数说明

◆ IntegerRangeValidator() [1/2]

arcs::aubo_scope::IntegerRangeValidator::IntegerRangeValidator ( int min_value,
int max_value )

◆ IntegerRangeValidator() [2/2]

arcs::aubo_scope::IntegerRangeValidator::IntegerRangeValidator ( std::function< std::pair< int, int >()> range_func)

成员函数说明

◆ getMessage()

std::string arcs::aubo_scope::IntegerRangeValidator::getMessage ( std::string value)
overridevirtual

\chinese 当值无效时返回有意义的提示信息。

参数
value无效的值,如果合理可包含在消息中
返回
提示消息 \endchinese \english Returns a meaningful message in case the value is not valid.
参数
valuethe invalid value. Can be included in the message if it makes sense.
返回
message. \endenglish

实现了 arcs::aubo_scope::InputValidator.

◆ isValid()

bool arcs::aubo_scope::IntegerRangeValidator::isValid ( std::string value)
overridevirtual

\chinese 验证输入值是否有效。

参数
value需要验证的值
返回
如果值有效则返回 true \endchinese \english Validates whether the input value is valid.
参数
valueto be validated.
返回
true if value is valid. \endenglish

实现了 arcs::aubo_scope::InputValidator.

◆ updateValue()

void arcs::aubo_scope::IntegerRangeValidator::updateValue ( )
private

类成员变量说明

◆ max_value_

int arcs::aubo_scope::IntegerRangeValidator::max_value_ { INT_MAX }
private

在文件 input_validator.h92 行定义.

◆ min_value_

int arcs::aubo_scope::IntegerRangeValidator::min_value_ { INT_MIN }
private

在文件 input_validator.h91 行定义.

◆ range_func_

std::function<std::pair<int, int>()> arcs::aubo_scope::IntegerRangeValidator::range_func_ { nullptr }
private

在文件 input_validator.h94 行定义.


该结构体的文档由以下文件生成: