#include <rtsystem.h>
Public Types | |
| typedef void(* | BreakFunction )(BreakType) |
| A break handler function (see System::setOnBreak()). | |
| enum | BreakType { CTRL_C, TERMINATE } |
| Possible break types. More... | |
Static Public Methods | |
| void | setAppName (const String &appName) |
| Sets the application name. More... | |
| void | setInteractive (bool) |
| Sets if we're in interactive mode. More... | |
| bool | isInteractive () |
| Returns the current interactive mode. | |
| void | message (const String &str) |
| Print a message to the user. More... | |
| void | exit () |
| Exits the application. | |
| void | exit (int) |
| Exits the application with a specified return code. | |
| void | exit (int, const String &) |
| Exits the application abnormally, with a specified return code and error message. | |
| void | exit (int, const char *) |
| Exits the application abnormally, with a specified return code and error message. More... | |
| void | setOnBreak (BreakFunction func, bool catchKill) |
| Sets a signal handler function, which will be called when the user presses CTRL+C on the command line. More... | |
| void | print (const char *cStr) |
| Prints some characters to the system console. | |
| void | print (const String &str) |
| Prints a String to the system console. | |
| void | println () |
| Prints a newline to the system console. | |
| void | println (const String &str) |
| Prints a String to the console and finishes the line. | |
| char | read () |
| Reads a single character from the system input. More... | |
| String | readLine (const String &query) |
| Reads a whole line from the system input. More... | |
| void | setPos (int x, int y) |
| Sets the console position to these new coordinates. | |
| bool | isLittleEndian () |
Returns true if the underlying system is little-endian, false if it is big-endian. | |
| void | fillMemory (void *ptr, int length, char value) |
| Fills a block of memory with the given byte value. More... | |
| void | copyMemory (const void *src, void *dest, int length) |
| Copies a given block of memory. More... | |
Static Public Attributes | |
| BreakFunction | lastBreakFunction = 0 |
|
|
Possible break types.
|
|
||||||||||||||||
|
Copies a given block of memory.
|
|
||||||||||||
|
Exits the application abnormally, with a specified return code and error message. Note: There are some places where you can't even use lrt::String. |
|
||||||||||||||||
|
Fills a block of memory with the given byte value.
|
|
|
Print a message to the user. If we're in interactive mode and it is supported on the current system, a GUI element (message box) will be used to present the message. Otherwise, the console will be used. |
|
|
Reads a single character from the system input. (This is usually the keyboard.) |
|
|
Reads a whole line from the system input.
(This is usually the keyboard.) The line ending character (usually '
|
|
|
Sets the application name. It is used in message box titles, for example. |
|
|
Sets if we're in interactive mode.
By default, this is true. If libRT is in interactive mode, some actions may be presented to the user using GUI elements (message boxes), e.g. the functions |
|
||||||||||||
|
Sets a signal handler function, which will be called when the user presses CTRL+C on the command line. As soon as you set such a signal handler, the program will no longer just exit (which it would do otherwise); instead your function will be called, whereafter the program continues normally.
|