~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/linebuffer.h

Reverted 1103

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 
12
12
   You should have received a copy of the GNU General Public License
13
13
   along with this program; if not, write to the Free Software
14
 
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
 
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
15
15
 
16
16
#ifndef CLIENT_LINEBUFFER_H
17
17
#define CLIENT_LINEBUFFER_H
18
18
 
19
19
#include <vector>
20
 
#include <sstream>
21
 
#include <iostream>
22
 
#include <boost/iostreams/stream.hpp>
23
 
#include <boost/iostreams/device/file_descriptor.hpp>
24
20
 
25
21
class LineBuffer
26
22
{
27
23
public:
28
24
  LineBuffer(uint32_t max_size,FILE *file);
 
25
 
29
26
  void addString(const std::string &argument);
30
27
  char *readline();
31
28
private:
32
29
  FILE *file;
 
30
  std::stringstream buffer;
33
31
  std::vector<char> line;
34
 
  std::iostream *file_stream;
35
32
  uint32_t max_size;
 
33
  bool eof;
36
34
};
37
35
 
38
36
#endif /* CLIENT_LINEBUFFER_H */