00001
00002
00003
00004 #ifndef DEV_W3_ORG__2001_BLINDFOLD_SRC_BYTESOURCE_H
00005 #define DEV_W3_ORG__2001_BLINDFOLD_SRC_BYTESOURCE_H
00006 #include "config.h"
00007
00008
00012 class ByteSource {
00013
00014 public:
00015
00016
00017 ByteSource();
00018 ByteSource(const ByteSource& other);
00019 const ByteSource& operator=(const ByteSource& other);
00020 bool operator==(const ByteSource& other) const;
00021 bool operator<(const ByteSource& other) const;
00022 size_t hash() const;
00023 friend std::ostream& operator<<(std::ostream& s, const ByteSource& me);
00024 std::ostream& print_to(std::ostream& stream) const;
00025 virtual ~ByteSource();
00026
00027
00028
00029 virtual size_t read(void* byteBuffer, size_t maxBytes) = 0;
00030
00031 private:
00032
00033
00034 };
00035
00036
00037 STANDARD_EXTERNAL(ByteSource)
00038
00039 #endif