Guiliani  Version 2.5 revision 7293 (documentation build 13)
CGUIValidator Class Referenceabstract

Interface for validators that provide checking and changing of user input. More...

#include <GUIValidator.h>

Inheritance diagram for CGUIValidator:

Public Member Functions

 CGUIValidator ()
 Default constructor.
 
virtual ~CGUIValidator ()
 Destructor.
 
virtual eC_Bool IsValid (const eC_String &rValue) const =0
 
virtual void MakeValid (eC_String &rValue) const =0
 

Detailed Description

Interface for validators that provide checking and changing of user input.

Specializations have to implement the method IsValid() to return a boolean value that indicates whether the input was valid. In addition, the method MakeValid() should be implemented to change an input text in a way that makes it valid.

Validators are meant to be used with input fields (see CGUIBaseInputField).

Member Function Documentation

◆ IsValid()

virtual eC_Bool CGUIValidator::IsValid ( const eC_String &  rValue) const
pure virtual

Checks a value for validity.

Parameters
rValueThe value to be checked.
Returns
True if the value is accepted by the validator, otherwise False.

Implemented in CGUIColorStringValidator, and CGUIIntValidator.

◆ MakeValid()

virtual void CGUIValidator::MakeValid ( eC_String &  rValue) const
pure virtual

Tries to make a value valid.

Parameters
[in,out]rValueThe value to be checked and made valid, if possible. If the implementation is not able to correct the value or if it is already valid, the value can also be left unchanged.

Implemented in CGUIColorStringValidator, and CGUIIntValidator.


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