CppCMS
copy_filter.h
1 //
3 // Copyright (C) 2008-2012 Artyom Beilis (Tonkikh) <artyomtnk@yahoo.com>
4 //
5 // See accompanying file COPYING.TXT file for licensing details.
6 //
8 #ifndef CPPCMS_COPY_FILTER_H
9 #define CPPCMS_COPY_FILTER_H
10 
11 
12 #include <booster/streambuf.h>
13 #include <booster/noncopyable.h>
14 #include <booster/hold_ptr.h>
15 #include <cppcms/defs.h>
16 #include <list>
17 #include <ostream>
18 
19 namespace cppcms {
43  class CPPCMS_API copy_filter : public booster::noncopyable {
44  public:
48  copy_filter(std::ostream &output);
53  ~copy_filter();
57  std::string detach();
58 
59  private:
60  class tee_device;
61  struct data;
63  booster::streambuf copy_buffer_;
64  std::ostream &output_;
65  std::ostream real_output_stream_;
66  std::list<std::string> data_;
67  bool detached_;
68  };
69 } // cppcms
70 
71 
72 #endif
this is an implementation of generic streambuffer
Definition: streambuf.h:70
Copy the output stream part - "tee" filter.
Definition: copy_filter.h:43
This is the namespace where all CppCMS functionality is placed.
Definition: application.h:19
This class makes impossible to copy any class derived from this one.
Definition: noncopyable.h:15