Location:
e32base.h
Link against: euser.lib
CCirBufBase
Supported from 5.0
Base class for circular buffers. The class is part of the implementation of circular buffers and is never instantiated. It provides member functions which form part of the interface.
|
Defined in CCirBufBase
:
Count()
, Length()
, Reset()
, SetLengthL()
, ~CCirBufBase()
Inherited from CBase
:
operator new()
void SetLengthL(TInt aLength);
Sets the maximum capacity of this circular buffer. The capacity is the maximum number of elements that the buffer can hold.
The buffer itself is allocated as a result of a call to this function. If the function has previously been called, any existing buffer is freed and any information in it is lost.
Notes:
This function must be called before attempting to add any objects to the buffer.
|
|
TInt Length() const;
Gets the maximum capacity of this circular buffer. The capacity is the maximum number of elements that the buffer can hold.
Use CCirBufBase::SetLengthL()
to change the capacity
of the circular buffer.
|
TInt Count() const;
Gets the current number of objects in this circular buffer.
|
void Reset();
Empties the buffer.