Original Symbian headers
Selected EUSER, Window Server, networking, graphics and device declarations
Loading...
Searching...
No Matches
CCirBuffer Class Reference

Circular buffer of unsigned 8-bit integers. More...

#include <e32base.h>

Inheritance diagram for CCirBuffer:
CCirBuf< TUint8 > CCirBufBase CBase

Public Member Functions

IMPORT_C CCirBuffer ()
 Default C++ constructor.
 
IMPORT_C ~CCirBuffer ()
 Destructor.
 
IMPORT_C TInt Get ()
 Removes an unsigned 8-bit integer value from the circular buffer and returns its value.
 
IMPORT_C TInt Put (TInt aVal)
 Adds an unsigned 8-bit integer value in the range 0 to 255 to the circular buffer.
 
- Public Member Functions inherited from CCirBuf< TUint8 >
 CCirBuf ()
 Default C++ constructor.
 
TInt Add (const TUint8 *aPtr)
 Adds a single object to the circular buffer.
 
TInt Add (const TUint8 *aPtr, TInt aCount)
 Adds multiple objects to the circular buffer.
 
TInt Remove (TUint8 *aPtr)
 Removes a single object from the circular buffer.
 
TInt Remove (TUint8 *aPtr, TInt aCount)
 Removes multiple objects from the circular buffer.
 
- Public Member Functions inherited from CCirBufBase
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.
 

Additional Inherited Members

- Static Public Member Functions inherited from CBase
static IMPORT_C void Delete (CBase *aPtr)
 Deletes the specified object.
 
- Protected Member Functions inherited from CCirBufBase
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 inherited from CCirBufBase
TInt iCount
 
TInt iSize
 
TInt iLength
 
TUint8 * iPtr
 
TUint8 * iPtrE
 
TUint8 * iHead
 
TUint8 * iTail
 

Detailed Description

Circular buffer of unsigned 8-bit integers.

The integer values range from 0 to 255.

API status
Published to all clients. Released API.

Definition at line 1603 of file e32base.h.

Constructor & Destructor Documentation

◆ CCirBuffer()

IMPORT_C CCirBuffer::CCirBuffer ( )

Default C++ constructor.

(generated from Symbian Developer Library)

◆ ~CCirBuffer()

IMPORT_C CCirBuffer::~CCirBuffer ( )

Destructor.

(generated from Symbian Developer Library)

Member Function Documentation

◆ Get()

IMPORT_C TInt CCirBuffer::Get ( )

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.

(generated from Symbian Developer Library)

◆ Put()

IMPORT_C TInt CCirBuffer::Put ( TInt  aVal)

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
aValThe unsigned 8-bit integer value to be added.

(generated from Symbian Developer Library)


The documentation for this class was generated from the following files: