Oscl_Vector< T, Alloc > Class Template Reference
[OSCL Base]
#include <oscl_vector.h>
Detailed Description
template<class T, class Alloc>
class Oscl_Vector< T, Alloc >
Oscl_Vector Class. A subset of STL::Vector methods. Oscl_Vector supports random access to elements, constant time insertion and removal of elements at the end of the vector, and linear time insertion and removal of elements at the beginning or middle of the vector. The number of elements in a vector can vary dynamically, and memory management is performed automatically.
Member Typedef Documentation
template<class T, class Alloc>
template<class T, class Alloc>
template<class T, class Alloc>
template<class T, class Alloc>
template<class T, class Alloc>
template<class T, class Alloc>
Constructor & Destructor Documentation
template<class T, class Alloc>
template<class T, class Alloc>
Creates an empty vector with capacity n.
- Parameters:
-
| n | creates a vector with n elements. The main reason for specifying n 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. |
template<class T, class Alloc>
Copy Constructor.
- Parameters:
-
template<class T, class Alloc>
Member Function Documentation
template<class T, class Alloc>
const T& Oscl_Vector< T, Alloc >::back |
( |
|
) |
const [inline] |
Returns the last element.
template<class T, class Alloc>
Returns the last element.
template<class T, class Alloc>
Returns an iterator pointing to the beginning of the vector.
Reimplemented from Oscl_Vector_Base.
Referenced by OsclTimer< Alloc >::Cancel(), Oscl_Vector< OsclNetworkAddress, OsclMemAllocator >::clear(), OsclTimer< Alloc >::Clear(), Oscl_Vector< OsclNetworkAddress, OsclMemAllocator >::front(), Oscl_Vector< OsclNetworkAddress, OsclMemAllocator >::operator[](), PVLogger::RemoveAppender(), Oscl_TagTree< T, Alloc >::Node::sort_children(), OsclTimer< Alloc >::TimerBaseElapsed(), and OsclTimer< Alloc >::~OsclTimer().
template<class T, class Alloc>
template<class T, class Alloc>
template<class T, class Alloc>
Returns an iterator pointing to the end of the vector..
Reimplemented from Oscl_Vector_Base.
Referenced by Oscl_Vector< OsclNetworkAddress, OsclMemAllocator >::back(), OsclTimer< Alloc >::Cancel(), Oscl_Vector< OsclNetworkAddress, OsclMemAllocator >::clear(), OsclTimer< Alloc >::Clear(), Oscl_Vector< OsclNetworkAddress, OsclMemAllocator >::pop_back(), PVLogger::RemoveAppender(), Oscl_TagTree< T, Alloc >::Node::sort_children(), OsclTimer< Alloc >::TimerBaseElapsed(), and OsclTimer< Alloc >::~OsclTimer().
template<class T, class Alloc>
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 |
template<class T, class Alloc>
template<class T, class Alloc>
const T& Oscl_Vector< T, Alloc >::front |
( |
|
) |
const [inline] |
Returns the first element.
template<class T, class Alloc>
Returns the first element.
template<class T, class Alloc>
template<class T, class Alloc>
template<class T, class Alloc>
const T& Oscl_Vector< T, Alloc >::operator[] |
( |
uint32 |
n |
) |
const [inline] |
Returns the n'th element.
- Parameters:
-
| n | element position to return |
template<class T, class Alloc>
T& Oscl_Vector< T, Alloc >::operator[] |
( |
uint32 |
n |
) |
[inline] |
Returns the n'th element.
- Parameters:
-
| n | element position to return |
template<class T, class Alloc>
template<class T, class Alloc>
void Oscl_Vector< T, Alloc >::push_back |
( |
const T & |
x |
) |
[inline] |
template<class T, class Alloc>
void Oscl_Vector< T, Alloc >::push_front |
( |
const T & |
x |
) |
[inline] |
The documentation for this class was generated from the following file: