Logo Search packages:      
Sourcecode: virtualbox-ose version File versions  Download package

tmVector Class Reference

#include <tmVector.h>

List of all members.


Detailed Description

A simple, clear, self-growing, collection of objects. typed independant basically a growing array. Useful in situations where you need an indexed collection but do not know the size in advance and need the ability for increase and decrease in size. Not optimized for anything in particular, or any size in particular.

Is able to guarantee the index of an item will not change due to removals of a lower indexed item. The growing, and shrinking all happens to the end of the collection

Does not backfill, adds to the end. At some point this should be changed to make best use of space.

Definition at line 59 of file tmVector.h.


Public Member Functions

PRInt32 Append (void *aElement)
void Clear ()
PRUint32 Count ()
nsresult Init ()
void * operator[] (PRUint32 index)
void Remove (void *aElement)
void RemoveAt (PRUint32 aIndex)
PRUint32 Size ()
 tmVector ()
virtual ~tmVector ()

Protected Member Functions

nsresult Grow ()
nsresult Shrink ()

Protected Attributes

PRUint32 mCapacity
PRUint32 mCount
void ** mElements
PRUint32 mNext

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

Generated by  Doxygen 1.6.0   Back to index