Global game console backend.
More...
#include <Console.h>
|
enum | MessageType {
CONSOLE_HELP,
CONSOLE_TITLE,
CONSOLE_SYSTEM_NOTICE,
CONSOLE_SYSTEM_ERROR,
CONSOLE_SYSTEM_WARNING,
CONSOLE_SYSTEM_REPLY,
CONSOLE_SYSTEM_NETCHAT
} |
|
enum | MessageArea {
CONSOLE_MSGTYPE_INFO,
CONSOLE_MSGTYPE_LOG,
CONSOLE_MSGTYPE_SCRIPT,
CONSOLE_MSGTYPE_ACTOR,
CONSOLE_MSGTYPE_TERRN
} |
|
typedef std::unordered_map< std::string, CVar * > | CVarPtrMap |
|
typedef std::unordered_map< std::string, ConsoleCmd * > | CommandPtrMap |
|
|
void | putMessage (MessageArea area, MessageType type, std::string const &msg, std::string icon="") |
|
void | putNetMessage (int user_id, MessageType type, const char *text) |
|
void | forwardLogMessage (MessageArea area, std::string const &msg, Ogre::LogMessageLevel lml) |
|
unsigned long | queryMessageTimer () |
|
void | regBuiltinCommands () |
| Register builtin commands. More...
|
|
void | doCommand (std::string msg) |
| Identify and execute any console line. More...
|
|
CVar * | cVarCreate (std::string const &name, std::string const &long_name, int flags, std::string const &val=std::string()) |
| Add CVar and parse default value if specified. More...
|
|
void | cVarAssign (CVar *cvar, std::string const &value) |
| Parse value by cvar type. More...
|
|
CVar * | cVarFind (std::string const &input_name) |
| Find cvar by short/long name. More...
|
|
CVar * | cVarSet (std::string const &input_name, std::string const &input_val) |
| Set existing cvar by short/long name. Return the modified cvar (or NULL if not found) More...
|
|
CVar * | cVarGet (std::string const &input_name, int flags) |
| Get cvar by short/long name, or create new one using input as short name. More...
|
|
void | cVarSetupBuiltins () |
| Create builtin vars and set defaults. More...
|
|
CVarPtrMap & | getCVars () |
|
CommandPtrMap & | getCommands () |
|
void | processCommandLine (int argc, char *argv[]) |
|
void | showCommandLineUsage () |
|
void | showCommandLineVersion () |
|
void | loadConfig () |
|
void | saveConfig () |
|
|
virtual void | messageLogged (const Ogre::String &message, Ogre::LogMessageLevel lml, bool maskDebug, const Ogre::String &logName, bool &skipThisMessage) override |
|
void | handleMessage (MessageArea area, MessageType type, std::string const &msg, int net_id=0, std::string icon="") |
|
Global game console backend.
Frontend is RoR::GUI::ConsoleView.
Definition at line 40 of file Console.h.
◆ CommandPtrMap
◆ CVarPtrMap
◆ MessageArea
Enumerator |
---|
CONSOLE_MSGTYPE_INFO | Generic message.
|
CONSOLE_MSGTYPE_LOG | Logfile echo.
|
CONSOLE_MSGTYPE_SCRIPT | Messages sent from scripts.
|
CONSOLE_MSGTYPE_ACTOR | Parsing/spawn/simulation messages for actors.
|
CONSOLE_MSGTYPE_TERRN | Parsing/spawn/simulation messages for terrain.
|
Definition at line 58 of file Console.h.
◆ MessageType
Enumerator |
---|
CONSOLE_HELP | |
CONSOLE_TITLE | |
CONSOLE_SYSTEM_NOTICE | |
CONSOLE_SYSTEM_ERROR | |
CONSOLE_SYSTEM_WARNING | |
CONSOLE_SYSTEM_REPLY | Success.
|
CONSOLE_SYSTEM_NETCHAT | |
Definition at line 46 of file Console.h.
◆ cVarAssign()
void Console::cVarAssign |
( |
CVar * |
cvar, |
|
|
std::string const & |
value |
|
) |
| |
Parse value by cvar type.
Definition at line 230 of file CVar.cpp.
◆ cVarCreate()
CVar * Console::cVarCreate |
( |
std::string const & |
name, |
|
|
std::string const & |
long_name, |
|
|
int |
flags, |
|
|
std::string const & |
val = std::string() |
|
) |
| |
Add CVar and parse default value if specified.
Definition at line 206 of file CVar.cpp.
◆ cVarFind()
CVar * Console::cVarFind |
( |
std::string const & |
input_name | ) |
|
Find cvar by short/long name.
Definition at line 248 of file CVar.cpp.
◆ cVarGet()
CVar * Console::cVarGet |
( |
std::string const & |
input_name, |
|
|
int |
flags |
|
) |
| |
Get cvar by short/long name, or create new one using input as short name.
Definition at line 276 of file CVar.cpp.
◆ cVarSet()
CVar * Console::cVarSet |
( |
std::string const & |
input_name, |
|
|
std::string const & |
input_val |
|
) |
| |
Set existing cvar by short/long name. Return the modified cvar (or NULL if not found)
Definition at line 265 of file CVar.cpp.
◆ cVarSetupBuiltins()
void Console::cVarSetupBuiltins |
( |
| ) |
|
Create builtin vars and set defaults.
Definition at line 29 of file CVar.cpp.
◆ forwardLogMessage()
void Console::forwardLogMessage |
( |
MessageArea |
area, |
|
|
std::string const & |
msg, |
|
|
Ogre::LogMessageLevel |
lml |
|
) |
| |
◆ getCommands()
◆ getCVars()
◆ handleMessage()
void Console::handleMessage |
( |
MessageArea |
area, |
|
|
MessageType |
type, |
|
|
std::string const & |
msg, |
|
|
int |
net_id = 0 , |
|
|
std::string |
icon = "" |
|
) |
| |
|
private |
◆ loadConfig()
void Console::loadConfig |
( |
| ) |
|
◆ messageLogged()
void Console::messageLogged |
( |
const Ogre::String & |
message, |
|
|
Ogre::LogMessageLevel |
lml, |
|
|
bool |
maskDebug, |
|
|
const Ogre::String & |
logName, |
|
|
bool & |
skipThisMessage |
|
) |
| |
|
overrideprivatevirtual |
◆ processCommandLine()
void Console::processCommandLine |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
◆ putMessage()
void Console::putMessage |
( |
MessageArea |
area, |
|
|
MessageType |
type, |
|
|
std::string const & |
msg, |
|
|
std::string |
icon = "" |
|
) |
| |
◆ putNetMessage()
void Console::putNetMessage |
( |
int |
user_id, |
|
|
MessageType |
type, |
|
|
const char * |
text |
|
) |
| |
◆ queryMessageTimer()
unsigned long RoR::Console::queryMessageTimer |
( |
| ) |
|
|
inline |
◆ saveConfig()
void Console::saveConfig |
( |
| ) |
|
◆ showCommandLineUsage()
void Console::showCommandLineUsage |
( |
| ) |
|
◆ showCommandLineVersion()
void Console::showCommandLineVersion |
( |
| ) |
|
◆ m_commands
◆ m_cvars
◆ m_cvars_longname
◆ m_messages
std::vector<Message> RoR::Console::m_messages |
|
private |
◆ m_messages_mutex
std::mutex RoR::Console::m_messages_mutex |
|
private |
◆ m_msg_timer
Ogre::Timer RoR::Console::m_msg_timer |
|
private |
The documentation for this class was generated from the following files: