MrSID Decode SDK for Raster Reference Manual 9.5.4.4709

- Main Page
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

lt_ioBufferedStream.h
Go to the documentation of this file.
1 /* $Id$ */
2 /* //////////////////////////////////////////////////////////////////////////
3 // //
4 // This code is Copyright (c) 2004 LizardTech, Inc, 1008 Western Avenue, //
5 // Suite 200, Seattle, WA 98104. Unauthorized use or distribution //
6 // prohibited. Access to and use of this code is permitted only under //
7 // license from LizardTech, Inc. Portions of the code are protected by //
8 // US and foreign patents and other filings. All Rights Reserved. //
9 // //
11 /* PUBLIC */
12
13 #ifndef LT_IO_BUFFERED_STREAM_H
14 #define LT_IO_BUFFERED_STREAM_H
15
16 #include "lt_ioStreamInf.h"
17
18 LT_BEGIN_NAMESPACE( LizardTech )
19
20 class LTIOBufPage;
21 class LTIOBufPageCache;
22
28 class LTIOBufferedStream : public LTIOStreamInf
29 {
30 public:
31 LTIOBufferedStream();
32 virtual ~LTIOBufferedStream();
33
43 virtual LT_STATUS initialize( LTIOStreamInf* src,
44 lt_uint32 pageSize=1024,
45 lt_uint32 numPages = 10,
46 const char* tempDir = 0L);
47
48
49 virtual bool isEOF();
50 virtual bool isOpen();
51 virtual LT_STATUS open();
52 virtual LT_STATUS close();
53 virtual lt_uint32 read( lt_uint8 *pDest, lt_uint32 numBytes );
54 virtual lt_uint32 write( const lt_uint8 *pSrc, lt_uint32 numBytes );
55 virtual LT_STATUS seek( lt_int64 offset, LTIOSeekDir origin );
56 virtual lt_int64 tell();
57 virtual LTIOStreamInf* duplicate();
58 virtual LT_STATUS getLastError() const;
59 virtual const char* getID() const;
60
61 private:
62 const LTIOBufPage* getPage( lt_uint64 pageIndex );
63
64 protected:
65 lt_uint32 m_pageSize;
66 lt_uint32 m_numPages;
67 LTIOBufPageCache* m_buffer;
68 LTIOStreamInf* m_src;
69 lt_uint64 m_cur;
70 bool m_eof;
71 char* m_tempDir;
72 };
73
74
75
76 LT_END_NAMESPACE( LizardTech )
77
78
79 #endif // LT_IO_BUFFERED_STREAM_H

LizardTech