Loading...
Searching...
No Matches
LineBuffer Class Reference

After appending, data can be retrieved as lines. More...

`#include <line_buffer.h>`

## Public Member Functions

void | append (const char *line, size_t size)
| Insert data in buffer.
bool | has_lines ()
| Check if get_next_line() returns a non-empty string.
const char * | c_str ()
| Peek the complete buffer contents.
std::string | get_next_line ()
| Return and remove first line in buffer, possibly "".

## Detailed Description

After appending, data can be retrieved as lines.

Definition at line 23 of file line_buffer.h.

## Constructor & Destructor Documentation

## LineBuffer()

LineBuffer::LineBuffer | ( |  | ) |

Definition at line 56 of file line_buffer.cpp.

## Member Function Documentation

## append()

void LineBuffer::append | ( | const char * | line,
|  | size_t | size )

Insert data in buffer.

Definition at line 28 of file line_buffer.cpp.

## c_str()

const char * LineBuffer::c_str | ( |  | ) |

Peek the complete buffer contents.

Definition at line 34 of file line_buffer.cpp.

## get_next_line()

std::string LineBuffer::get_next_line | ( |  | ) |

Return and remove first line in buffer, possibly "".

Definition at line 40 of file line_buffer.cpp.

## has_lines()

bool LineBuffer::has_lines | ( |  | ) |

Check if get_next_line() returns a non-empty string.

Definition at line 22 of file line_buffer.cpp.

The documentation for this class was generated from the following files:

- line_buffer.h
- line_buffer.cpp