00001
00002
00003
00004 #ifndef DEV_W3_ORG__2001_BLINDFOLD_SRC_BYTESINK_H
00005 #define DEV_W3_ORG__2001_BLINDFOLD_SRC_BYTESINK_H
00006 #include "config.h"
00007
00008
00012 class ByteSink {
00013
00014 public:
00015
00016
00017 ByteSink();
00018 ByteSink(const ByteSink& other);
00019 const ByteSink& operator=(const ByteSink& other);
00020 bool operator==(const ByteSink& other) const;
00021 bool operator<(const ByteSink& other) const;
00022 size_t hash() const;
00023 friend std::ostream& operator<<(std::ostream& s, const ByteSink& me);
00024 std::ostream& print_to(std::ostream& stream) const;
00025 virtual ~ByteSink();
00026
00027
00028
00033 virtual void write(const void* byteBuffer, size_t numBytes) = 0;
00034
00035 virtual void close() { };
00036
00037 private:
00038
00039
00040 };
00041
00042
00047 STANDARD_EXTERNAL(ByteSink)
00048
00049 #endif