CCirBuffer Class Reference

class CCirBuffer : public CCirBuf< TUint8 >

Circular buffer of unsigned 8-bit integers.

The integer values range from 0 to 255.

Inherits from

Constructor & Destructor Documentation

CCirBuffer()

IMPORT_CCCirBuffer()

Default C++ constructor.

~CCirBuffer()

IMPORT_C~CCirBuffer()

Destructor

Member Functions Documentation

Get()

IMPORT_C TIntGet()

Removes an unsigned 8-bit integer value from the circular buffer and returns its value.

The returned TUint8 is promoted to a TInt to allow for negative error codes, e.g. KErrGeneral.

Put(TInt)

IMPORT_C TIntPut(TIntaVal)

Adds an unsigned 8-bit integer value in the range 0 to 255 to the circular buffer.

If the specified integer is outside the range 0 to 255, this method discards all but the lowest 8 bits and treats those as the unsigned integer to store. For example, specifying -2 (or 510, or -258, etc) will result in 254 being stored, and therefore in 254 being returned by the Get() method (and not the number passed to Put()).

CCirBuffer::Get()

Parameters

TInt aValThe unsigned 8-bit integer value to be added.