|
Original Symbian headers
Selected EUSER, Window Server, networking, graphics and device declarations
|
Base class for circular buffers. More...
#include <e32base.h>
Public Member Functions | |
| IMPORT_C | ~CCirBufBase () |
| Destructor. | |
| TInt | Count () const |
| Gets the current number of objects in this circular buffer. | |
| TInt | Length () const |
| Gets the maximum capacity of this circular buffer. | |
| IMPORT_C void | SetLengthL (TInt aLength) |
| Sets the maximum capacity of this circular buffer, and resets all of the buffer pointers. | |
| IMPORT_C void | Reset () |
| Empties the buffer. | |
Public Member Functions inherited from CBase | |
| CBase () | |
| Default constructor. | |
| virtual IMPORT_C | ~CBase () |
| Virtual destructor. | |
| TAny * | operator new (TUint aSize, TAny *aBase) __NO_THROW |
| Initialises the object to binary zeroes. | |
| TAny * | operator new (TUint aSize) __NO_THROW |
| Allocates the object from the heap and then initialises its contents to binary zeroes. | |
| TAny * | operator new (TUint aSize, TLeave) |
| Allocates the object from the heap and then initialises its contents to binary zeroes. | |
| TAny * | operator new (TUint aSize, TUint aExtraSize) __NO_THROW |
| Allocates the object from the heap and then initialises its contents to binary zeroes. | |
| TAny * | operator new (TUint aSize, TLeave, TUint aExtraSize) |
| Allocates the object from the heap and then initialises its contents to binary zeroes. | |
Protected Member Functions | |
| IMPORT_C | CCirBufBase (TInt aSize) |
| Constructor taking the size of an object within the buffer. | |
| IMPORT_C TInt | DoAdd (const TUint8 *aPtr) |
| Implementation function for CCirBuf::Add(const T*) | |
| IMPORT_C TInt | DoAdd (const TUint8 *aPtr, TInt aCount) |
| Implementation function for CCirBuf::Add(const T*,TInt) | |
| IMPORT_C TInt | DoRemove (TUint8 *aPtr) |
| Implementation function for CCirBuf::Remove(T*) | |
| IMPORT_C TInt | DoRemove (TUint8 *aPtr, TInt aCount) |
| Implementation function for CCirBuf::Remove(T*,TInt) | |
Protected Member Functions inherited from CBase | |
| virtual IMPORT_C TInt | Extension_ (TUint aExtensionId, TAny *&a0, TAny *a1) |
| Extension function. | |
Protected Attributes | |
| TInt | iCount |
| TInt | iSize |
| TInt | iLength |
| TUint8 * | iPtr |
| TUint8 * | iPtrE |
| TUint8 * | iHead |
| TUint8 * | iTail |
Additional Inherited Members | |
Static Public Member Functions inherited from CBase | |
| static IMPORT_C void | Delete (CBase *aPtr) |
| Deletes the specified object. | |
Base class for circular buffers.
The class is part of the implementation of circular buffers and is never instantiated.
The class provides member functions that form part of the interface.
| IMPORT_C CCirBufBase::~CCirBufBase | ( | ) |
Destructor.
This frees the memory allocated to the buffer.
(generated from Symbian Developer Library)
|
protected |
Constructor taking the size of an object within the buffer.
| aSize | The size of an object in the buffer. |
Panic condition: E32USER-CBase 72, if aSize is zero or negative.
(generated from Symbian Developer Library)
|
inline |
Gets the current number of objects in this circular buffer.
(generated from Symbian Developer Library)
|
protected |
Implementation function for CCirBuf::Add(const T*)
Adds a single object to the circular buffer, but only if there is space available.
| aPtr | A pointer to the object to be added. |
Panic condition: E32USER-CBase 74, if a call to CCirBufBase::SetLengthL() has not been made before calling this function.
(generated from Symbian Developer Library)
|
protected |
Implementation function for CCirBuf::Add(const T*,TInt)
Adds multiple objects to the circular buffer, but only if there is space available.
| aPtr | A pointer to a set of contiguous objects to be added. |
| aCount | The number of objects to be added. |
Panic condition: E32USER-CBase 74, if a call to CCirBufBase::SetLengthL() has not been made before calling this function.
Panic condition: E32USER-CBase 75, if aCount is not a positive value.
(generated from Symbian Developer Library)
|
protected |
Implementation function for CCirBuf::Remove(T*)
Removes a single object from the circular buffer, but only if there are objects in the buffer.
A binary copy of the object is made to aPtr.
| aPtr | A pointer to a location supplied by the caller. |
(generated from Symbian Developer Library)
|
protected |
Implementation function for CCirBuf::Remove(T*,TInt)
Attempts to remove aCount objects from the circular buffer, but only if there are objects in the buffer.
A binary copy of the objects is made to aPtr.
| aPtr | A pointer to a location supplied by the caller capable of holding aCount objects. |
| aCount | The number of objects to be removed from the circular buffer. |
Panic condition: E32USER-CBase 76, if aCount is not a positive value.
(generated from Symbian Developer Library)
|
inline |
Gets the maximum capacity of this circular buffer.
The capacity is the maximum number of elements that the buffer can hold.
Use SetLengthL() to change the capacity of the circular buffer.
(generated from Symbian Developer Library)
| IMPORT_C void CCirBufBase::Reset | ( | ) |
Empties the buffer.
(generated from Symbian Developer Library)
| IMPORT_C void CCirBufBase::SetLengthL | ( | TInt | aLength | ) |
Sets the maximum capacity of this circular buffer, and resets all of the buffer pointers.
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, then any existing buffer is freed and any information in it is lost.
Notes:
| aLength | The maximum capacity of the circular buffer. |
Panic condition: E32USER-CBase 73, if aLength is zero or negative.
(generated from Symbian Developer Library)