65 virtual void SetPos(
short posMode, INT64 posOff)=0;
70 virtual UINT64
GetPos()
const=0;
95 virtual void Write(
int *count,
void *
buffer) THROW_;
96 virtual void Read(
int *count,
void *
buffer) THROW_;
97 virtual void SetPos(
short posMode, INT64 posOff) THROW_;
98 virtual UINT64
GetPos() const THROW_;
99 virtual
bool IsValid()
const {
return m_hFile != 0; }
132 delete[] m_buffer; m_buffer = 0;
136 virtual void Write(
int *count,
void *
buffer) THROW_;
138 virtual void SetPos(
short posMode, INT64 posOff) THROW_;
139 virtual UINT64
GetPos()
const { ASSERT(
IsValid());
return m_pos - m_buffer; }
140 virtual bool IsValid()
const {
return m_buffer != 0; }
151 void SetEOS(UINT64 length) { ASSERT(
IsValid()); m_eos = m_buffer + length; }
163 CPGFMemFileStream(CMemFile *memFile) : m_memFile(memFile) {}
164 virtual bool IsValid()
const {
return m_memFile != NULL; }
165 virtual ~CPGFMemFileStream() {}
166 virtual void Write(
int *count,
void *
buffer) THROW_;
167 virtual void Read(
int *count,
void *
buffer) THROW_;
168 virtual void SetPos(
short posMode, INT64 posOff) THROW_;
169 virtual UINT64
GetPos() const THROW_;
177 #if defined(WIN32) || defined(WINCE)
182 CPGFIStream(IStream *stream) : m_stream(stream) {}
183 virtual bool IsValid()
const {
return m_stream != 0; }
184 virtual ~CPGFIStream() {}
185 virtual void Write(
int *count,
void *
buffer) THROW_;
186 virtual void Read(
int *count,
void *
buffer) THROW_;
187 virtual void SetPos(
short posMode, INT64 posOff) THROW_;
188 virtual UINT64 GetPos() const THROW_;
189 IStream* GetIStream()
const {
return m_stream; }
193 #endif // PGF_STREAM_H
virtual void Write(int *count, void *buffer) THROW_
Definition: PGFstream.cpp:38
HANDLE m_hFile
file handle
Definition: PGFstream.h:84
virtual void SetPos(short posMode, INT64 posOff)=0
size_t m_size
buffer size
Definition: PGFstream.h:110
virtual ~CPGFStream()
Standard destructor.
Definition: PGFstream.h:47
Abstract stream base class.
Definition: PGFstream.h:39
CPGFMemoryStream(size_t size) THROW_
Definition: PGFstream.cpp:78
virtual void SetPos(short posMode, INT64 posOff) THROW_
Definition: PGFstream.cpp:57
Memory stream class.
Definition: PGFstream.h:106
File stream class.
Definition: PGFstream.h:82
UINT8 * m_eos
end of stream (first address beyond written area)
Definition: PGFstream.h:109
virtual void Read(int *count, void *buffer) THROW_
Definition: PGFstream.cpp:48
UINT64 GetEOS() const
Definition: PGFstream.h:149
virtual bool IsValid() const
Definition: PGFstream.h:140
virtual bool IsValid() const =0
virtual void SetPos(short posMode, INT64 posOff) THROW_
Definition: PGFstream.cpp:168
virtual void Write(int *count, void *buffer) THROW_
Definition: PGFstream.cpp:111
CPGFFileStream(HANDLE hFile)
Definition: PGFstream.h:90
size_t GetSize() const
Definition: PGFstream.h:143
UINT8 * GetBuffer()
Definition: PGFstream.h:147
void Reinitialize(UINT8 *pBuffer, size_t size) THROW_
Definition: PGFstream.cpp:102
virtual void Write(int *count, void *buffer)=0
virtual void Read(int *count, void *buffer)
Definition: PGFstream.cpp:148
virtual UINT64 GetPos() const =0
virtual UINT64 GetPos() const THROW_
Definition: PGFstream.cpp:64
UINT8 * m_pos
buffer start address and current buffer address
Definition: PGFstream.h:108
virtual bool IsValid() const
Definition: PGFstream.h:99
HANDLE GetHandle()
Definition: PGFstream.h:92
bool m_allocated
indicates a new allocated buffer
Definition: PGFstream.h:111
void SetEOS(UINT64 length)
Definition: PGFstream.h:151
Binary buffer.
Definition: pdbim.h:93
const UINT8 * GetBuffer() const
Definition: PGFstream.h:145
virtual void Read(int *count, void *buffer)=0
virtual UINT64 GetPos() const
Definition: PGFstream.h:139
CPGFStream()
Standard constructor.
Definition: PGFstream.h:43