![]() |
Scanframe Modular Application 0.1.0
|
Special std::streambuf class for capturing lines. More...
#include <LineBuffer.h>
Public Types | |
typedef TClosure< void, LineBuffer *, const std::string & > | event_t |
Closure Event type. | |
Public Member Functions | |
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 event_t &event) |
When a new line is added this event is triggered. | |
const event_t & | newLineHandler () |
Returns the new line handler. | |
Special std::streambuf class for capturing lines.
typedef TClosure<void, LineBuffer* , const std::string& > sf::LineBuffer::event_t |
Closure Event type.
|
explicit |
Constructor settings the maximum lines the buffer can hold.
|
override |
Overridden virtual destructor.
void sf::LineBuffer::clear | ( | ) |
Clears the current line buffer.
std::string sf::LineBuffer::getLine | ( | unsigned | line | ) | const |
Returns requested line in the buffer.
int sf::LineBuffer::lineCount | ( | ) | const |
Returns the amount of lines in the buffer.
const event_t & sf::LineBuffer::newLineHandler | ( | ) |
Returns the new line handler.
void sf::LineBuffer::setMaxLines | ( | unsigned | max_lines | ) |
Sets the maximum lines the stream can hold. Flushes all lines first.
void sf::LineBuffer::setNewLineHandler | ( | const event_t & | event | ) |
When a new line is added this event is triggered.
|
inline |
Returns the total lines passed through the fifo buffer.