The text log in the game.
More...
#include <game_log.h>
|
| | game_log (const double display_time_secs) |
| |
| void | add_message (const message &m) noexcept |
| | Add a message, timestamp will be added.
|
| |
| std::string | get_last_messages (const chess_color color) const |
| | Get the last messages that were emitted at most 'max_elapsed_time_secs' seconds ago, as a (possibly) multi-line string, for a specific color.
|
| |
| void | tick () |
| | Update, so old messages are removed.
|
| |
The text log in the game.
- Note
- This class cannot be called
log, due to conflicts with std::log
◆ game_log()
| game_log::game_log |
( |
const double |
display_time_secs | ) |
|
|
explicit |
- Parameters
-
| display_time_secs | the time a message will be displayed |
◆ add_message()
| void game_log::add_message |
( |
const message & |
m | ) |
|
|
noexcept |
Add a message, timestamp will be added.
◆ get_last_messages()
| std::string game_log::get_last_messages |
( |
const chess_color |
color | ) |
const |
Get the last messages that were emitted at most 'max_elapsed_time_secs' seconds ago, as a (possibly) multi-line string, for a specific color.
◆ tick()
Update, so old messages are removed.
The documentation for this class was generated from the following files: