digikam
CPGFMemoryStream Class Reference
A PGF stream subclass for internal memory. More...
#include <Stream.h>

Public Member Functions | |
| CPGFMemoryStream (UINT8 *pBuffer, size_t size) THROW_ | |
| CPGFMemoryStream (size_t size) THROW_ | |
| virtual | ~CPGFMemoryStream () |
| UINT8 * | GetBuffer () |
| const UINT8 * | GetBuffer () const |
| virtual UINT64 | GetPos () const THROW_ |
| size_t | GetSize () const |
| virtual bool | IsValid () const |
| virtual void | Read (int *count, void *buffer) THROW_ |
| virtual void | SetPos (short posMode, INT64 posOff) THROW_ |
| virtual void | Write (int *count, void *buffer) THROW_ |
Protected Attributes | |
| bool | m_allocated |
| UINT8 * | m_buffer |
| UINT8 * | m_pos |
| size_t | m_size |
Detailed Description
A PGF stream subclass for internal memory.
Definition at line 97 of file Stream.h.
Constructor & Destructor Documentation
| CPGFMemoryStream::CPGFMemoryStream | ( | size_t | size | ) |
Constructor.
Allocate memory block of given size.
- Parameters:
-
size Size of new allocated memory buffer size Memory size
Definition at line 78 of file Stream.cpp.
| CPGFMemoryStream::CPGFMemoryStream | ( | UINT8 * | pBuffer, | |
| size_t | size | |||
| ) |
Constructor.
Use alreay allocated memory of given size.
Use already allocated memory of given size
- Parameters:
-
pBuffer Memory location size Memory size pBuffer Memory location size Memory size
Definition at line 87 of file Stream.cpp.
| virtual CPGFMemoryStream::~CPGFMemoryStream | ( | ) | [inline, virtual] |
Member Function Documentation
| UINT8* CPGFMemoryStream::GetBuffer | ( | ) | [inline] |
| const UINT8* CPGFMemoryStream::GetBuffer | ( | ) | const [inline] |
| UINT64 CPGFMemoryStream::GetPos | ( | ) | const [virtual] |
Get current stream position.
- Returns:
- Current stream position
Implements CPGFStream.
Definition at line 156 of file Stream.cpp.
| size_t CPGFMemoryStream::GetSize | ( | ) | const [inline] |
| virtual bool CPGFMemoryStream::IsValid | ( | ) | const [inline, virtual] |
| void CPGFMemoryStream::Read | ( | int * | count, | |
| void * | buffer | |||
| ) | [virtual] |
Read some bytes from this stream and stores them into a buffer.
- Parameters:
-
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 120 of file Stream.cpp.
| void CPGFMemoryStream::SetPos | ( | short | posMode, | |
| INT64 | posOff | |||
| ) | [virtual] |
Set stream position either absolute or relative.
- Parameters:
-
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 138 of file Stream.cpp.
| void CPGFMemoryStream::Write | ( | int * | count, | |
| void * | buffer | |||
| ) | [virtual] |
Write some bytes out of a buffer into this stream.
- Parameters:
-
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 92 of file Stream.cpp.
Member Data Documentation
bool CPGFMemoryStream::m_allocated [protected] |
UINT8* CPGFMemoryStream::m_buffer [protected] |
UINT8 * CPGFMemoryStream::m_pos [protected] |
size_t CPGFMemoryStream::m_size [protected] |
The documentation for this class was generated from the following files:
KDE 4.4 API Reference