L4Re Operating System Framework – Interface and Usage Documentation
Loading...
Searching...
No Matches
cxx::List< D, Alloc > Class Template Reference

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

#include <list>

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

Data Structures

class  Iter
 Iterator. More...
 

Public Member Functions

void push_back (D const &d) noexcept
 Add element at the end of the list.
 
void push_front (D const &d) noexcept
 Add element at the beginning of the list.
 
void remove (Iter const &i) noexcept
 Remove element pointed to by the iterator.
 
unsigned long size () const noexcept
 Get the length of the list.
 
D const & operator[] (unsigned long idx) const noexcept
 Random access.
 
D & operator[] (unsigned long idx) noexcept
 Random access.
 
Iter items () noexcept
 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 334 of file list.

Member Function Documentation

◆ operator[]() [1/2]

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

Random access.

Complexity is O(n).

Definition at line 404 of file list.

◆ operator[]() [2/2]

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

Random access.

Complexity is O(n).

Definition at line 408 of file list.


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