#include <MenuAnswer.h>
Public Methods | |
| MenuAnswer (const String &command) | |
| ~MenuAnswer () | |
| void | operator= (const String &answer) |
| String | get () |
| String | getExample () |
| String | getOriginalString () |
| String | getAssociatedCommand () |
| bool | ok () const |
| int | getNoAnswers () |
| void | setCurrentAnswer (int i) |
| int | getCurrentAnswer () |
| bool | multipleAnswers () const |
| const VecSimple(String)& | answerStrings () const |
| void | print (Os s_o) const |
NAME: MenuAnswer - represents (multiple) answer(s) in a MenuSystem
DESCRIPTION:
The class is used to expand an answer given in a compact form. This answer is supposed to describe a domain and to give the gridspacing for the computations. The answer (=value) can e.g. be on the form
"value: d=2, [0,{1&3}]x[0,1], index: [1:{20&40}]x[1:{10:100,10}]"
d=2, [0,
|
1 - 3
|
]x[0,1], index: [1:
|
20 - 40
|
]x[1:
|
10 - 20 - 30 - ..... - 100
|
]
|
|
There is one constructor without arguments. |
|
|
|
|
|
returns the vector that contains the different strings. |
|
|
returns the string in position "current" in the vector "answer". |
|
|
returns the name of the command of the menu item that is associated with this answer object. |
|
|
returns "current". |
|
|
returns an example of an answer string. Used for checking valid syntax of input string. |
|
|
returns the number of strings that the input string given to "operator=" resulted in. |
|
|
|
|
|
|
|
|
|
|
|
expands the string "answer" and converts the list of combinations to a vector of combinations. |
|
|
|
|
|
set "current" to a given int. |