MrSID Decode SDK for Raster Reference Manual 9.5.4.4709

- Main Page
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

lt_ioCallbackStream.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_CALLBACK_STREAM_H
14 #define LT_IO_CALLBACK_STREAM_H
15
16 #include "lt_ioCallbackStreamTypes.h"
17 #include "lt_ioStreamInf.h"
18
19 #if defined(LT_COMPILER_MS)
20 #pragma warning(push,4)
21 #endif
22
23 LT_BEGIN_NAMESPACE( LizardTech )
24
25
26
36 class LTIOCallbackStream : public LTIOStreamInf
37 {
38 public:
39 LTIOCallbackStream();
40
41 virtual ~LTIOCallbackStream();
42
74 virtual LT_STATUS initialize(LTIOCallbackStream_Open open,
75 LTIOCallbackStream_Close close,
76 LTIOCallbackStream_Read read,
77 LTIOCallbackStream_Write write,
78 LTIOCallbackStream_Seek seek,
79 LTIOCallbackStream_Tell tell,
80 LTIOCallbackStream_IsEOF isEOF,
81 LTIOCallbackStream_IsOpen isOpen,
82 LTIOCallbackStream_Duplicate duplicate,
83 void* user);
84
85 virtual bool isEOF();
86 virtual bool isOpen();
87
88 virtual LT_STATUS open();
89 virtual LT_STATUS close();
90
91 virtual lt_uint32 read( lt_uint8 *pDest, lt_uint32 numBytes );
92 virtual lt_uint32 write( const lt_uint8 *pSrc, lt_uint32 numBytes );
93
94 virtual LT_STATUS seek( lt_int64 offset, LTIOSeekDir origin );
95 virtual lt_int64 tell();
96
97 virtual LTIOStreamInf* duplicate();
98 virtual LT_STATUS getLastError() const;
99 virtual const char* getID() const;
100
101 private:
102 LTIOCallbackStream_Open m_open;
103 LTIOCallbackStream_Close m_close;
104 LTIOCallbackStream_Read m_read;
105 LTIOCallbackStream_Write m_write;
106 LTIOCallbackStream_Seek m_seek;
107 LTIOCallbackStream_Tell m_tell;
108 LTIOCallbackStream_IsEOF m_isEOF;
109 LTIOCallbackStream_IsOpen m_isOpen;
110 LTIOCallbackStream_Duplicate m_duplicate;
111
112 void* m_user;
113 };
114
115 LT_END_NAMESPACE( LizardTech )
116
117 #if defined(LT_COMPILER_MS)
118 #pragma warning(pop)
119 #endif
120
121 #endif // LT_IO_CALLBACK_STREAM_H

LizardTech