MrSID Decode SDK for Raster Reference Manual  9.1.0.4045
lt_ioSubStream.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 
14 #ifndef LT_IOSUBSTREAM_H
15 #define LT_IOSUBSTREAM_H
16 
17 #include "lt_ioStreamInf.h"
18 #include <stdio.h>
19 
20 LT_BEGIN_NAMESPACE( LizardTech )
21 
22 
23 
24 
47 {
48 public:
49 
54 
58  LTIOSubStream();
59 
63  virtual ~LTIOSubStream();
64 
76  virtual LT_STATUS initialize(LTIOStreamInf* stream,
77  lt_int64 start,
78  lt_int64 end,
79  bool takeOwnership=false);
80 
85 
92  virtual bool isEOF();
93 
94 
99 
106  virtual bool isOpen();
107 
120  virtual LT_STATUS open();
121 
132  virtual LT_STATUS close();
133 
135 
136 
141 
151  virtual lt_uint32 read( lt_uint8 *pDest, lt_uint32 numBytes );
152 
161  virtual lt_uint32 write( const lt_uint8 *pSrc, lt_uint32 numBytes );
162 
164 
169 
181  virtual LT_STATUS seek( lt_int64 offset, LTIOSeekDir origin );
182 
189  virtual lt_int64 tell();
190 
192 
197 
207  virtual LTIOStreamInf* duplicate();
208 
209  virtual LT_STATUS getLastError() const;
210 
211  virtual const char* getID() const;
212 
214 
215 
216 protected:
218  void cleanup();
219 
220  LTIOStreamInf* m_stream;
222  lt_int64 m_startOffset;
223  lt_int64 m_endOffset;
224 
225  bool m_isEOF;
226 };
227 
228 
229 
230 LT_END_NAMESPACE( LizardTech )
231 
232 
233 #endif // LT_IOSUBSTREAM_H
unsigned int lt_uint32
unsigned 32-bit integer
Definition: lt_types.h:54
unsigned char lt_uint8
unsigned 8-bit integer
Definition: lt_types.h:46
#define LT_BEGIN_NAMESPACE(theNameSpace)
compiler does not support namespaces
Definition: lt_define.h:84
lt_uint32 LT_STATUS
An integral status code.
Definition: lt_status.h:39
lt_int64 m_startOffset
LTIOStreamInf * m_stream
LTIOSubStream.
#define LT_END_NAMESPACE(theNameSpace)
compiler does not support namespaces
Definition: lt_define.h:85
LTIOSeekDir
Stream seek directions.
Definition: lt_lib_io.h:30
Abstract definition of a stream.
lt_int64 m_endOffset

LizardTech