#include <validate.h>
Inheritance diagram for TRangeValidator::
Public Methods | |
TRangeValidator (long aMin, long aMax) | |
virtual void | error () |
virtual Boolean | isValid (const char *s) |
virtual ushort | transfer (char *s, void *buffer, TVTransfer flag) |
Static Public Methods | |
TStreamable* | build () |
Static Public Attributes | |
const char* const | name |
Protected Methods | |
TRangeValidator (StreamableInit) | |
virtual void | write (opstream &os) |
virtual void* | read (ipstream &is) |
Protected Attributes | |
long | min |
long | max |
Definition at line 606 of file validate.h.
|
Constructs a range validator object by first calling the constructor inherited from TFilterValidator, passing a set of characters containing the digits '0'..'9' and the characters '+' and '-'. Sets min to `aMin' and max to `aMax', establishing the range of acceptable long integer values. |
|
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. |
|
Called to create an object in certain stream-reading situations. Reimplemented from TFilterValidator. |
|
Displays a message box indicating that the entered value did not fall in the specified range. Reimplemented from TFilterValidator. |
|
Converts the string `s' into an integer number and returns True if the result meets all three of these conditions:
Reimplemented from TFilterValidator. |
|
Reads from the input stream `is'. Reimplemented from TFilterValidator. |
|
Incorporates the three functions TInputLine::dataSize(), TInputLine::getData(), and TInputLine::setData() that a range validator can handle for its associated input line. Instead of setting and reading the value of the numeric input line by passing a string representation of the number, transfer() can use a long int as its data record, which keeps your application from having to handle the conversion. `s' is the input line's string value, and `buffer' is the data record passed to the input line. Depending on the value of `flag', transfer either sets `s' from the number in `buffer' or sets the number at `buffer' to the value of the string `s'. If `flag' is vtSetData, transfer() sets `s' from `buffer'. If `flag' is vtGetData, transfer() sets `buffer' from `s'. If `flag' is vtDataSize, transfer() neither sets nor reads data. transfer() always returns the size of the data transferred, in this case the size of a long int.
Reimplemented from TValidator. |
|
Writes to the output stream `os'. Reimplemented from TFilterValidator. |
|
max is the highest valid long integer value for the input line. Definition at line 679 of file validate.h. |
|
min is the lowest valid long integer value for the input line. Definition at line 675 of file validate.h. |
|
Undocumented. Reimplemented from TFilterValidator. Definition at line 708 of file validate.h. |