copy_filter.h
//
// Copyright (C) 2008-2012 Artyom Beilis (Tonkikh) <artyomtnk@yahoo.com>
//
// See accompanying file COPYING.TXT file for licensing details.
//
#ifndef CPPCMS_COPY_FILTER_H
#define CPPCMS_COPY_FILTER_H
#include <booster/streambuf.h>
#include <booster/noncopyable.h>
#include <booster/hold_ptr.h>
#include <cppcms/defs.h>
#include <list>
#include <ostream>
namespace cppcms {
class CPPCMS_API copy_filter : public booster::noncopyable {
public:
copy_filter(std::ostream &output);
~copy_filter();
std::string detach();
private:
class tee_device;
struct data;
booster::hold_ptr<data> d;
booster::streambuf copy_buffer_;
std::ostream &output_;
std::ostream real_output_stream_;
std::list<std::string> data_;
bool detached_;
};
} // cppcms
#endif
booster::streambuf
this is an implementation of generic streambuffer
Definition: streambuf.h:70
booster::hold_ptr< data >
cppcms::copy_filter
Copy the output stream part - "tee" filter.
Definition: copy_filter.h:43
booster::noncopyable
This class makes impossible to copy any class derived from this one.
Definition: noncopyable.h:15