Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: e32base.h
Link against: euser.lib

Class CCirBuffer

class CCirBuffer : public CCirBuf< TUint8 >;

Description

Circular buffer of unsigned integers.

The integer values range from -128 to +127.

Derivation

Members

Defined in CCirBuffer:
CCirBuffer(), Get(), Put(), ~CCirBuffer()


Construction and destruction


CCirBuffer()

IMPORT_C CCirBuffer();

Description

Default C++ constructor.


~CCirBuffer()

IMPORT_C ~CCirBuffer();

Description

Destructor

[Top]


Member functions


Get()

IMPORT_C TInt Get();

Description

Removes an unsigned 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.

Return value

TInt

The unsigned integer value removed from the circular buffer. KErrGeneral, if the circular buffer is empty.


Put()

IMPORT_C TInt Put(TInt aVal);

Description

Adds a signed integer value in the range -128 to +127 to the circular buffer.

Parameters

TInt aVal

The signed integer value to be added.

Return value

TInt

KErrNone, if the unsigned integer is successfully added. KErrGeneral, if the unsigned integer cannnot be added because the circular buffer is full.