AuboCaps  0.5.0
arcs::aubo_scope::InputValidator< T > Struct Template Referenceabstract

#include <input_validator.h>

Inheritance diagram for arcs::aubo_scope::InputValidator< T >:

Public Member Functions

virtual bool isValid (T value)=0
 
virtual std::string getMessage (T value)=0
 Returns a meaningful message in case the value is not valid. More...
 

Detailed Description

template<typename T>
struct arcs::aubo_scope::InputValidator< T >

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.

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

Definition at line 28 of file input_validator.h.

Member Function Documentation

template<typename T>
virtual std::string arcs::aubo_scope::InputValidator< T >::getMessage ( value)
pure virtual

Returns a meaningful message in case the value is not valid.

Parameters
valuethe invalid value. Can be included in the message if it makes sense.
Returns
message.

Implemented in arcs::aubo_scope::StringLengthValidator, and arcs::aubo_scope::RangeValidator< T >.

template<typename T>
virtual bool arcs::aubo_scope::InputValidator< T >::isValid ( value)
pure virtual
Parameters
valueto be validated.
Returns
true if value is valid.

Implemented in arcs::aubo_scope::StringLengthValidator, and arcs::aubo_scope::RangeValidator< T >.


The documentation for this struct was generated from the following file: