|
jaffarCommon
|
Contains common functions related to output and logging using NCurses. More...
#include "../string.hpp"#include <ncurses.h>#include <stdarg.h>#include <stdexcept>#include <stdio.h>#include <unistd.h>
Go to the source code of this file.
Functions | |
| template<typename... Args> | |
| __JAFFAR_COMMON__INLINE__ void | jaffarCommon::logger::log (const char *f, Args... args) |
| __JAFFAR_COMMON__INLINE__ int | jaffarCommon::logger::kbhit () |
| __JAFFAR_COMMON__INLINE__ int | jaffarCommon::logger::waitForKeyPress () |
| __JAFFAR_COMMON__INLINE__ int | jaffarCommon::logger::getKeyPress () |
| __JAFFAR_COMMON__INLINE__ void | jaffarCommon::logger::initializeTerminal () |
| __JAFFAR_COMMON__INLINE__ void | jaffarCommon::logger::clearTerminal () |
| __JAFFAR_COMMON__INLINE__ void | jaffarCommon::logger::finalizeTerminal () |
| __JAFFAR_COMMON__INLINE__ void | jaffarCommon::logger::refreshTerminal () |
Variables | |
| static bool | jaffarCommon::logger::_useNCurses = false |
Contains common functions related to output and logging using NCurses.
| __JAFFAR_COMMON__INLINE__ void jaffarCommon::logger::clearTerminal | ( | ) |
Clears the NCurses terminal
| __JAFFAR_COMMON__INLINE__ void jaffarCommon::logger::finalizeTerminal | ( | ) |
Finalizes the NCurses terminal
| __JAFFAR_COMMON__INLINE__ int jaffarCommon::logger::getKeyPress | ( | ) |
Returns any pending key pressed.
| __JAFFAR_COMMON__INLINE__ void jaffarCommon::logger::initializeTerminal | ( | ) |
Initializes the NCurses terminal
| __JAFFAR_COMMON__INLINE__ int jaffarCommon::logger::kbhit | ( | ) |
Function to check the keyboard buffer for whether there have been any keypress
| __JAFFAR_COMMON__INLINE__ void jaffarCommon::logger::log | ( | const char * | f, |
| Args... | args | ||
| ) |
Prints the specified formatted string to the NCurses or normal terminal, as configured
| [in] | f | The formatted string |
| [in] | args | The arguments to the formatted string |
| __JAFFAR_COMMON__INLINE__ void jaffarCommon::logger::refreshTerminal | ( | ) |
Refreshes the NCurses terminal. This is necessary after every logging operation to update the screen.
| __JAFFAR_COMMON__INLINE__ int jaffarCommon::logger::waitForKeyPress | ( | ) |
Stalls execution until a key is pressed. It will only return upon the first key press and will report which key it was
|
static |
A global setting to store whether NCurses or the normal terminal should be used