00001
00002
00003
00004 #ifndef DEV_W3_ORG__2001_BLINDFOLD_SRC_BYTEWRITER_H
00005 #define DEV_W3_ORG__2001_BLINDFOLD_SRC_BYTEWRITER_H
00006 #include "config.h"
00007
00008 #include "ByteSink.h"
00009
00013 class ByteWriter {
00014
00015 public:
00016
00017
00018 ByteWriter();
00019 ByteWriter(const ByteWriter& other);
00020 const ByteWriter& operator=(const ByteWriter& other);
00021 bool operator==(const ByteWriter& other) const;
00022 bool operator<(const ByteWriter& other) const;
00023 size_t hash() const;
00024 friend std::ostream& operator<<(std::ostream& s, const ByteWriter& me);
00025 std::ostream& print_to(std::ostream& stream) const;
00026 ~ByteWriter();
00027
00028
00029
00030
00031
00032 ByteSink* getSink() { return sink; }
00033
00034 void setSink(ByteSink* new_sink) { sink = new_sink; }
00035
00036 protected:
00037 ByteSink* sink;
00038 private:
00039
00040
00041 };
00042
00043
00044 STANDARD_EXTERNAL(ByteWriter)
00045
00046 #endif