#include <NumberQuestion.h>


Definition at line 65 of file NumberQuestion.h.
Public Member Functions | |
| void | setRange (int low, int high) |
| Define the allowable range for the answer. | |
| int | getNum () |
| Convert the answer to a number. | |
| virtual string | ask () |
| Ask the question and return the answer. | |
Protected Attributes | |
| int | mLow |
| Low limit of the allowed range. | |
| int | mHigh |
| High limit of the allowed range. | |
| void NumberQuestion::setRange | ( | int | low, | |
| int | high | |||
| ) | [inline] |
Define the allowable range for the answer.
Definition at line 71 of file NumberQuestion.h.
Referenced by add_disks(), and main().
| int NumberQuestion::getNum | ( | ) | [inline] |
Convert the answer to a number.
Definition at line 79 of file NumberQuestion.h.
References Question::mAnswer, and s2i().
Referenced by main().
| virtual string NumberQuestion::ask | ( | ) | [inline, virtual] |
Ask the question and return the answer.
Reimplemented from FreeTextQuestion.
Definition at line 87 of file NumberQuestion.h.
References FreeTextQuestion::ask(), CLogicException, i2s(), Question::mAnswer, mHigh, mLow, s2i(), and FreeTextQuestion::setOptions().
Referenced by add_disks(), and main().
int NumberQuestion::mLow [protected] |
Low limit of the allowed range.
Definition at line 133 of file NumberQuestion.h.
Referenced by ask(), and setRange().
int NumberQuestion::mHigh [protected] |
High limit of the allowed range.
Definition at line 135 of file NumberQuestion.h.
Referenced by ask(), and setRange().