Protocol++® (Protocolpp®)
v5.6.2
|
Public Member Functions | |
void | flush (IStringWriter &write) |
Writes out all remaining data from the LineWrapper using write . Unlike process() this method indents all lines including the first and will output a \n at the end (but only if something has been written). | |
void | process (IStringWriter &write, const char *data, int len) |
Process, wrap and output the next piece of data. More... | |
LineWrapper (int x1, int x2) | |
Constructs a LineWrapper that wraps its output to fit into screen columns x1 (incl.) to x2 (excl.). More... | |
|
inline |
Constructs a LineWrapper that wraps its output to fit into screen columns x1
(incl.) to x2
(excl.).
x1
gives the indentation LineWrapper uses if it needs to indent.
|
inline |
Process, wrap and output the next piece of data.
process() will output at least one line of output. This is not necessarily the data
passed in. It may be data queued from a prior call to process(). If the internal buffer is full, more than 1 line will be output.
process() assumes that the a proper amount of indentation has already been output. It won't write any further indentation before the 1st line. If more than 1 line is written due to buffer constraints, the lines following the first will be indented by this method, though.
No \n is written by this method after the last line that is written.
write | where to write the data. |
data | the new chunk of data to write. |
len | the length of the chunk of data to write. |