L4Re - L4 Runtime Environment
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
cxx::List< D, Alloc > Class Template Reference

Doubly linked list, with internal allocation. More...

+ Collaboration diagram for cxx::List< D, Alloc >:

Data Structures

class  Iter
 Iterator. More...

Public Member Functions

void push_back (D const &d) throw ()
 Add element at the end of the list.
void push_front (D const &d) throw ()
 Add element at the beginning of the list.
void remove (Iter const &i) throw ()
 Remove element pointed to by the iterator.
unsigned long size () const throw ()
 Get the length of the list.
D const & operator[] (unsigned long idx) const throw ()
 Random access.
D & operator[] (unsigned long idx) throw ()
 Random access.
Iter items () throw ()
 Get iterator for the list elements.

Detailed Description

template<typename D, template< typename A > class Alloc = New_allocator>
class cxx::List< D, Alloc >

Doubly linked list, with internal allocation.

Container for items of type D, implemented by a doubly linked list. Alloc defines the allocator policy.

Definition at line 335 of file list.

Member Function Documentation

template<typename D , template< typename A > class Alloc = New_allocator>
void cxx::List< D, Alloc >::push_back ( D const &  d) throw ()
inline

Add element at the end of the list.

Definition at line 381 of file list.

template<typename D , template< typename A > class Alloc = New_allocator>
void cxx::List< D, Alloc >::push_front ( D const &  d) throw ()
inline

Add element at the beginning of the list.

Definition at line 390 of file list.

template<typename D , template< typename A > class Alloc = New_allocator>
void cxx::List< D, Alloc >::remove ( Iter const &  i) throw ()
inline

Remove element pointed to by the iterator.

Definition at line 399 of file list.

template<typename D , template< typename A > class Alloc = New_allocator>
unsigned long cxx::List< D, Alloc >::size ( ) const throw ()
inline

Get the length of the list.

Definition at line 403 of file list.

template<typename D , template< typename A > class Alloc = New_allocator>
D const& cxx::List< D, Alloc >::operator[] ( unsigned long  idx) const throw ()
inline

Random access.

Complexity is O(n).

Definition at line 406 of file list.

template<typename D , template< typename A > class Alloc = New_allocator>
D& cxx::List< D, Alloc >::operator[] ( unsigned long  idx) throw ()
inline

Random access.

Complexity is O(n).

Definition at line 410 of file list.

template<typename D , template< typename A > class Alloc = New_allocator>
Iter cxx::List< D, Alloc >::items ( ) throw ()
inline

Get iterator for the list elements.

Definition at line 414 of file list.


The documentation for this class was generated from the following file:
L4Re - L4 Runtime Environment