| LIRC libraries LinuxInfraredRemoteControl

line_buffer.h
1 /******************************************************************
2 ** line_buffer ****************************************************
3 *******************************************************************
4 *
5 * Line buffered input on top of e. g., read(2).
6 *
7 * Copyright (c) 2015 Alec Leamas
8 *
9 * */
10
16 #ifndef LIB_LINE_BUFFER_H_
17 #define LIB_LINE_BUFFER_H_
18
19 #ifdef HAVE_CONFIG_H
20 # include <config.h>
21 #endif
22
23 #include <string>
24
25
27 class LineBuffer {
28 private:
29 std::string buff;
30
31 public:
33 void append(const char* line, size_t size);
34
36 bool has_lines();
37
39 const char* c_str();
40
42 std::string get_next_line();
43
44 LineBuffer();
45 };
46
47 #endif // LIB_LINE_BUFFER_H_
LineBuffer::get_next_line
std::string get_next_line()
Definition: line_buffer.cpp:40
LineBuffer::c_str
const char * c_str()
Definition: line_buffer.cpp:34
LineBuffer
Definition: line_buffer.h:27
LineBuffer::append
void append(const char *line, size_t size)
Definition: line_buffer.cpp:28
LineBuffer::has_lines
bool has_lines()
Definition: line_buffer.cpp:22