FreeTextQuestion Class Reference

#include <FreeTextQuestion.h>

Inheritance diagram for FreeTextQuestion:

Inheritance graph
[legend]
Collaboration diagram for FreeTextQuestion:

Collaboration graph
[legend]

Detailed Description

Question class that allows free-format text input.

Definition at line 39 of file FreeTextQuestion.h.


Public Member Functions

void setOptions (string options)
 Define a list of options to show following the question, to show the user what values are acceptable.
virtual string ask ()
 Ask the question, and return the answer.

Protected Attributes

string mOptions
 List of options to show after the question.

Member Function Documentation

void FreeTextQuestion::setOptions ( string  options  )  [inline]

Define a list of options to show following the question, to show the user what values are acceptable.

Definition at line 46 of file FreeTextQuestion.h.

References mOptions.

Referenced by NumberQuestion::ask(), and MultipleChoiceQuestion::ask().

virtual string FreeTextQuestion::ask (  )  [inline, virtual]

Ask the question, and return the answer.

Implements Question.

Reimplemented in MultipleChoiceQuestion, and NumberQuestion.

Definition at line 54 of file FreeTextQuestion.h.

References Question::explain(), Question::mAnswer, Question::mDefault, mOptions, and Question::mQuestion.

Referenced by add_disks(), NumberQuestion::ask(), MultipleChoiceQuestion::ask(), and main().


Field Documentation

string FreeTextQuestion::mOptions [protected]

List of options to show after the question.

Definition at line 101 of file FreeTextQuestion.h.

Referenced by ask(), and setOptions().


The documentation for this class was generated from the following file:

SourceForge.net Logo
Project space on SourceForge.net