• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

digikam

CPGFMemoryStream Class Reference

A PGF stream subclass for internal memory. More...

#include <Stream.h>

Inheritance diagram for CPGFMemoryStream:
Inheritance graph
[legend]

List of all members.

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.

Author:
C. Stamm

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]

Definition at line 111 of file Stream.h.


Member Function Documentation

UINT8* CPGFMemoryStream::GetBuffer (  )  [inline]
Returns:
Memory buffer

Definition at line 130 of file Stream.h.

const UINT8* CPGFMemoryStream::GetBuffer (  )  const [inline]
Returns:
Memory buffer

Definition at line 128 of file Stream.h.

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]
Returns:
Memory size

Definition at line 126 of file Stream.h.

virtual bool CPGFMemoryStream::IsValid (  )  const [inline, virtual]

Check stream validity.

Returns:
True if stream and current position is valid

Implements CPGFStream.

Definition at line 123 of file Stream.h.

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]

Definition at line 101 of file Stream.h.

UINT8* CPGFMemoryStream::m_buffer [protected]

Definition at line 99 of file Stream.h.

UINT8 * CPGFMemoryStream::m_pos [protected]

Definition at line 99 of file Stream.h.

size_t CPGFMemoryStream::m_size [protected]

Definition at line 100 of file Stream.h.


The documentation for this class was generated from the following files:
  • Stream.h
  • Stream.cpp

digikam

Skip menu "digikam"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

API Reference

Skip menu "API Reference"
  • digikam
Generated for API Reference by doxygen 1.5.9-20090814
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal