Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
TerminalChatConsole Class Reference

#include <terminal_chat_console.h>

+ Inheritance diagram for TerminalChatConsole:
+ Collaboration diagram for TerminalChatConsole:

Classes

struct  CursesInitHelper
 

Public Member Functions

 TerminalChatConsole ()
 
void setup (ChatInterface *iface, bool *kill_requested, const std::string &nick)
 
virtual void * run ()
 
void clearKillStatus ()
 
void stopAndWaitforThread ()
 
- Public Member Functions inherited from Thread
 Thread (const std::string &name="")
 
virtual ~Thread ()
 
bool start ()
 
bool stop ()
 
bool wait ()
 
bool isCurrentThread ()
 
bool isRunning ()
 
bool stopRequested ()
 
std::thread::id getThreadId ()
 
bool getReturnValue (void **ret)
 
bool bindToProcessor (unsigned int proc_number)
 
bool setPriority (int prio)
 

Private Member Functions

void initOfCurses ()
 
void deInitOfCurses ()
 
void draw_text ()
 
void typeChatMessage (const std::wstring &m)
 
void handleInput (int ch, bool &complete_redraw_needed)
 
void step (int ch)
 

Private Attributes

int m_log_level = LL_ACTION
 
std::string m_nick
 
u8 m_utf8_bytes_to_wait = 0
 
std::string m_pending_utf8_bytes
 
std::set< std::string > m_nicks
 
int m_cols
 
int m_rows
 
bool m_can_draw_text
 
bool * m_kill_requested = nullptr
 
ChatBackend m_chat_backend
 
ChatInterfacem_chat_interface
 
TermLogOutput m_log_output
 
bool m_esc_mode = false
 
u64 m_game_time = 0
 
u32 m_time_of_day = 0
 

Additional Inherited Members

- Static Public Member Functions inherited from Thread
static ThreadgetCurrentThread ()
 
static void setName (const std::string &name)
 
static unsigned int getNumberOfProcessors ()
 
- Protected Attributes inherited from Thread
std::string m_name
 

Constructor & Destructor Documentation

◆ TerminalChatConsole()

TerminalChatConsole::TerminalChatConsole ( )
inline

Member Function Documentation

◆ clearKillStatus()

void TerminalChatConsole::clearKillStatus ( )
inline

References m_kill_requested.

Referenced by run_dedicated_server().

+ Here is the caller graph for this function:

◆ deInitOfCurses()

void TerminalChatConsole::deInitOfCurses ( )
private

Referenced by TerminalChatConsole::CursesInitHelper::~CursesInitHelper().

+ Here is the caller graph for this function:

◆ draw_text()

void TerminalChatConsole::draw_text ( )
private

◆ handleInput()

void TerminalChatConsole::handleInput ( int ch,
bool & complete_redraw_needed )
private

◆ initOfCurses()

void TerminalChatConsole::initOfCurses ( )
private

Referenced by TerminalChatConsole::CursesInitHelper::CursesInitHelper().

+ Here is the caller graph for this function:

◆ run()

virtual void * TerminalChatConsole::run ( )
virtual

Implements Thread.

◆ setup()

void TerminalChatConsole::setup ( ChatInterface * iface,
bool * kill_requested,
const std::string & nick )
inline

References m_chat_interface, m_kill_requested, and m_nick.

Referenced by run_dedicated_server().

+ Here is the caller graph for this function:

◆ step()

void TerminalChatConsole::step ( int ch)
private

◆ stopAndWaitforThread()

void TerminalChatConsole::stopAndWaitforThread ( )

Referenced by fatal_error_fn(), run_dedicated_server(), and sanity_check_fn().

+ Here is the caller graph for this function:

◆ typeChatMessage()

void TerminalChatConsole::typeChatMessage ( const std::wstring & m)
private

Member Data Documentation

◆ m_can_draw_text

bool TerminalChatConsole::m_can_draw_text
private

◆ m_chat_backend

ChatBackend TerminalChatConsole::m_chat_backend
private

◆ m_chat_interface

ChatInterface* TerminalChatConsole::m_chat_interface
private

Referenced by setup().

◆ m_cols

int TerminalChatConsole::m_cols
private

◆ m_esc_mode

bool TerminalChatConsole::m_esc_mode = false
private

◆ m_game_time

u64 TerminalChatConsole::m_game_time = 0
private

◆ m_kill_requested

bool* TerminalChatConsole::m_kill_requested = nullptr
private

Referenced by clearKillStatus(), and setup().

◆ m_log_level

int TerminalChatConsole::m_log_level = LL_ACTION
private

◆ m_log_output

TermLogOutput TerminalChatConsole::m_log_output
private

◆ m_nick

std::string TerminalChatConsole::m_nick
private

Referenced by setup().

◆ m_nicks

std::set<std::string> TerminalChatConsole::m_nicks
private

◆ m_pending_utf8_bytes

std::string TerminalChatConsole::m_pending_utf8_bytes
private

◆ m_rows

int TerminalChatConsole::m_rows
private

◆ m_time_of_day

u32 TerminalChatConsole::m_time_of_day = 0
private

◆ m_utf8_bytes_to_wait

u8 TerminalChatConsole::m_utf8_bytes_to_wait = 0
private

The documentation for this class was generated from the following file: