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

# Oscl_Vector_Base Class Reference
[OSCL Base]

`#include <oscl_vector.h>`

Inheritance diagram for Oscl_Vector_Base:

## 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)
OSCL_IMPORT_REF void | construct (Oscl_Opaque_Type_Alloc *aType, const Oscl_Vector_Base &x)
virtual | ~Oscl_Vector_Base ()
OSCL_IMPORT_REF void | push_back (const OsclAny *x)
OSCL_IMPORT_REF void | pop_back ()
OSCL_IMPORT_REF void | push_front (const OsclAny *x)
OSCL_IMPORT_REF OsclAny * | insert (OsclAny *pos, const OsclAny *x)
OSCL_IMPORT_REF OsclAny * | erase (OsclAny *pos)
OSCL_IMPORT_REF OsclAny * | erase (OsclAny *first, OsclAny *last)
OSCL_IMPORT_REF void | assign_vector (const Oscl_Vector_Base &x)
OSCL_IMPORT_REF void | destroy ()
## Protected Attributes
uint32 | numelems
uint32 | bufsize
OsclAny * | elems
uint32 | sizeof_T
## Friends
class | OsclPriorityQueueBase

## Detailed Description

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

## Constructor & Destructor Documentation

virtual Oscl_Vector_Base::~Oscl_Vector_Base | ( |  | ) | `[inline, protected, virtual]`

| The destructor.

## Member Function Documentation

OSCL_IMPORT_REF void Oscl_Vector_Base::assign_vector | ( | const Oscl_Vector_Base & | x | ) | `[protected]`

uint32 Oscl_Vector_Base::capacity | ( |  | ) | const`[inline]`

| Returns the allocated memory of the vector in units of number of elements.

OSCL_IMPORT_REF void Oscl_Vector_Base::construct | ( | Oscl_Opaque_Type_Alloc * | aType,
|  | const Oscl_Vector_Base & | x
| ) | `[protected]`

OSCL_IMPORT_REF void Oscl_Vector_Base::construct | ( | Oscl_Opaque_Type_Alloc * | aType,
|  | uint32 | n
| ) | `[protected]`

OSCL_IMPORT_REF void Oscl_Vector_Base::construct | ( | Oscl_Opaque_Type_Alloc * | aType | ) | `[protected]`

OSCL_IMPORT_REF void Oscl_Vector_Base::destroy | ( |  | ) | `[protected]`

| Reimplemented in Oscl_Vector< T, Alloc >, Oscl_Vector< OsclComponentRegistryElement, OsclMemAllocator >, Oscl_Vector< uint32, OsclMemAllocator >, Oscl_Vector< OsclSocketServRequestQElem, OsclMemAllocator >, Oscl_Vector< Node *, Alloc >, Oscl_Vector< OsclFixedCacheParam, OsclMemAllocator >, Oscl_Vector< OsclSocketRequest *, OsclMemAllocator >, Oscl_Vector< entry_type *, Alloc >, Oscl_Vector< OSCL_HeapString< OsclMemAllocator >, OsclMemAllocator >, Oscl_Vector< OsclAsyncFileBuffer *, OsclMemAllocator >, Oscl_Vector< TOsclFileOffset, OsclMemAllocator >, Oscl_Vector< MemPoolBufferInfo *, OsclMemAllocator >, Oscl_Vector< OsclSharedPtr< PVLoggerFilter >, alloc_type >, Oscl_Vector< TOsclReady, OsclReadyAlloc >, Oscl_Vector< OsclFileCacheBuffer, OsclMemAllocator >, Oscl_Vector< OsclSharedPtr< PVLoggerAppender >, alloc_type >, Oscl_Vector< OsclAny *, OsclMemAllocator >, and Oscl_Vector< OsclNetworkAddress, OsclMemAllocator >.

bool Oscl_Vector_Base::empty | ( |  | ) | const`[inline]`

| True if the vector's size is 0.

OSCL_IMPORT_REF OsclAny* Oscl_Vector_Base::erase | ( | OsclAny * | first,
|  | OsclAny * | last
| ) | `[protected]`

  | Erases elements in range [first, last). Erasing an element invalidates all iterators pointing to elements following the deletion point. Parameters:
  first | starting position
  last | ending position, this position is not erased

OSCL_IMPORT_REF OsclAny* Oscl_Vector_Base::erase | ( | OsclAny * | pos | ) | `[protected]`

  | Erases the element pointed to by iterator pos. Erasing an element invalidates all iterators pointing to elements following the deletion point. Parameters:
  pos | iterator at erase position

OSCL_IMPORT_REF OsclAny* Oscl_Vector_Base::insert | ( | OsclAny * | pos,
|  | const OsclAny * | x
| ) | `[protected]`

  | Inserts a new element at a specific position. Parameters:
  pos | iterator at insert position.
  x | pointer to new element

OSCL_IMPORT_REF void Oscl_Vector_Base::pop_back | ( |  | ) | `[protected]`

| Removes the last element. Reimplemented in Oscl_Vector< T, Alloc >, Oscl_Vector< OsclComponentRegistryElement, OsclMemAllocator >, Oscl_Vector< uint32, OsclMemAllocator >, Oscl_Vector< OsclSocketServRequestQElem, OsclMemAllocator >, Oscl_Vector< Node *, Alloc >, Oscl_Vector< OsclFixedCacheParam, OsclMemAllocator >, Oscl_Vector< OsclSocketRequest *, OsclMemAllocator >, Oscl_Vector< entry_type *, Alloc >, Oscl_Vector< OSCL_HeapString< OsclMemAllocator >, OsclMemAllocator >, Oscl_Vector< OsclAsyncFileBuffer *, OsclMemAllocator >, Oscl_Vector< TOsclFileOffset, OsclMemAllocator >, Oscl_Vector< MemPoolBufferInfo *, OsclMemAllocator >, Oscl_Vector< OsclSharedPtr< PVLoggerFilter >, alloc_type >, Oscl_Vector< TOsclReady, OsclReadyAlloc >, Oscl_Vector< OsclFileCacheBuffer, OsclMemAllocator >, Oscl_Vector< OsclSharedPtr< PVLoggerAppender >, alloc_type >, Oscl_Vector< OsclAny *, OsclMemAllocator >, and Oscl_Vector< OsclNetworkAddress, OsclMemAllocator >.

OSCL_IMPORT_REF void Oscl_Vector_Base::push_back | ( | const OsclAny * | x | ) | `[protected]`

  | Inserts a new element at the end. Inserting an element invalidates all iterators if memory reallocation occurs as a result of the insertion. Parameters:
  x | pointer to the new element

OSCL_IMPORT_REF void Oscl_Vector_Base::push_front | ( | const OsclAny * | x | ) | `[protected]`

  | Inserts a new element at the front. Inserting an element invalidates all iterators if memory reallocation occurs as a result of the insertion. Parameters:
  x | pointer to new element

OSCL_IMPORT_REF void Oscl_Vector_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_Vector_Base::size | ( |  | ) | const`[inline]`

| Returns the size of the vector in units of number of elements.

## Friends And Related Function Documentation

friend class OsclPriorityQueueBase`[friend]`

## Field Documentation

uint32 Oscl_Vector_Base::bufsize`[protected]`

OsclAny* Oscl_Vector_Base::elems`[protected]`

uint32 Oscl_Vector_Base::numelems`[protected]`

uint32 Oscl_Vector_Base::sizeof_T`[protected]`

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

- oscl_vector.h