MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SHM_Reader Class Reference

#include <SHM_Buffer.hpp>

Public Member Functions

 SHM_Reader (char *const _startOfBuffer, Uint32 _sizeOfBuffer, Uint32 _slack, Uint32 *_readIndex, Uint32 *_writeIndex)
void clear ()
bool empty () const
void getReadPtr (Uint32 *&ptr, Uint32 *&eod)
void updateReadPtr (Uint32 *ptr)

Detailed Description

These classes implement a circular buffer

One reader and one writer SHM_Reader

Use as follows: getReadPtr(ptr, sz); for(int i = 0; i<sz; i++) printf("%c\n", ptr[i]); updateReadPtr(sz);

Definition at line 41 of file SHM_Buffer.hpp.

Member Function Documentation

void SHM_Reader::getReadPtr ( Uint32 *&  ptr,
Uint32 *&  eod 
)
inline

Get read pointer

returns ptr - where to start reading sz - how much can I read

Definition at line 103 of file SHM_Buffer.hpp.

void SHM_Reader::updateReadPtr ( Uint32 *  ptr)
inline

Update read ptr

Definition at line 122 of file SHM_Buffer.hpp.


The documentation for this class was generated from the following file: