A CGUIValidator for an integer range.
More...
#include <GUIIntValidator.h>
|
| CGUIIntValidator (eC_Int iMin=INT_MIN, eC_Int iMax=INT_MAX) |
|
eC_Int | GetMaximum () const |
|
eC_Int | GetMinimum () const |
|
virtual eC_Bool | IsValid (const eC_String &rValue) const |
|
virtual void | MakeValid (eC_String &rValue) const |
|
| CGUIValidator () |
| Default constructor.
|
|
virtual | ~CGUIValidator () |
| Destructor.
|
|
virtual eC_Bool | IsValid (const eC_String &rValue) const =0 |
|
virtual void | MakeValid (eC_String &rValue) const =0 |
|
|
eC_Int | m_iMax |
| The valid maximum value.
|
|
eC_Int | m_iMin |
| The valid minimum value.
|
|
A CGUIValidator for an integer range.
◆ CGUIIntValidator()
CGUIIntValidator::CGUIIntValidator |
( |
eC_Int |
iMin = INT_MIN , |
|
|
eC_Int |
iMax = INT_MAX |
|
) |
| |
Constructor.
- Parameters
-
iMin | The valid minimum value. |
iMax | The valid maximum value. |
◆ GetMaximum()
eC_Int CGUIIntValidator::GetMaximum |
( |
| ) |
const |
|
inline |
Get maximum allowed value
- Returns
- max-value
◆ GetMinimum()
eC_Int CGUIIntValidator::GetMinimum |
( |
| ) |
const |
|
inline |
Get minimum allowed value
- Returns
- min-value
◆ IsValid()
virtual eC_Bool CGUIIntValidator::IsValid |
( |
const eC_String & |
rValue | ) |
const |
|
virtual |
Check whether a given string represents an integer in the range this object validates.
- Parameters
-
rValue | String to check for a valid integer number. |
- Returns
- True if the passed string can be converted to an integer value in the range that has been specified in the constructor, false otherwise.
Implements CGUIValidator.
◆ MakeValid()
virtual void CGUIIntValidator::MakeValid |
( |
eC_String & |
rValue | ) |
const |
|
virtual |
The passed value is converted to an integer. If it is out of range, it is set to the nearest valid value.
- Parameters
-
[in,out] | rValue | The value to be tested and changed if necessary. |
Implements CGUIValidator.
The documentation for this class was generated from the following file: