Logo Search packages:      
Sourcecode: xulrunner version File versions  Download package

nsTArray< E > Class Template Reference

#include <nsTArray.h>

Inheritance diagram for nsTArray< E >:

List of all members.


Detailed Description

template<class E>
class nsTArray< E >

Returns:
True if the elements are equals; false otherwise.

True if (a < b); false otherwise.

Definition at line 257 of file nsTArray.h.


Public Types

enum  { NoIndex = index_type(-1) }
typedef nsTArrayElementTraits< E > elem_traits
typedef E elem_type
typedef PRUint32 index_type
typedef nsTArray< E > self_type
typedef PRUint32 size_type

Public Member Functions

elem_type * AppendElement ()
template<class Item>
elem_type * AppendElement (const Item &item)
elem_type * AppendElements (size_type count)
template<class Item>
elem_type * AppendElements (const nsTArray< Item > &array)
template<class Item>
elem_type * AppendElements (const Item *array, size_type arrayLen)
template<class Item>
index_type BinaryIndexOf (const Item &item) const
template<class Item, class Comparator>
index_type BinaryIndexOf (const Item &item, const Comparator &comp) const
size_type Capacity () const
void Clear ()
void Compact ()
template<class Item>
PRBool Contains (const Item &item) const
template<class Item, class Comparator>
PRBool Contains (const Item &item, const Comparator &comp) const
const elem_type & ElementAt (index_type i) const
elem_type & ElementAt (index_type i)
const elem_type * Elements () const
elem_type * Elements ()
template<class Item>
index_type IndexOf (const Item &item, index_type start=0) const
template<class Item, class Comparator>
index_type IndexOf (const Item &item, index_type start, const Comparator &comp) const
elem_type * InsertElementAt (index_type index)
template<class Item>
elem_type * InsertElementAt (index_type index, const Item &item)
template<class Item>
elem_type * InsertElementsAt (index_type index, size_type count, const Item &item)
elem_type * InsertElementsAt (index_type index, size_type count)
template<class Item>
elem_type * InsertElementsAt (index_type index, const nsTArray< Item > &array)
template<class Item>
elem_type * InsertElementsAt (index_type index, const Item *array, size_type arrayLen)
PRBool IsEmpty () const
template<class Item>
index_type LastIndexOf (const Item &item, index_type start=NoIndex) const
template<class Item, class Comparator>
index_type LastIndexOf (const Item &item, index_type start, const Comparator &comp) const
size_type Length () const
 nsTArray (const self_type &other)
 nsTArray (size_type capacity)
nsTArrayoperator= (const self_type &other)
const elem_type & operator[] (index_type i) const
elem_type & operator[] (index_type i)
template<class Item>
PRBool RemoveElement (const Item &item)
template<class Item, class Comparator>
PRBool RemoveElement (const Item &item, const Comparator &comp)
void RemoveElementAt (index_type index)
void RemoveElementsAt (index_type start, size_type count)
template<class Item>
elem_type * ReplaceElementsAt (index_type start, size_type count, const Item &item)
template<class Item>
elem_type * ReplaceElementsAt (index_type start, size_type count, const nsTArray< Item > &array)
template<class Item>
elem_type * ReplaceElementsAt (index_type start, size_type count, const Item *array, size_type arrayLen)
const elem_type & SafeElementAt (index_type i, const elem_type &def) const
elem_type & SafeElementAt (index_type i, elem_type &def)
PRBool SetCapacity (size_type capacity)
PRBool SetLength (size_type newLen)
void Sort ()
template<class Comparator>
void Sort (const Comparator &comp)
PRBool SwapElements (self_type &other)
void TruncateLength (size_type newLen)

Protected Member Functions

template<class Item>
void AssignRange (index_type start, size_type count, const Item *values)
void DestructRange (index_type start, size_type count)
PRBool EnsureCapacity (size_type capacity, size_type elementSize)
PRBool EnsureNotUsingAutoArrayBuffer (size_type elemSize)
Header * GetAutoArrayBuffer ()
void IncrementLength (PRUint32 n)
PRBool InsertSlotsAt (index_type index, size_type count, size_type elementSize)
PRBool IsAutoArray ()
void ShiftData (index_type start, size_type oldLen, size_type newLen, size_type elementSize)
void ShrinkCapacity (size_type elementSize)
PRBool SwapArrayElements (nsTArray_base &other, size_type elementSize)
PRBool UsesAutoArrayBuffer ()

Protected Attributes

Header * mHdr

Static Protected Attributes

static Header sEmptyHdr = { 0, 0, 0 }

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

Generated by  Doxygen 1.6.0   Back to index