streamclone.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef __IO_STREAMCLONE_H__
00023 #define __IO_STREAMCLONE_H__
00024
00025 #include <sys/types.h>
00026 #include <unistd.h>
00027
00028 #include "stream.h"
00029
00030 namespace OpenRaw {
00031 namespace IO {
00032
00035 class StreamClone
00036 : public Stream
00037 {
00038 public:
00039 StreamClone(Stream *clone, off_t offset);
00040 virtual ~StreamClone();
00041
00042 virtual Error open();
00043 virtual int close();
00044 virtual int seek(off_t offset, int whence);
00045 virtual int read(void *buf, size_t count);
00046 virtual off_t filesize();
00047
00048
00049 private:
00051 StreamClone(const StreamClone& f);
00053 StreamClone & operator=(const StreamClone&);
00054
00055 Stream *m_cloned;
00056 off_t m_offset;
00057 };
00058
00059 }
00060 }
00061
00062 #endif