Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

TFilterValidator Class Reference

Check an input field as the user types into it. More...

#include <validate.h>

Inheritance diagram for TFilterValidator::

TValidator TObject TStreamable TRangeValidator List of all members.

Public Methods

 TFilterValidator (const char *aValidChars)
 ~TFilterValidator ()
virtual void error ()
virtual Boolean isValidInput (char *s, Boolean suppressFill)
virtual Boolean isValid (const char *s)

Static Public Methods

TStreamablebuild ()

Static Public Attributes

const char* const name

Protected Methods

 TFilterValidator (StreamableInit)
virtual void write (opstream &os)
virtual void* read (ipstream &is)

Protected Attributes

char* validChars

Detailed Description

Filter validator objects check an input field as the user types into it. The validator holds a set of allowed characters. If the user types one of the legal characters, the filter validator indicates that the character is valid.

If the user types any other character, the validator indicates that the input is invalid.

Definition at line 502 of file validate.h.


Constructor & Destructor Documentation

TFilterValidator::TFilterValidator ( const char * aValidChars )
 

Constructs a filter validator object by first calling the constructor inherited from TValidator, then setting validChars data member to `aValidChars'.

TFilterValidator::~TFilterValidator ( )
 

Undocumented.

TFilterValidator::TFilterValidator ( StreamableInit ) [protected]
 

Each streamable class needs a "builder" to allocate the correct memory for its objects together with the initialized virtual table pointers. This is achieved by calling this constructor with an argument of type StreamableInit.


Member Function Documentation

TStreamable * TFilterValidator::build ( ) [static]
 

Called to create an object in certain stream-reading situations.

Reimplemented from TValidator.

Reimplemented in TRangeValidator.

void TFilterValidator::error ( ) [virtual]
 

Undocumented.

Reimplemented from TValidator.

Reimplemented in TRangeValidator.

Boolean TFilterValidator::isValid ( const char * s ) [virtual]
 

Checks each character in the string `s' to make sure it is in the set of allowed characters, validChars. Returns True if all characters in `s' are valid; otherwise returns False.

Reimplemented from TValidator.

Reimplemented in TRangeValidator.

Boolean TFilterValidator::isValidInput ( char * s,
Boolean suppressFill ) [virtual]
 

Checks each character in the string `s' to make sure it is in the set of allowed characters, validChars. Returns True if all characters in `s' are valid; otherwise returns False.

Reimplemented from TValidator.

void * TFilterValidator::read ( ipstream & is ) [protected, virtual]
 

Reads from the input stream `is'.

Reimplemented from TValidator.

Reimplemented in TRangeValidator.

void TFilterValidator::write ( opstream & os ) [protected, virtual]
 

Writes to the output stream `os'.

Reimplemented from TValidator.

Reimplemented in TRangeValidator.


Member Data Documentation

const char *const TFilterValidator::name [static]
 

Undocumented.

Reimplemented from TValidator.

Reimplemented in TRangeValidator.

Definition at line 567 of file validate.h.

char * TFilterValidator::validChars [protected]
 

Contains the set of all characters the user can type. For example, to allow only numeric digits, set validChars to ['0'..'9']. validChars is set by the `aValidChars' parameter passed to the constructor.

Definition at line 553 of file validate.h.


The documentation for this class was generated from the following file:
Generated at Sat Sep 22 20:19:25 2001 for TVision by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001