LIRC libraries
LinuxInfraredRemoteControl
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. More...
 
bool has_lines ()
 Check if get_next_line() returns a non-empty string. More...
 
const char * c_str ()
 Peek the complete buffer contents. More...
 
std::string get_next_line ()
 Return and remove first line in buffer, possibly "". More...
 

Detailed Description

After appending, data can be retrieved as lines.

Definition at line 23 of file line_buffer.h.

Member Function Documentation

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

Insert data in buffer.

Definition at line 28 of file line_buffer.cpp.

const char * LineBuffer::c_str ( )

Peek the complete buffer contents.

Definition at line 34 of file line_buffer.cpp.

std::string LineBuffer::get_next_line ( )

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

Definition at line 40 of file line_buffer.cpp.

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: