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

strigi/src/streams

Strigi::StreamBuffer

Strigi::StreamBuffer< T > Class Template Reference

Provides a buffer for the use of BufferedStream. More...

#include <streambuffer.h>

Inheritance diagram for Strigi::StreamBuffer< T >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 StreamBuffer ()
 ~StreamBuffer ()
int32_t makeSpace (int32_t needed)
int32_t read (const T *&start, int32_t max=0)
void setSize (int32_t size)

Public Attributes

int32_t avail
T * readPos
int32_t size
T * start

Detailed Description

template<class T>
class Strigi::StreamBuffer< T >

Provides a buffer for the use of BufferedStream.

For internal use only.

Definition at line 33 of file streambuffer.h.


Constructor & Destructor Documentation

template<class T >
Strigi::StreamBuffer< T >::StreamBuffer (  )  [inline]

Constructor: initialises members to sane defaults.

For internal use only.

Definition at line 112 of file streambuffer.h.

template<class T >
Strigi::StreamBuffer< T >::~StreamBuffer (  )  [inline]

Destructor: frees the memory used by the buffer.

For internal use only.

Definition at line 117 of file streambuffer.h.


Member Function Documentation

template<class T >
int32_t Strigi::StreamBuffer< T >::makeSpace ( int32_t  needed  )  [inline]

Prepares the buffer for a new write.

For internal use only.

This function invalidates any pointers previously obtained from read.

Returns:
the number of available places

Definition at line 135 of file streambuffer.h.

template<class T>
int32_t Strigi::StreamBuffer< T >::read ( const T *&  start,
int32_t  max = 0 
) [inline]

Read data from the buffer.

For internal use only.

Sets start to point to the data, starting at the item of data following the last item of data read.

Parameters:
start pointer passed by reference. It will be set to point to the data read from the buffer
max the maximum amount of data to read from the buffer
Returns:
the size of the data pointed to by start (always less than or equal to max)

Definition at line 168 of file streambuffer.h.

template<class T >
void Strigi::StreamBuffer< T >::setSize ( int32_t  size  )  [inline]

Sets the size of the buffer, allocating the necessary memory.

For internal use only.

Parameters:
size the size that the buffer should be, in multiples of sizeof(T)

Definition at line 122 of file streambuffer.h.


Member Data Documentation

template<class T>
int32_t Strigi::StreamBuffer< T >::avail

The amount of data available in the buffer.

For internal use only.

The size of the used memory in the buffer, starting from readPos. readPos + avail must be greater than start + size.

Definition at line 62 of file streambuffer.h.

template<class T>
T* Strigi::StreamBuffer< T >::readPos

Pointer to the current position the buffer.

For internal use only.

Definition at line 53 of file streambuffer.h.

template<class T>
int32_t Strigi::StreamBuffer< T >::size

Size of the buffer.

For internal use only.

Size of the memory pointed to by start, in multiples of sizeof(T)

Definition at line 48 of file streambuffer.h.

template<class T>
T* Strigi::StreamBuffer< T >::start

Pointer to the start of the buffer.

For internal use only.

Definition at line 40 of file streambuffer.h.


The documentation for this class was generated from the following file:
  • streambuffer.h

strigi/src/streams

Skip menu "strigi/src/streams"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

KDE Support

Skip menu "KDE Support"
  • akonadi
  • Decibel
  • grantlee
  • kdewin
  • phonon
  •     Backend
  • polkit-qt
  • qca
  • qimageblitz
  • soprano
  • strigi
  •     searchclient
  •     streamanalyzer
  •     streams
Generated for KDE Support 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