MrSID Decode SDK for Raster Reference Manual
9.0.0.3864
|
00001 /* $Id$ */ 00002 /* ////////////////////////////////////////////////////////////////////////// 00003 // // 00004 // This code is Copyright (c) 2004 LizardTech, Inc, 1008 Western Avenue, // 00005 // Suite 200, Seattle, WA 98104. Unauthorized use or distribution // 00006 // prohibited. Access to and use of this code is permitted only under // 00007 // license from LizardTech, Inc. Portions of the code are protected by // 00008 // US and foreign patents and other filings. All Rights Reserved. // 00009 // // 00011 /* PUBLIC */ 00012 00013 #ifndef LT_STREAMINF_H 00014 #define LT_STREAMINF_H 00015 00016 #include "lt_lib_io.h" 00017 00018 00019 LT_BEGIN_NAMESPACE( LizardTech ) 00020 00021 00022 00023 00030 class LTIOStreamInf 00031 { 00032 public: 00033 // The following is a pure virtual destructor with an empty definition. 00034 // It might look broken to you, but this is a well-known practice and 00035 // is explicitly allowed by the standard for very good, technical reasons. 00036 // (Do a google search for "pure virtual destructor" for details.) 00037 #if defined(LT_COMPILER_GNU) || defined(LT_COMPILER_SUN) || defined(SWIG) 00038 // gcc doesn't allow the declaration to be in the class body, 00039 // so we put the member function "definition" in lt_ioStreamInf.cpp 00040 virtual ~LTIOStreamInf() =0; 00041 #else 00042 virtual ~LTIOStreamInf() =0 {}; 00043 #endif 00044 00049 00060 virtual bool isEOF() =0; 00061 00068 virtual bool isOpen() =0; 00069 00071 00072 00077 00091 virtual LT_STATUS open() =0; 00092 00103 virtual LT_STATUS close() =0; 00104 00106 00107 00112 00122 virtual lt_uint32 read( lt_uint8 *pDest, lt_uint32 numBytes ) = 0; 00123 00132 virtual lt_uint32 write( const lt_uint8 *pSrc, lt_uint32 numBytes ) = 0; 00133 00135 00140 00153 virtual LT_STATUS seek( lt_int64 offset, LTIOSeekDir origin ) =0; 00154 00162 virtual lt_int64 tell() =0; 00163 00165 00170 00180 virtual LTIOStreamInf* duplicate() =0; 00181 00182 00193 virtual LT_STATUS getLastError() const =0; 00194 00195 00207 virtual const char* getID() const =0; 00208 00210 00211 }; 00212 00213 00214 00215 LT_END_NAMESPACE( LizardTech ) 00216 00217 00218 #endif // LT_STREAMINF_H