class Console
Defined at line 23 of file ../../src/developer/debug/zxdb/console/console.h
Protected Members
ConsoleContext context_
Public Methods
void Console (Session * session)
Defined at line 15 of file ../../src/developer/debug/zxdb/console/console.cc
void ~Console ()
Defined at line 21 of file ../../src/developer/debug/zxdb/console/console.cc
Console * get ()
Defined at line 28 of file ../../src/developer/debug/zxdb/console/console.h
ConsoleContext & context ()
Defined at line 30 of file ../../src/developer/debug/zxdb/console/console.h
fxl::WeakPtr<Console> GetWeakPtr ()
Defined at line 31 of file ../../src/developer/debug/zxdb/console/console.cc
void Init ()
Initializes |context_| and does any work that should happen before the console is ready to
accept input from the user. |context_| is responsible for enabling and disabling input and
output as appropriate after this is called.
void Quit ()
Causes the message loop to exit the next time through.
void Output (const OutputBuffer & output, bool add_newline)
Prints the buffer/string to the console.
Defined at line 33 of file ../../src/developer/debug/zxdb/console/console.cc
void Output (const std::string & s)
Defined at line 39 of file ../../src/developer/debug/zxdb/console/console.cc
void Output (const Err & err)
Defined at line 45 of file ../../src/developer/debug/zxdb/console/console.cc
void Stream (const OutputBuffer & output)
Writes the given output to the console if streaming is enabled.
Defined at line 72 of file ../../src/developer/debug/zxdb/console/console.cc
void Output (fxl::RefPtr<AsyncOutputBuffer> output)
Synchronously prints the output if the async buffer is complete. Otherwise adds a listener and
prints the output to the console when it is complete.
Defined at line 51 of file ../../src/developer/debug/zxdb/console/console.cc
void Write (const OutputBuffer & output, bool add_newline)
Writes the given output to the console.
void Clear ()
Clears the contents of the console.
void ModalGetOption (const line_input::ModalPromptOptions & options, OutputBuffer message, const std::string & prompt, line_input::ModalLineInput::ModalCompletionCallback cb)
Asks the user a question. The possible answers are stored in the options struct.
Callers should pass anything they want to print above the prompt in the |message|. It's
important to do this instead of calling Output() followed by ModalGetOption() because there
can theoretically be multiple prompts pending (in case they're triggered by async events)
and the message passed here will always get printed above the prompt when its turn comes.
void ProcessInputLine (const std::string & line, fxl::RefPtr<CommandContext> cmd_context, bool add_to_history)
Parses and dispatches the given line of input. By providing different |cmd_context|, the output
could be redirected or outputted.
When posting programmatic commands, set add_to_history = false or the command will confusingly
appear as the "last command" (when they hit enter again) and in the "up" history.
void EnableInput ()
void DisableInput ()
void EnableOutput ()
Defined at line 80 of file ../../src/developer/debug/zxdb/console/console.cc
void DisableOutput ()
Defined at line 82 of file ../../src/developer/debug/zxdb/console/console.cc
void EnableStreaming ()
Defined at line 84 of file ../../src/developer/debug/zxdb/console/console.cc
void DisableStreaming ()
Defined at line 86 of file ../../src/developer/debug/zxdb/console/console.cc
void WriteLog (debug::LogSeverity severity, const debug::FileLineFunction & location, std::string log)
Implements |LogBackend|.
Defined at line 88 of file ../../src/developer/debug/zxdb/console/console.cc