MrSID Decode SDK for Raster Reference Manual  9.0.0.3864
lt_ioStreamInf.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_STREAMINF_H
14 #define LT_STREAMINF_H
15 
16 #include "lt_lib_io.h"
17 
18 
19 LT_BEGIN_NAMESPACE( LizardTech )
20 
21 
22 
23 
31 {
32 public:
33  // The following is a pure virtual destructor with an empty definition.
34  // It might look broken to you, but this is a well-known practice and
35  // is explicitly allowed by the standard for very good, technical reasons.
36  // (Do a google search for "pure virtual destructor" for details.)
37 #if defined(LT_COMPILER_GNU) || defined(LT_COMPILER_SUN) || defined(SWIG)
38  // gcc doesn't allow the declaration to be in the class body,
39  // so we put the member function "definition" in lt_ioStreamInf.cpp
40  virtual ~LTIOStreamInf() =0;
41 #else
42  virtual ~LTIOStreamInf() =0 {};
43 #endif
44 
49 
60  virtual bool isEOF() =0;
61 
68  virtual bool isOpen() =0;
69 
71 
72 
77 
91  virtual LT_STATUS open() =0;
92 
103  virtual LT_STATUS close() =0;
104 
106 
107 
112 
122  virtual lt_uint32 read( lt_uint8 *pDest, lt_uint32 numBytes ) = 0;
123 
132  virtual lt_uint32 write( const lt_uint8 *pSrc, lt_uint32 numBytes ) = 0;
133 
135 
140 
153  virtual LT_STATUS seek( lt_int64 offset, LTIOSeekDir origin ) =0;
154 
162  virtual lt_int64 tell() =0;
163 
165 
170 
180  virtual LTIOStreamInf* duplicate() =0;
181 
182 
193  virtual LT_STATUS getLastError() const =0;
194 
195 
207  virtual const char* getID() const =0;
208 
210 
211 };
212 
213 
214 
215 LT_END_NAMESPACE( LizardTech )
216 
217 
218 #endif // LT_STREAMINF_H

LizardTech