class OutputBuffer

Defined at line 106 of file ../../src/developer/debug/zxdb/console/output_buffer.h

This class collects output from commands so it can be put on the screen in

one chunk. It's not just a string because we want to add helper functions

and may want to add things like coloring in the future.

Public Methods

std::vector<Span> & spans ()

Defined at line 147 of file ../../src/developer/debug/zxdb/console/output_buffer.h

const std::vector<Span> & spans ()

Defined at line 148 of file ../../src/developer/debug/zxdb/console/output_buffer.h

bool empty ()

Defined at line 150 of file ../../src/developer/debug/zxdb/console/output_buffer.h

void OutputBuffer ()

Defined at line 248 of file ../../src/developer/debug/zxdb/console/output_buffer.cc

void OutputBuffer (std::string str, TextForegroundColor fg, TextBackgroundColor bg)

Creates an output buffer with one substring in it.

Defined at line 250 of file ../../src/developer/debug/zxdb/console/output_buffer.cc

void OutputBuffer (Syntax syntax, std::string str)

Defined at line 254 of file ../../src/developer/debug/zxdb/console/output_buffer.cc

void ~OutputBuffer ()

Defined at line 258 of file ../../src/developer/debug/zxdb/console/output_buffer.cc

void Append (std::string str, TextForegroundColor fg, TextBackgroundColor bg)

Appends the given type.

Defined at line 260 of file ../../src/developer/debug/zxdb/console/output_buffer.cc

void Append (Syntax syntax, std::string str)

Defined at line 264 of file ../../src/developer/debug/zxdb/console/output_buffer.cc

void Append (OutputBuffer buffer)

Defined at line 268 of file ../../src/developer/debug/zxdb/console/output_buffer.cc

void Append (const Err & err)

Defined at line 273 of file ../../src/developer/debug/zxdb/console/output_buffer.cc

void Append (Span span)

Defined at line 275 of file ../../src/developer/debug/zxdb/console/output_buffer.cc

void FormatHelp (const std::string & str)

Outputs the given help string, applying help-style formatting.

Defined at line 277 of file ../../src/developer/debug/zxdb/console/output_buffer.cc

void WriteToStdout (bool add_newline)

Writes the current contents of this OutputBuffer to stdout.

Defined at line 292 of file ../../src/developer/debug/zxdb/console/output_buffer.cc

std::string AsString ()

Concatenates to a single string with no formatting.

Defined at line 323 of file ../../src/developer/debug/zxdb/console/output_buffer.cc

size_t UnicodeCharWidth ()

Returns the number of Unicode characters in the buffer. Backed by the

version in string_util.h, see that for documentation.

Defined at line 330 of file ../../src/developer/debug/zxdb/console/output_buffer.cc

void TrimTrailingNewlines ()

Removes all trailing newlines from the buffer. This is sometimes necessary when putting one

buffer inside another that might otherwise be designed to be standalone (and include a

newline).

Defined at line 337 of file ../../src/developer/debug/zxdb/console/output_buffer.cc

void Clear ()

Defined at line 350 of file ../../src/developer/debug/zxdb/console/output_buffer.cc

std::string GetDebugString ()

Formats this buffer's formatting into a text form for testing. It will be

normalized (so adjacent spans of the same format will be combined).

The format is

<format

> "<text>",

<format

> "<text>", ...

The format is the syntax enum name, and if either foreground or background

are non-default, background and foreground, they will both follow (always

together), separated by spaces. So:

kComment "foo", kNormal kGreen kGray "bar"

Defined at line 370 of file ../../src/developer/debug/zxdb/console/output_buffer.cc

bool operator== (const OutputBuffer & other)

Defined at line 396 of file ../../src/developer/debug/zxdb/console/output_buffer.cc

Records