Special std::streambuf class for capturing lines.
More...
#include <LineBuffer.h>
|
| typedef TClosure< void, LineBuffer *, const std::string * > | handler_type |
| | Closure handler type to handle buffer changes. When the std:string line argument is a nullptr the buffer it signals clearing the viewer.
|
| |
|
| | LineBuffer (unsigned max_lines) |
| | Constructor settings the maximum lines the buffer can hold.
|
| |
| | ~LineBuffer () override |
| | Overridden virtual destructor.
|
| |
| std::string | getLine (unsigned line) const |
| | Returns requested line in the buffer.
|
| |
| int | lineCount () const |
| |
| int | totalLineCount () const |
| | Returns the total lines passed through the fifo buffer.
|
| |
| void | clear () |
| |
| void | setMaxLines (unsigned max_lines) |
| | Sets the maximum lines the stream can hold. Flushes all lines first.
|
| |
| void | setNewLineHandler (const handler_type &event) |
| | When a new line is added this event is triggered.
|
| |
| const handler_type & | newLineHandler () |
| | Returns the new line handler.
|
| |
|
| static constexpr std::streambuf::char_type | clearChar = '\x12' |
| | Character which clears the buffer when it is encountered.
|
| |
Special std::streambuf class for capturing lines.
◆ handler_type
Closure handler type to handle buffer changes. When the std:string line argument is a nullptr the buffer it signals clearing the viewer.
◆ LineBuffer()
| sf::LineBuffer::LineBuffer |
( |
unsigned |
max_lines | ) |
|
|
explicit |
Constructor settings the maximum lines the buffer can hold.
◆ ~LineBuffer()
| sf::LineBuffer::~LineBuffer |
( |
| ) |
|
|
override |
Overridden virtual destructor.
◆ clear()
| void sf::LineBuffer::clear |
( |
| ) |
|
Clears the current line buffer.
◆ getLine()
| std::string sf::LineBuffer::getLine |
( |
unsigned |
line | ) |
const |
Returns requested line in the buffer.
◆ lineCount()
| int sf::LineBuffer::lineCount |
( |
| ) |
const |
Returns the amount of lines in the buffer.
◆ newLineHandler()
Returns the new line handler.
- Returns
- the Handler.
◆ setMaxLines()
| void sf::LineBuffer::setMaxLines |
( |
unsigned |
max_lines | ) |
|
Sets the maximum lines the stream can hold. Flushes all lines first.
◆ setNewLineHandler()
| void sf::LineBuffer::setNewLineHandler |
( |
const handler_type & |
event | ) |
|
When a new line is added this event is triggered.
◆ totalLineCount()
| int sf::LineBuffer::totalLineCount |
( |
| ) |
const |
Returns the total lines passed through the fifo buffer.
◆ clearChar
| constexpr std::streambuf::char_type sf::LineBuffer::clearChar = '\x12' |
|
staticconstexpr |
Character which clears the buffer when it is encountered.
The documentation for this class was generated from the following file: