line_buffer.h
/******************************************************************
** line_buffer ****************************************************
*******************************************************************
*
* Line buffered input on top of e. g., read(2).
*
* Copyright (c) 2015 Alec Leamas
*
* */
#ifndef LIB_LINE_BUFFER_H_
#define LIB_LINE_BUFFER_H_
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <string>
class LineBuffer {
private:
std::string buff;
public:
void append(const char* line, size_t size);
bool has_lines();
const char* c_str();
std::string get_next_line();
LineBuffer();
};
#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