C/C++ API Reference
Loading...
Searching...
No Matches
pw::containers::internal::GenericIntrusiveList< Item > Class Template Reference

Overview

template<typename Item>
class pw::containers::internal::GenericIntrusiveList< Item >

Generic intrusive list implementation.

This implementation relies on the Item type to provide details of how to navigate the list. It provides methods similar to std::forward_list and std::list.

Template Parameters
ItemThe type used to intrusive store list pointers.

Public Member Functions

template<typename Iterator >
 GenericIntrusiveList (Iterator first, Iterator last)
 
 GenericIntrusiveList (const GenericIntrusiveList &)=delete
 
GenericIntrusiveListoperator= (const GenericIntrusiveList &)=delete
 
 GenericIntrusiveList (GenericIntrusiveList &&other)
 
GenericIntrusiveListoperator= (GenericIntrusiveList &&other)
 
template<typename Iterator >
void assign (Iterator first, Iterator last)
 
constexpr Item * before_begin () noexcept
 Returns a pointer to the sentinel item.
 
constexpr const Item * before_begin () const noexcept
 
constexpr Item * begin () noexcept
 Returns a pointer to the first item.
 
constexpr const Item * begin () const noexcept
 
Item * before_end () noexcept
 Returns a pointer to the last item.
 
constexpr Item * end () noexcept
 Returns a pointer to the sentinel item.
 
constexpr const Item * end () const noexcept
 
bool empty () const noexcept
 
constexpr size_t max_size () const noexcept
 
void clear ()
 Removes all items from the list.
 
void swap (GenericIntrusiveList< Item > &other)
 
template<typename Compare >
void merge (GenericIntrusiveList< Item > &other, Compare comp)
 
bool remove (const Item &item_to_remove)
 
template<typename UnaryPredicate >
size_t remove_if (UnaryPredicate pred, size_t max=std::numeric_limits< size_t >::max())
 
void reverse ()
 Reverses the order of items in the list.
 
template<typename BinaryPredicate >
size_t unique (BinaryPredicate pred)
 
template<typename Compare >
void sort (Compare comp)
 

Static Public Member Functions

static Item * insert_after (Item *prev, Item &item)
 
template<typename Iterator >
static Item * insert_after (Item *prev, Iterator first, Iterator last)
 
static Item * erase_after (Item *item)
 
static Item * erase_after (Item *first, Item *last)
 Removes the range of items exclusively between first and last.
 
static void splice_after (Item *pos, GenericIntrusiveList< Item > &other, Item *first, Item *last)
 

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