Provides some text validation functionality. See README.txt for.
More...
#include <cxTextValidator.h>
Provides some text validation functionality. See README.txt for.
details of validation strings.
◆ cxTextValidator()
| cx::cxTextValidator::cxTextValidator |
( |
const std::string & |
pTextStr = "", |
|
|
const std::string & |
pValidatorStr = "" |
|
) |
| |
|
explicit |
Default constructor; takes a text string and a validator string
- Parameters
-
| pTextStr | String to validate; blank by default |
| pValidatorStr | String used to validate text; blank by default |
◆ ~cxTextValidator()
| cx::cxTextValidator::~cxTextValidator |
( |
| ) |
|
|
virtual |
◆ addImpliedChars() [1/2]
| string cx::cxTextValidator::addImpliedChars |
( |
| ) |
const |
|
virtual |
◆ addImpliedChars() [2/2]
| virtual void cx::cxTextValidator::addImpliedChars |
( |
std::string & |
pTextStr | ) |
const |
|
virtual |
Adds any implied characters from the validator string to a text string, if it is valid. For example, with a string of "5031234567" and a validator string of "(DDD) DDD-DDDD", the string would become "(503) 123-4567".
- Parameters
-
| pTextStr | A string to add implied characters to (it will get the implied characters added to it) |
◆ cxTypeStr()
| string cx::cxTextValidator::cxTypeStr |
( |
| ) |
const |
|
virtual |
Returns the name of the cxWidgets class. This can be used to.
determine the type of cxWidgets object that deriving classes
derive from in applications.
- Returns
- The name of the cxWidgets class.
◆ getTextStr()
| const string & cx::cxTextValidator::getTextStr |
( |
| ) |
const |
|
virtual |
Returns the text string
- Returns
- The text string
◆ getValidatorStr()
| const string & cx::cxTextValidator::getValidatorStr |
( |
| ) |
const |
|
virtual |
◆ setTextStr()
| void cx::cxTextValidator::setTextStr |
( |
const std::string & |
pTextStr | ) |
|
|
virtual |
Sets the text string to be validated
- Parameters
-
| pTextStr | Text string to be validated |
Referenced by main().
◆ setValidatorStr()
| void cx::cxTextValidator::setValidatorStr |
( |
const std::string & |
pValidatorStr | ) |
|
|
virtual |
Sets the validator string
- Parameters
-
| pValidatorStr | Validator string–see README.txt for details of validator strings |
Referenced by main(), and cx::cxInput::setValidator().
◆ textIsValid() [1/2]
| bool cx::cxTextValidator::textIsValid |
( |
| ) |
const |
|
virtual |
◆ textIsValid() [2/2]
| virtual bool cx::cxTextValidator::textIsValid |
( |
const std::string & |
pTextStr | ) |
const |
|
virtual |
Returns whether parameter string passes validation
- Parameters
-
| pTextStr | String to validate |
- Returns
- True or false, depending on whether string passes validation
The documentation for this class was generated from the following files: