MrSID Decode SDK for Raster Reference Manual  9.5.5.5244
lt_ioSubStream.h
Go to the documentation of this file.
1 //
2 // This code is property of Celartem, Inc dba Extensis.
3 // Copyright (c) 1995-2023. All rights reserved.
4 // Use permitted only under license from Extensis.
5 //
6 /* PUBLIC */
7 
8 #ifndef LT_IOSUBSTREAM_H
9 #define LT_IOSUBSTREAM_H
10 
11 #include "lt_ioStreamInf.h"
12 #include <stdio.h>
13 
14 LT_BEGIN_LIZARDTECH_NAMESPACE
15 
16 
17 
41 {
42 public:
43 
48 
53 
57  virtual ~LTIOSubStream();
58 
71  lt_int64 start,
72  lt_int64 end,
73  bool takeOwnership=false);
74 
79 
86  virtual bool isEOF();
87 
88 
93 
100  virtual bool isOpen();
101 
114  virtual LT_STATUS open();
115 
126  virtual LT_STATUS close();
127 
129 
130 
135 
145  virtual lt_uint32 read( lt_uint8 *pDest, lt_uint32 numBytes );
146 
155  virtual lt_uint32 write( const lt_uint8 *pSrc, lt_uint32 numBytes );
156 
158 
163 
175  virtual LT_STATUS seek( lt_int64 offset, LTIOSeekDir origin );
176 
183  virtual lt_int64 tell();
184 
186 
191 
202 
203  virtual LT_STATUS getLastError() const;
204 
205  virtual const char* getID() const;
206 
208 
209 
210 protected:
212  void cleanup();
213 
218 
219  bool m_isEOF;
220 };
221 
222 
223 
224 LT_END_LIZARDTECH_NAMESPACE
225 
226 
227 #endif // LT_IOSUBSTREAM_H
LTIOSeekDir
Stream seek directions.
Definition: lt_lib_io.h:26
lt_uint32 LT_STATUS
An integral status code.
Definition: lt_status.h:30
unsigned char lt_uint8
unsigned 8-bit integer
Definition: lt_types.h:36
unsigned int lt_uint32
unsigned 32-bit integer
Definition: lt_types.h:44
long long int lt_int64
signed 64-bit integer
Definition: lt_types.h:57
Abstract definition of a stream.
LTIOSubStream.
virtual LT_STATUS initialize(LTIOStreamInf *stream, lt_int64 start, lt_int64 end, bool takeOwnership=false)
Initializes the stream.
virtual lt_uint32 read(lt_uint8 *pDest, lt_uint32 numBytes)
Retrieve the specified number of bytes from the data source and place them in pDest.
virtual LT_STATUS getLastError() const
Clone the stream.
virtual bool isEOF()
Indicates whether the stream is at the end of its data or not.
bool m_ownsStream
Clone the stream.
virtual LT_STATUS close()
Closes the stream.
virtual LT_STATUS seek(lt_int64 offset, LTIOSeekDir origin)
Moves the the data access position to origin + offset.
virtual const char * getID() const
Clone the stream.
virtual ~LTIOSubStream()
Destructor.
void cleanup()
cleanup method
virtual lt_int64 tell()
Returns the current data access position as an offset from the start of the data.
bool m_isEOF
Clone the stream.
lt_int64 m_startOffset
Clone the stream.
LTIOSubStream()
Default Constructor.
LTIOStreamInf * m_stream
Clone the stream.
lt_int64 m_endOffset
Clone the stream.
virtual bool isOpen()
Is the stream open?
virtual LT_STATUS open()
Opens the stream.
virtual lt_uint32 write(const lt_uint8 *pSrc, lt_uint32 numBytes)
Store the specified number of bytes in the data source.
virtual LTIOStreamInf * duplicate()
Clone the stream.

Extensis