~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/linebuffer.h

  • Committer: Lee Bieber
  • Date: 2010-10-27 18:28:56 UTC
  • mfrom: (1883.1.3 build)
  • Revision ID: kalebral@gmail.com-20101027182856-q3wqtbv1t4egkjsk
Merge Andrew - fix bug 667360: --defaults-file not processed before paths read           
Merge Andrew - fix bug 656577: Importing SQL script results in silent failure    
Merge Andrew - fix bug 667053: drizzledump minor output cleanup needed

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
#include <vector>
20
20
#include <sstream>
21
 
#include <iostream>
22
 
#include <boost/iostreams/stream.hpp>
23
 
#include <boost/iostreams/device/file_descriptor.hpp>
24
21
 
25
22
class LineBuffer
26
23
{
27
24
public:
28
25
  LineBuffer(uint32_t max_size,FILE *file);
 
26
 
29
27
  void addString(const std::string &argument);
30
28
  char *readline();
31
29
private:
32
30
  FILE *file;
 
31
  std::stringstream buffer;
33
32
  std::vector<char> line;
34
 
  std::iostream *file_stream;
35
33
  uint32_t max_size;
 
34
  bool eof;
36
35
};
37
36
 
38
37
#endif /* CLIENT_LINEBUFFER_H */