Fri, 16 Jan 2015 18:13:44 +0100
Integrate suggestion from review to improve consistency with existing code.
michael@0 | 1 | // OffsetStream.h |
michael@0 | 2 | |
michael@0 | 3 | #ifndef __OFFSETSTREAM_H |
michael@0 | 4 | #define __OFFSETSTREAM_H |
michael@0 | 5 | |
michael@0 | 6 | #include "Common/MyCom.h" |
michael@0 | 7 | #include "../IStream.h" |
michael@0 | 8 | |
michael@0 | 9 | class COffsetOutStream: |
michael@0 | 10 | public IOutStream, |
michael@0 | 11 | public CMyUnknownImp |
michael@0 | 12 | { |
michael@0 | 13 | UInt64 _offset; |
michael@0 | 14 | CMyComPtr<IOutStream> _stream; |
michael@0 | 15 | public: |
michael@0 | 16 | HRESULT Init(IOutStream *stream, UInt64 offset); |
michael@0 | 17 | |
michael@0 | 18 | MY_UNKNOWN_IMP |
michael@0 | 19 | |
michael@0 | 20 | STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize); |
michael@0 | 21 | STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition); |
michael@0 | 22 | STDMETHOD(SetSize)(Int64 newSize); |
michael@0 | 23 | }; |
michael@0 | 24 | |
michael@0 | 25 | #endif |