libpgf
6.14.12
PGF - Progressive Graphics File
|
Memory stream class. More...
#include <PGFstream.h>
Public Member Functions | |
CPGFMemoryStream (size_t size) THROW_ | |
CPGFMemoryStream (UINT8 *pBuffer, size_t size) THROW_ | |
void | Reinitialize (UINT8 *pBuffer, size_t size) THROW_ |
virtual | ~CPGFMemoryStream () |
virtual void | Write (int *count, void *buffer) THROW_ |
virtual void | Read (int *count, void *buffer) |
virtual void | SetPos (short posMode, INT64 posOff) THROW_ |
virtual UINT64 | GetPos () const |
virtual bool | IsValid () const |
size_t | GetSize () const |
const UINT8 * | GetBuffer () const |
UINT8 * | GetBuffer () |
UINT64 | GetEOS () const |
void | SetEOS (UINT64 length) |
Protected Attributes | |
UINT8 * | m_buffer |
UINT8 * | m_pos |
buffer start address and current buffer address More... | |
UINT8 * | m_eos |
end of stream (first address beyond written area) More... | |
size_t | m_size |
buffer size More... | |
bool | m_allocated |
indicates a new allocated buffer More... | |
Memory stream class.
A PGF stream subclass for internal memory.
Definition at line 106 of file PGFstream.h.
CPGFMemoryStream::CPGFMemoryStream | ( | size_t | size | ) |
Constructor
size | Size of new allocated memory buffer |
Allocate memory block of given size
size | Memory size |
Definition at line 78 of file PGFstream.cpp.
CPGFMemoryStream::CPGFMemoryStream | ( | UINT8 * | pBuffer, |
size_t | size | ||
) |
Constructor. Use already allocated memory of given size
pBuffer | Memory location |
size | Memory size |
Use already allocated memory of given size
pBuffer | Memory location |
size | Memory size |
Definition at line 89 of file PGFstream.cpp.
|
inlinevirtual |
Definition at line 128 of file PGFstream.h.
|
inline |
|
inline |
|
inline |
Definition at line 149 of file PGFstream.h.
|
inlinevirtual |
Get current stream position.
Implements CPGFStream.
Definition at line 139 of file PGFstream.h.
|
inline |
|
inlinevirtual |
Check stream validity.
Implements CPGFStream.
Definition at line 140 of file PGFstream.h.
|
virtual |
Read some bytes from this stream and stores them into a buffer.
count | A pointer to a value containing the number of bytes should be read. After this call it contains the number of read bytes. |
buffer | A memory buffer |
Implements CPGFStream.
Definition at line 148 of file PGFstream.cpp.
void CPGFMemoryStream::Reinitialize | ( | UINT8 * | pBuffer, |
size_t | size | ||
) |
Use already allocated memory of given size
pBuffer | Memory location |
size | Memory size |
Definition at line 102 of file PGFstream.cpp.
|
inline |
length | Stream length (= relative position of end of stream) |
Definition at line 151 of file PGFstream.h.
|
virtual |
Set stream position either absolute or relative.
posMode | A position mode (FSFromStart, FSFromCurrent, FSFromEnd) |
posOff | A new stream position (absolute positioning) or a position offset (relative positioning) |
Implements CPGFStream.
Definition at line 168 of file PGFstream.cpp.
|
virtual |
Write some bytes out of a buffer into this stream.
count | A pointer to a value containing the number of bytes should be written. After this call it contains the number of written bytes. |
buffer | A memory buffer |
Implements CPGFStream.
Definition at line 111 of file PGFstream.cpp.
|
protected |
indicates a new allocated buffer
Definition at line 111 of file PGFstream.h.
|
protected |
Definition at line 108 of file PGFstream.h.
|
protected |
end of stream (first address beyond written area)
Definition at line 109 of file PGFstream.h.
|
protected |
buffer start address and current buffer address
Definition at line 108 of file PGFstream.h.
|
protected |
buffer size
Definition at line 110 of file PGFstream.h.