00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef __ZStream_Filter__
00026 #define __ZStream_Filter__ 1
00027 #include "zconfig.h"
00028
00029 #include "ZStream.h"
00030
00031
00032 #pragma mark -
00033 #pragma mark * ZStreamR_Filter
00034
00035 class ZStreamR_Filter : public ZStreamR
00036 {
00037 public:
00038 ZStreamR_Filter(const ZStreamR& iStreamReal);
00039
00040 ~ZStreamR_Filter();
00041
00042
00043 virtual void Imp_Read(void* iDest, size_t iCount, size_t* oCountRead);
00044 virtual size_t Imp_CountReadable();
00045 virtual void Imp_Skip(uint64 iCount, uint64* oCountSkipped);
00046
00047 protected:
00048 const ZStreamR& fStreamReal;
00049 };
00050
00051
00052 #pragma mark -
00053 #pragma mark * ZStreamU_Filter
00054
00055 class ZStreamU_Filter : public ZStreamU
00056 {
00057 public:
00058 ZStreamU_Filter(const ZStreamU& iStreamReal);
00059
00060 ~ZStreamU_Filter();
00061
00062
00063 virtual void Imp_Read(void* iDest, size_t iCount, size_t* oCountRead);
00064 virtual size_t Imp_CountReadable();
00065 virtual void Imp_Skip(uint64 iCount, uint64* oCountSkipped);
00066
00067
00068 virtual void Imp_Unread();
00069
00070 protected:
00071 const ZStreamU& fStreamReal;
00072 };
00073
00074
00075 #pragma mark -
00076 #pragma mark * ZStreamRPos_Filter
00077
00078 class ZStreamRPos_Filter : public ZStreamRPos
00079 {
00080 public:
00081 ZStreamRPos_Filter(const ZStreamRPos& iStreamReal);
00082
00083 ~ZStreamRPos_Filter();
00084
00085
00086 virtual void Imp_Read(void* iDest, size_t iCount, size_t* oCountRead);
00087 virtual size_t Imp_CountReadable();
00088 virtual void Imp_Skip(uint64 iCount, uint64* oCountSkipped);
00089
00090
00091 virtual uint64 Imp_GetPosition();
00092 virtual void Imp_SetPosition(uint64 iPosition);
00093
00094 virtual uint64 Imp_GetSize();
00095
00096 protected:
00097 const ZStreamRPos& fStreamReal;
00098 };
00099
00100
00101 #pragma mark -
00102 #pragma mark * ZStreamW_Filter
00103
00104 class ZStreamW_Filter : public ZStreamW
00105 {
00106 public:
00107 ZStreamW_Filter(const ZStreamW& iStreamReal);
00108
00109 ~ZStreamW_Filter();
00110
00111
00112 virtual void Imp_Write(const void* iSource, size_t iCount, size_t* oCountWritten);
00113 virtual void Imp_Flush();
00114
00115 protected:
00116 const ZStreamW& fStreamReal;
00117 };
00118
00119
00120 #pragma mark -
00121 #pragma mark * ZStreamWPos_Filter
00122
00123 class ZStreamWPos_Filter : public ZStreamWPos
00124 {
00125 public:
00126 ZStreamWPos_Filter(const ZStreamWPos& iStreamReal);
00127
00128 ~ZStreamWPos_Filter();
00129
00130
00131 virtual void Imp_Write(const void* iSource, size_t iCount, size_t* oCountWritten);
00132 virtual void Imp_Flush();
00133
00134
00135 virtual uint64 Imp_GetPosition();
00136 virtual void Imp_SetPosition(uint64 iPosition);
00137
00138 virtual uint64 Imp_GetSize();
00139
00140
00141 virtual void Imp_SetSize(uint64 iSize);
00142
00143 protected:
00144 const ZStreamWPos& fStreamReal;
00145 };
00146
00147
00148 #pragma mark -
00149 #pragma mark * ZStreamRWPos_Filter
00150
00151 class ZStreamRWPos_Filter : public ZStreamRWPos
00152 {
00153 public:
00154 ZStreamRWPos_Filter(const ZStreamRWPos& iStreamReal);
00155
00156 ~ZStreamRWPos_Filter();
00157
00158
00159 virtual void Imp_Read(void* iDest, size_t iCount, size_t* oCountRead);
00160 virtual size_t Imp_CountReadable();
00161 virtual void Imp_Skip(uint64 iCount, uint64* oCountSkipped);
00162
00163
00164 virtual void Imp_Write(const void* iSource, size_t iCount, size_t* oCountWritten);
00165 virtual void Imp_Flush();
00166
00167
00168 virtual uint64 Imp_GetPosition();
00169 virtual void Imp_SetPosition(uint64 iPosition);
00170
00171 virtual uint64 Imp_GetSize();
00172
00173
00174 virtual void Imp_SetSize(uint64 iSize);
00175
00176 protected:
00177 const ZStreamRWPos& fStreamReal;
00178 };
00179
00180 #endif // __ZStream_Filter__