IGLib 1.4
The IGLib base library for development of numerical, technical and business applications.
|
Utilities for reading from a console. More...
Static Public Member Functions | |
static bool | Read (ref int value) |
Reads an integer from a console and assigns it to a variable. User can input a non-integer to see current content, or insert an empty string to leave the old content. | |
static bool | Read (ref long value) |
Reads an integer (of type long) from a console and assigns it to a variable. User can input a non-integer to see current content, or insert an empty string to leave the old content. | |
static bool | Read (ref double value) |
Reads a floating point number (type double) from a console and assigns it to a variable. User can input a non-integer to see current content, or insert an empty string to leave the old content. | |
static bool | Read (ref float value) |
Reads a floating point number (type float) from a console and assigns it to a variable. User can input a non-integer to see current content, or insert an empty string to leave the old content. | |
static bool | Read (ref bool value) |
Reads a boolean from a console and assigns it to a variable. User can input a non-boolean to see current content, or insert an empty string to leave the old content. Eligible input to assign a new boolean value (strings are not case sensitive!): | |
static bool | Read (ref string value) |
Reads a string from a console and assigns it to a variable. User can input a ? to see current content, or insert an empty string to leave the old content. | |
static bool | Read (ref IVector vec) |
Reads a vector from a console and assigns it to the specified vector variable. | |
static bool | Read (ref IVector vec, string vecName) |
Reads a vector from a console and assigns it to the specified vector variable. | |
static bool | Read (ref IMatrix mat) |
Reads a matrix from console and assigns it to the specified matrix variable. | |
static bool | Read (ref IMatrix mat, string matName) |
Reads a matrix from console and assigns it to the specified matrix variable. | |
static bool | ReadPwd (ref string value, string printchar, bool printrandom) |
Reads a password from console, masking the input as specified. | |
static bool | ReadPwd (ref string value, string printchar) |
Reads a password from console, masking the input as specified. | |
static bool | ReadPwd (ref string value, bool printrandom) |
Reads a password from console, masking the input as specified. | |
static bool | ReadPwd (ref string value) |
Reads a password from console, masking the input by * characters. | |
static void | Examples () |
Protected Attributes | |
const string | _defaultVectorName = "vec" |
const string | _defaultMatrixName = "vec" |
Utilities for reading from a console.
$A Igor Feb10;
static bool IG::Lib::UtilConsole::Read | ( | ref int | value | ) | [inline, static] |
Reads an integer from a console and assigns it to a variable. User can input a non-integer to see current content, or insert an empty string to leave the old content.
value | Variable to which the inserted value is assigned. |
static bool IG::Lib::UtilConsole::Read | ( | ref long | value | ) | [inline, static] |
Reads an integer (of type long) from a console and assigns it to a variable. User can input a non-integer to see current content, or insert an empty string to leave the old content.
value | Variable to which the inserted value is assigned. |
static bool IG::Lib::UtilConsole::Read | ( | ref double | value | ) | [inline, static] |
Reads a floating point number (type double) from a console and assigns it to a variable. User can input a non-integer to see current content, or insert an empty string to leave the old content.
value | Variable to which the inserted value is assigned. |
static bool IG::Lib::UtilConsole::Read | ( | ref float | value | ) | [inline, static] |
Reads a floating point number (type float) from a console and assigns it to a variable. User can input a non-integer to see current content, or insert an empty string to leave the old content.
value | Variable to which the inserted value is assigned. |
static bool IG::Lib::UtilConsole::Read | ( | ref bool | value | ) | [inline, static] |
Reads a boolean from a console and assigns it to a variable. User can input a non-boolean to see current content, or insert an empty string to leave the old content. Eligible input to assign a new boolean value (strings are not case sensitive!):
value | Variable to which the inserted value is assigned. |
static bool IG::Lib::UtilConsole::Read | ( | ref string | value | ) | [inline, static] |
Reads a string from a console and assigns it to a variable. User can input a ? to see current content, or insert an empty string to leave the old content.
value | Variable to which the inserted value is assigned. |
static bool IG::Lib::UtilConsole::Read | ( | ref IVector | vec | ) | [inline, static] |
Reads a vector from a console and assigns it to the specified vector variable.
vec | Vector variable to read-in the vector. |
static bool IG::Lib::UtilConsole::Read | ( | ref IVector | vec, |
string | vecName | ||
) | [inline, static] |
Reads a vector from a console and assigns it to the specified vector variable.
vec | Vector variable to read-in the vector. |
vecName | Name of the vector to be read in (used just in writing help strings to console). If null or empty string then default name is taken. |
static bool IG::Lib::UtilConsole::Read | ( | ref IMatrix | mat | ) | [inline, static] |
Reads a matrix from console and assigns it to the specified matrix variable.
mat | Matrix variable to hold the read-in matrix. |
static bool IG::Lib::UtilConsole::Read | ( | ref IMatrix | mat, |
string | matName | ||
) | [inline, static] |
Reads a matrix from console and assigns it to the specified matrix variable.
mat | Matrix variable to hold the read-in matrix. |
matName | Name of the matrix to be read in (used just in writing help strings to console). If null or empty string then default name is taken. |
static bool IG::Lib::UtilConsole::ReadPwd | ( | ref string | value, |
string | printchar, | ||
bool | printrandom | ||
) | [inline, static] |
Reads a password from console, masking the input as specified.
value | Output parameter where the inserted password is stored. |
printchar | Character that is output to the concole with every character input by the user. |
printrandom | If thrue then random characters are output to console when password characters are typed in. |
static bool IG::Lib::UtilConsole::ReadPwd | ( | ref string | value, |
string | printchar | ||
) | [inline, static] |
Reads a password from console, masking the input as specified.
value | Output parameter where the inserted password is stored. |
printchar | Character that is output to the concole with every character input by the user. |
static bool IG::Lib::UtilConsole::ReadPwd | ( | ref string | value, |
bool | printrandom | ||
) | [inline, static] |
Reads a password from console, masking the input as specified.
value | Output parameter where the inserted password is stored. |
printrandom | If true then a random character (alphabitic or numeric) is prineted for each character typed in. Otherwise, * is printed. |
static bool IG::Lib::UtilConsole::ReadPwd | ( | ref string | value | ) | [inline, static] |
Reads a password from console, masking the input by * characters.
value | Output parameter where the inserted password is stored. |
static void IG::Lib::UtilConsole::Examples | ( | ) | [inline, static] |
const string IG::Lib::UtilConsole::_defaultVectorName = "vec" [protected] |
const string IG::Lib::UtilConsole::_defaultMatrixName = "vec" [protected] |