27 [[nodiscard]] std::string
getLine(
unsigned line)
const;
37 return _totalLineCount;
65 int overflow(
int c )
override;
69 std::streamsize xsputn(
const char* s, std::streamsize count)
override;
Special std::streambuf class for capturing lines.
Definition LineBuffer.h:14
LineBuffer(unsigned max_lines)
Constructor settings the maximum lines the buffer can hold.
std::string getLine(unsigned line) const
Returns requested line in the buffer.
int totalLineCount() const
Returns the total lines passed through the fifo buffer.
Definition LineBuffer.h:35
TClosure< void, LineBuffer *, const std::string & > event_t
Closure Event type.
Definition LineBuffer.h:50
const event_t & newLineHandler()
Returns the new line handler.
void setNewLineHandler(const event_t &event)
When a new line is added this event is triggered.
void setMaxLines(unsigned max_lines)
Sets the maximum lines the stream can hold. Flushes all lines first.
~LineBuffer() override
Overridden virtual destructor.
Encapsulates the std::function() template.
Definition TClosure.h:14
Fifo template for classes and structure pointers.
Definition TFifoClass.h:14
#define _MISC_CLASS
Definition misc/global.h:40
Definition Application.h:10