L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
cxx::Bits::Smart_ptr_list< ITEM > Class Template Reference

List of smart-pointer-managed objects. More...

#include <smart_ptr_list.h>

+ Inheritance diagram for cxx::Bits::Smart_ptr_list< ITEM >:
+ Collaboration diagram for cxx::Bits::Smart_ptr_list< ITEM >:

Public Member Functions

void push_front (Next_type &&e)
 Add an element to the front of the list.
 
void push_front (Next_type const &e)
 Add an element to the front of the list.
 
void push_back (Next_type &&e)
 Add an element at the end of the list.
 
void push_back (Next_type const &e)
 Add an element at the end of the list.
 
Value_type * front () const
 Return a pointer to the first element in the list.
 
Next_type pop_front ()
 Remove the element in front of the list and return it.
 
bool empty () const
 Check if the list is empty.
 

Detailed Description

template<typename ITEM>
class cxx::Bits::Smart_ptr_list< ITEM >

List of smart-pointer-managed objects.

Template Parameters
ITEMType of the list items.

The list is implemented as a single-linked list connected via smart pointers, so that they are automatically cleaned up when they are removed from the list.

Definition at line 47 of file smart_ptr_list.h.

Member Function Documentation

◆ pop_front()

template<typename ITEM >
Next_type cxx::Bits::Smart_ptr_list< ITEM >::pop_front ( )
inline

Remove the element in front of the list and return it.

Returns
The element that was previously in front of the list as a managed pointer or a nullptr-equivalent when the list was already empty.

Definition at line 150 of file smart_ptr_list.h.


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