Represents a console output buffer.
More...
#include <symbols.hpp>
|
| ConsoleOutput (size_t height, size_t width) |
| Creates a new console output buffer.
|
|
void | write (char c, long long dLine, long long dCol, bool updatePos=false) |
| Writes a character to the buffer.
|
|
void | write (char c, const Position &pos, bool updatePos=false) |
| Writes a character to the buffer.
|
|
void | write (const std::string &s, const Position &pos, bool updatePos=false) |
| Writes a string to the buffer.
|
|
std::string | asString () const |
| Gets the buffer as a string.
|
|
|
Position | curPos |
| The current position.
|
|
std::vector< std::vector< char > > | buffer |
| The buffer object.
|
|
size_t | height = 10 |
| The height of the buffer.
|
|
size_t | width = 10 |
| The width of the buffer.
|
|
Represents a console output buffer.
◆ ConsoleOutput()
steppable::prettyPrint::ConsoleOutput::ConsoleOutput |
( |
size_t | height, |
|
|
size_t | width ) |
Creates a new console output buffer.
- Parameters
-
height | The height of the buffer. |
width | The width of the buffer. |
◆ asString()
std::string steppable::prettyPrint::ConsoleOutput::asString |
( |
| ) |
const |
|
nodiscard |
Gets the buffer as a string.
- Returns
- The buffer as a string.
◆ write() [1/3]
void steppable::prettyPrint::ConsoleOutput::write |
( |
char | c, |
|
|
const Position & | pos, |
|
|
bool | updatePos = false ) |
Writes a character to the buffer.
- Parameters
-
c | The character to write. |
pos | The position to write to. |
updatePos | Whether to update the current position. |
◆ write() [2/3]
void steppable::prettyPrint::ConsoleOutput::write |
( |
char | c, |
|
|
long long | dLine, |
|
|
long long | dCol, |
|
|
bool | updatePos = false ) |
Writes a character to the buffer.
- Parameters
-
c | The character to write. |
dLine | The change in line. |
dCol | The change in column. |
updatePos | Whether to update the current position. |
◆ write() [3/3]
void steppable::prettyPrint::ConsoleOutput::write |
( |
const std::string & | s, |
|
|
const Position & | pos, |
|
|
bool | updatePos = false ) |
Writes a string to the buffer.
- Parameters
-
s | The string to write. |
pos | The position to write to. |
updatePos | Whether to update the current position. |
◆ buffer
std::vector<std::vector<char> > steppable::prettyPrint::ConsoleOutput::buffer |
|
private |
◆ curPos
Position steppable::prettyPrint::ConsoleOutput::curPos |
|
private |
◆ height
size_t steppable::prettyPrint::ConsoleOutput::height = 10 |
|
private |
The height of the buffer.
◆ width
size_t steppable::prettyPrint::ConsoleOutput::width = 10 |
|
private |
The documentation for this class was generated from the following files: