|
Panini 1.4.0
Header-only library for generating C++, written in C++17
|
Writes output to the console line-by-line. More...
#include <DebugWriter.hpp>
Classes | |
| struct | Colors |
| Colors used in the console output. More... | |
Public Member Functions | |
| DebugWriter (const DebugWriterConfig &config=DebugWriterConfig{}) | |
| ~DebugWriter () override | |
| bool | IsChanged () const override |
Public Member Functions inherited from panini::ConfiguredWriter< DebugWriterConfig > | |
| ConfiguredWriter (const DebugWriterConfig &config=DebugWriterConfig {}) | |
| virtual | ~ConfiguredWriter ()=default |
| const WriterConfig & | GetConfig () const override |
| BraceBreakingStyle | GetBraceBreakingStyle () const override |
| IncludeStyle | GetIncludeStyle () const override |
| bool | IsOnNewLine () const override |
| Writer & | operator<< (const std::string &chunk) override |
| Writer & | operator<< (const char *chunkString) override |
| Writer & | operator<< (const NextLine &command) override |
| Writer & | operator<< (const IndentPush &command) override |
| Writer & | operator<< (const IndentPop &command) override |
| Writer & | operator<< (Command &&command) override |
| void | SetIsInCommentBlock (bool value) override |
| bool | Commit (bool force=false) override |
Public Member Functions inherited from panini::Writer | |
| virtual | ~Writer ()=default |
Protected Member Functions | |
| void | Write (const std::string &chunk) override |
| void | WriteNewLine () override |
| bool | OnCommit (bool force=false) override |
| void | SetCursorPosition (int32_t x, int32_t y) |
| void | SetColor (uint16_t background, uint16_t foreground) |
| void | ResetStyles () |
| void | WriteChunk (const std::string &chunk) |
| void | HandleInput (const std::string &message) |
Protected Member Functions inherited from panini::ConfiguredWriter< DebugWriterConfig > | |
| void | WriteNewLine () override |
Protected Attributes | |
| DebugWriterConfig | m_debugConfig |
| bool | m_initialized = false |
| bool | m_isDebugging = true |
| int32_t | m_cursorX = 0 |
| int32_t | m_cursorY = 0 |
| int32_t | m_consoleWidth = 0 |
| int32_t | m_consoleHeight = 0 |
Protected Attributes inherited from panini::ConfiguredWriter< DebugWriterConfig > | |
| DebugWriterConfig | m_config |
Writes output to the console line-by-line.
The DebugWriter will halt execution every time it receives a NextLine command. The writer will wait for user input to either continue debugging or stop execution.
Line numbers are displayed before the output and special characters like indentation and new lines are highlighted in the output.
Note that the DebugWriter only works correctly on Windows right now.
|
inlineexplicit |
Construct and configure the writer.
| config | Configuration instance. |
|
inlineoverride |
Will call Commit() automatically when the writer is destroyed.
|
inlineprotected |
Handle user input.
|
inlineoverridevirtual |
Always handle remaining input when Commit is called.
Reimplemented from panini::ConfiguredWriter< DebugWriterConfig >.
|
inlineoverrideprotectedvirtual |
Checks if the writer should commit its output to the target.
Implements panini::Writer.
|
inlineprotected |
Reset colors to the default white on black color scheme.
|
inlineprotected |
Sets the background and foreground colors used for the output.
|
inlineprotected |
Moves the cursor in the console window.
|
inlineoverrideprotectedvirtual |
Writes the chunk to the console.
Implements panini::Writer.
|
inlineprotected |
Internal method for writing a chunk to the console window, clipping it and pushing it to the next line if it's too long.
|
inlineoverrideprotectedvirtual |
Writes a new line chunk to the output.
Implements panini::Writer.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |