MrSID Decode SDK for Raster Reference Manual  9.0.0.3864
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 
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 
37 {
38 public:
40 
41  virtual ~LTIOCallbackStream();
42 
74  virtual LT_STATUS initialize(LTIOCallbackStream_Open open,
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:
103  LTIOCallbackStream_Close m_close;
105  LTIOCallbackStream_Write m_write;
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
LT_STATUS(* LTIOCallbackStream_Seek)(void *, lt_int64, LTIOSeekDir)
typedef for callback stream seek function
LT_STATUS(* LTIOCallbackStream_Close)(void *)
typedef for callback stream close function
Stream driven entirely by user-defined callbacks.
lt_uint32(* LTIOCallbackStream_Read)(void *, lt_uint8 *, lt_uint32)
typedef for callback stream read function
lt_int64(* LTIOCallbackStream_Tell)(void *)
typedef for callback stream tell function
#define LT_END_NAMESPACE(theNameSpace)
compiler does not support namespaces
Definition: lt_define.h:85
LT_STATUS(* LTIOCallbackStream_Open)(void *)
typedef for callback stream open function
lt_uint32(* LTIOCallbackStream_Write)(void *, const lt_uint8 *, lt_uint32)
typedef for callback stream write function
lt_uint32 LT_STATUS
An integral status code.
Definition: lt_status.h:39
lt_uint8(* LTIOCallbackStream_IsEOF)(void *)
typedef for callback stream isEOF function
LTIOSeekDir
Stream seek directions.
Definition: lt_lib_io.h:30
Abstract definition of a stream.
LTIOStreamH(* LTIOCallbackStream_Duplicate)(void *)
typedef for callback stream duplicate function
lt_uint8(* LTIOCallbackStream_IsOpen)(void *)
typedef for callback stream isOpen function
#define LT_BEGIN_NAMESPACE(theNameSpace)
compiler does not support namespaces
Definition: lt_define.h:84
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

LizardTech