|
inkcpp
|
An ink choice that is being presented to the user. More...
#include <choice.h>
Public Member Functions | |
| int | index () const |
| Choice index. | |
| const char * | text () const |
| Choice text. | |
| bool | has_tags () const |
| does this choice has tags? | |
| size_t | num_tags () const |
| number of tags associated with this choice | |
| const char * | get_tag (size_t index) const |
| Access a tag by index. | |
Friends | |
| class | internal::runner_impl |
An ink choice that is being presented to the user.
Contains all the data about a single choice being faced by an ink runner. Of primary concern is the index and the text.
| const char * ink::runtime::choice::get_tag | ( | size_t | index | ) | const |
Access a tag by index.
Note that this method only allows the retrieval of tags attached to the current line. For tags at the top of the script, use get_global_tag()
| index | tag id to fetch [0;num_tags()) |
|
inline |
Choice index.
Pass this to the runner to choose this choice and have it follow its branch.
| size_t ink::runtime::choice::num_tags | ( | ) | const |
number of tags associated with this choice
|
inline |
Choice text.
Text to display to the user for choosing this choice.