1 //
2 // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2005
3 //
4 // Copyright: See COPYING file that comes with this distribution
5 //
6 //
7 #ifndef LINEBUFFER_H
8 #define LINEBUFFER_H
9
10 #include <string>
11 #include <set>
12 #include <boost/shared_ptr.hpp>
13
14 #include <sstream>
15
17
22 public:
25
26 private:
29
30 public:
32 }
34 }
35
40 buffer << s;
41 }
42
47 post.insert(s);
48 }
49
54 return buffer.str();
55 }
56
62 }
63
68 return (buffer.str().size() == 0 && post.size() == 0);
69 }
70 };
71
74
75 }
76
77 #endif
A buffer for a line to be generated.
Definition: linebuffer.h:21
const PostContents & getPostContents() const
Definition: linebuffer.h:60
ostringstream buffer
the line contents
Definition: linebuffer.h:27
void output_post(const std::string &s)
Stores something to be generated after the line.
Definition: linebuffer.h:46
C++ class: doctemplate.h.
Definition: bufferedoutput.cpp:13
std::set< std::string > PostContents
Stores contents to be printed after the line.
Definition: linebuffer.h:24
boost::shared_ptr< LineBuffer > LineBufferPtr
shared pointer for LineBuffer
Definition: linebuffer.h:73
bool empty() const
Definition: linebuffer.h:67
void output(const std::string &s)
Puts something in the buffer.
Definition: linebuffer.h:39
const std::string getContents() const
Definition: linebuffer.h:53
PostContents post
to be generated after the line
Definition: linebuffer.h:28