#include <Console.hpp>
Static Public Member Functions | |
static void | error (string message) |
static void | info (string message) |
static bool | promptForBool (string message, bool hasDef, bool def) |
static int | promptForChoice (string message, const vector< string > &choices, bool hasDef=false, int defIndex=-1, bool allowNoChoice=false, string noChoiceMessage=string()) |
static int | promptForInt (string message, int min, int max, bool hasDef, int def) |
static string | promptForString (string message, bool hasDef, string def) |
static void | success (string message) |
static void | warning (string message) |
The Console class offers facilities for interacting with the user through the console on a higher level than the basic functions in the System class. There is a seperate function to log a message at each log level, and there are functions to prompt for various data types, including a choice from a list, with proper validation.
|
static |
Logs an informational message (i.e. at level Error).
|
static |
Logs an informational message (i.e. at level Info).
|
static |
Prompts the console for a yes/no reply within the specified default value, and returns the user's response.
|
static |
Prompts the console for a choice from the specified list, with the specified default, and returns the user's response. The function returns a zero-based index into the choices list. If allowNoChoice is true, the function returns -1 to indicate that no choice was made.
|
static |
Prompts the console for an integer number within the specified range and with the specified default value, and returns the user's response.
|
static |
Prompts the console for a non-empty string with the specified default value, and returns the user's response.
|
static |
Logs an informational message (i.e. at level Success).
|
static |
Logs a warning message (i.e. at level Warning).