2001-10-06 18:13:28 +04:00
|
|
|
#ifndef COUTPUTSTREAMFILTER_H
|
|
|
|
#define COUTPUTSTREAMFILTER_H
|
|
|
|
|
|
|
|
#include "IOutputStream.h"
|
|
|
|
|
|
|
|
class COutputStreamFilter : public IOutputStream {
|
2002-04-29 18:40:01 +04:00
|
|
|
public:
|
2001-10-06 18:13:28 +04:00
|
|
|
COutputStreamFilter(IOutputStream*, bool adoptStream = true);
|
|
|
|
~COutputStreamFilter();
|
|
|
|
|
|
|
|
// manipulators
|
|
|
|
|
|
|
|
// accessors
|
|
|
|
|
|
|
|
// IOutputStream overrides
|
2001-10-14 20:58:01 +04:00
|
|
|
virtual void close() = 0;
|
|
|
|
virtual UInt32 write(const void*, UInt32 count) = 0;
|
|
|
|
virtual void flush() = 0;
|
2001-10-06 18:13:28 +04:00
|
|
|
|
2002-04-29 18:40:01 +04:00
|
|
|
protected:
|
2001-10-14 20:58:01 +04:00
|
|
|
IOutputStream* getStream() const;
|
2001-10-06 18:13:28 +04:00
|
|
|
|
2002-04-29 18:40:01 +04:00
|
|
|
private:
|
2001-10-06 18:13:28 +04:00
|
|
|
IOutputStream* m_stream;
|
|
|
|
bool m_adopted;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|