AuboStudio SDK  0.6.3
arcs::aubo_scope::InputValidator结构体 参考abstract

\chinese 输入验证器 表示由 InputValidationFactory 创建的输入验证器接口。该工厂提供一组标准 输入验证器,可用于验证用户使用虚拟键盘/小键盘输入的内容。 更多...

#include <input_validator.h>

类 arcs::aubo_scope::InputValidator 继承关系图:

Public 成员函数

virtual bool isValid (std::string value)=0
 \chinese 验证输入值是否有效。
virtual std::string getMessage (std::string value)=0
 \chinese 当值无效时返回有意义的提示信息。

详细描述

\chinese 输入验证器 表示由 InputValidationFactory 创建的输入验证器接口。该工厂提供一组标准 输入验证器,可用于验证用户使用虚拟键盘/小键盘输入的内容。

如果 InputValidationFactory 中可用的标准验证器不能满足您的需求,您可以 自由实现自己的自定义验证器。

参数
<T>表示正在验证的输入数据类型的接口(通用)类型参数(例如 Integer 或 Double)。 \endchinese \english InputValidator Interface representing the input validators created by InputValidationFactory. This factory provides a set of standard input validators that can be used for validating the input entered by the user using the virtual keyboard/keypad.

If the standard validators available in the InputValidationFactory does not satisfy your needs, you are free to implement your own custom validator.

参数
<T>the (generic) type parameter for the interface representing the type of input data being validated (e.g. Integer or Double). \endenglish

在文件 input_validator.h41 行定义.

成员函数说明

◆ getMessage()

virtual std::string arcs::aubo_scope::InputValidator::getMessage ( std::string value)
pure virtual

\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::DoubleRangeValidator, arcs::aubo_scope::IntegerRangeValidator, arcs::aubo_scope::StringLengthValidator , 以及 arcs::aubo_scope::UIntegerRangeValidator 内被实现.

◆ isValid()

virtual bool arcs::aubo_scope::InputValidator::isValid ( std::string value)
pure virtual

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

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

arcs::aubo_scope::DoubleRangeValidator, arcs::aubo_scope::IntegerRangeValidator, arcs::aubo_scope::StringLengthValidator , 以及 arcs::aubo_scope::UIntegerRangeValidator 内被实现.


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