00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef PALUDIS_GUARD_PALUDIS_UTIL_DISCARD_OUTPUT_STREAM_HH
00021 #define PALUDIS_GUARD_PALUDIS_UTIL_DISCARD_OUTPUT_STREAM_HH 1
00022
00023 #include <paludis/util/attributes.hh>
00024 #include <ostream>
00025
00026 namespace paludis
00027 {
00028 class PALUDIS_VISIBLE DiscardOutputStreamBuf :
00029 public std::streambuf
00030 {
00031 protected:
00032 virtual int_type
00033 overflow(int_type c);
00034
00035 virtual std::streamsize
00036 xsputn(const char * s, std::streamsize num);
00037 };
00038
00039 class PALUDIS_VISIBLE DiscardOutputStreamBase
00040 {
00041 protected:
00042 DiscardOutputStreamBuf buf;
00043 };
00044
00045 class PALUDIS_VISIBLE DiscardOutputStream :
00046 protected DiscardOutputStreamBase,
00047 public std::ostream
00048 {
00049 public:
00050
00051
00052
00053 DiscardOutputStream();
00054
00055
00056 };
00057 }
00058
00059 #endif