Main Page   Modules   Class Hierarchy   Data Structures   File List   Data Fields   Globals  

Oscl_Queue_Base Class Reference
[OSCL Base]

#include <oscl_queue.h>

Inheritance diagram for Oscl_Queue_Base:

Oscl_Queue< T, Alloc >

Public Methods

uint32 size () const
uint32 capacity () const
bool empty () const
OSCL_IMPORT_REF void reserve (uint32 n)

Protected Methods

OSCL_IMPORT_REF void construct (Oscl_Opaque_Type_Alloc *aType)
OSCL_IMPORT_REF void construct (Oscl_Opaque_Type_Alloc *aType, uint32 n)
virtual ~Oscl_Queue_Base ()
OSCL_IMPORT_REF void destroy ()
OSCL_IMPORT_REF void push (const OsclAny *x)
OSCL_IMPORT_REF void pop ()
OSCL_IMPORT_REF void clear ()

Protected Attributes

uint32 numelems
uint32 bufsize
OsclAnyelems
uint32 sizeof_T
uint32 ifront
uint32 irear

Detailed Description

Oscl_Queue_Base is a non-templatized base class for Oscl_Queue. The purpose of this base class is to avoid large inline routines in the Oscl_Queue implementation. This class is not intended for direct instantiation except by Oscl_Queue.


Constructor & Destructor Documentation

virtual Oscl_Queue_Base::~Oscl_Queue_Base   [inline, protected, virtual]
 

The destructor.


Member Function Documentation

uint32 Oscl_Queue_Base::capacity   const [inline]
 

Returns the allocated memory of the queue.

OSCL_IMPORT_REF void Oscl_Queue_Base::clear   [protected]
 

Removes all elements.

Reimplemented in Oscl_Queue< T, Alloc >.

OSCL_IMPORT_REF void Oscl_Queue_Base::construct Oscl_Opaque_Type_Alloc   aType,
uint32    n
[protected]
 

OSCL_IMPORT_REF void Oscl_Queue_Base::construct Oscl_Opaque_Type_Alloc   aType [protected]
 

OSCL_IMPORT_REF void Oscl_Queue_Base::destroy   [protected]
 

Like an explicit destructor call.

bool Oscl_Queue_Base::empty   const [inline]
 

True if there are no elements in the queue

OSCL_IMPORT_REF void Oscl_Queue_Base::pop   [protected]
 

Removes the first element

Reimplemented in Oscl_Queue< T, Alloc >.

OSCL_IMPORT_REF void Oscl_Queue_Base::push const OsclAny   x [protected]
 

Inserts a new element at the end. Queue will be grown if necessary. If allocation fails, an OSCL_LEAVE will occur

Parameters:
x  new element

OSCL_IMPORT_REF void Oscl_Queue_Base::reserve uint32    n
 

Reallocates memory if necessary to a capacity of n elements. The main reason for reserve is efficiency. If you know the capacity to which your vector must grow, then it is more efficient to allocate the vector all at once rather than rely on the automatic reallocation scheme. This also helps cotrol the invalidation of iterators.

Parameters:
n  size of vector

uint32 Oscl_Queue_Base::size   const [inline]
 

Returns the size of the queue.


Field Documentation

uint32 Oscl_Queue_Base::bufsize [protected]
 

OsclAny* Oscl_Queue_Base::elems [protected]
 

uint32 Oscl_Queue_Base::ifront [protected]
 

uint32 Oscl_Queue_Base::irear [protected]
 

uint32 Oscl_Queue_Base::numelems [protected]
 

uint32 Oscl_Queue_Base::sizeof_T [protected]
 


The documentation for this class was generated from the following file:
OSCL API
Posting Version: OPENCORE_20090310