Location:
e32base.h
Link against: euser.lib
class CCirBuf<class T> : public CCirBufBase;
Supported from 5.0
A circular buffer containing objects of a type defined by the template parameter.
|
Defined in CCirBuf
:
Add()
, CCirBuf()
, Remove()
Inherited from CBase
:
operator new()
Inherited from CCirBufBase
:
Count()
,
Length()
,
Reset()
,
SetLengthL()
CCirBuf();
Default C++ constructor.
The size of each object in the buffer is fixed and is the length of the class passed as the template parameter. The length of the template class must be non-zero otherwise the constructor raises an E32USER-CBase 72 panic.
TInt Add(const T* aPtr);
Adds a single object to the circular buffer. The object is of
type class T
and is only added if there is space available.
Notes:
A call to CCirBufBase::SetLengthL()
must already
have been made before calling this function, otherwise an E32USER-CBase 74
panic is raised.
|
|
TInt Add(const T* aPtr,TInt aCount);
Adds multiple objects to the circular buffer. The function
attempts to add aCount
objects of type class T
. The
objects are only added if there is space available.
Note:
A call to CCirBufBase::SetLengthL()
must already
have been made before calling Add()
, otherwise an E32USER-CBase 74
panic is raised
|
|
TInt Remove(T* aPtr);
Removes a single object from the circular buffer. The object is of
type class T
and can only be removed if there are objects in the
buffer.
A binary copy of the object is made to aPtr
.
|
|
TInt Remove(T* aPtr,TInt aCount);
Removes multiple objects from the circular buffer. The function
attempts to remove aCount
objects of type class T
.
Objects can only be removed if there are objects in the buffer
A binary copy of the objects is made to aPtr
.
|
|