C/C++ API Reference
Loading...
Searching...
No Matches

Oveview

Classes

class  pw::IntrusiveMultiSet< T >
 
class  pw::IntrusiveMultiSet< T >::iterator
 
class  pw::IntrusiveMultiSet< T >::const_iterator
 
class  pw::IntrusiveSet< T >
 
class  pw::IntrusiveSet< T >::iterator
 
class  pw::IntrusiveSet< T >::const_iterator
 

Typedefs

using pw::IntrusiveMultiSet< T >::Item = typename Tree::Item
 IntrusiveMultiSet items must derive from Item.
 
using pw::IntrusiveMultiSet< T >::key_type = T
 
using pw::IntrusiveMultiSet< T >::value_type = T
 
using pw::IntrusiveMultiSet< T >::size_type = std::size_t
 
using pw::IntrusiveMultiSet< T >::difference_type = std::ptrdiff_t
 
using pw::IntrusiveMultiSet< T >::key_compare = Compare
 
using pw::IntrusiveMultiSet< T >::value_compare = Compare
 
using pw::IntrusiveMultiSet< T >::reference = value_type &
 
using pw::IntrusiveMultiSet< T >::const_reference = const value_type &
 
using pw::IntrusiveMultiSet< T >::pointer = value_type *
 
using pw::IntrusiveMultiSet< T >::const_pointer = const value_type *
 
using pw::IntrusiveMultiSet< T >::reverse_iterator = std::reverse_iterator< iterator >
 
using pw::IntrusiveMultiSet< T >::const_reverse_iterator = std::reverse_iterator< const_iterator >
 
using pw::IntrusiveSet< T >::Item = typename Tree::Item
 IntrusiveSet items must derive from Item.
 
using pw::IntrusiveSet< T >::key_type = T
 
using pw::IntrusiveSet< T >::value_type = T
 
using pw::IntrusiveSet< T >::size_type = std::size_t
 
using pw::IntrusiveSet< T >::difference_type = std::ptrdiff_t
 
using pw::IntrusiveSet< T >::key_compare = Compare
 
using pw::IntrusiveSet< T >::value_compare = Compare
 
using pw::IntrusiveSet< T >::reference = value_type &
 
using pw::IntrusiveSet< T >::const_reference = const value_type &
 
using pw::IntrusiveSet< T >::pointer = value_type *
 
using pw::IntrusiveSet< T >::const_pointer = const value_type *
 
using pw::IntrusiveSet< T >::reverse_iterator = std::reverse_iterator< iterator >
 
using pw::IntrusiveSet< T >::const_reverse_iterator = std::reverse_iterator< const_iterator >
 

Functions

constexpr pw::IntrusiveMultiSet< T >::IntrusiveMultiSet ()
 Constructs an empty set of items.
 
template<typename Comparator >
constexpr pw::IntrusiveMultiSet< T >::IntrusiveMultiSet (Comparator compare)
 
template<typename Iterator , typename... Functors>
 pw::IntrusiveMultiSet< T >::IntrusiveMultiSet (Iterator first, Iterator last, Functors &&... functors)
 
template<typename... Functors>
 pw::IntrusiveMultiSet< T >::IntrusiveMultiSet (std::initializer_list< T * > items, Functors &&... functors)
 
iterator pw::IntrusiveMultiSet< T >::begin () noexcept
 
const_iterator pw::IntrusiveMultiSet< T >::begin () const noexcept
 
const_iterator pw::IntrusiveMultiSet< T >::cbegin () const noexcept
 
iterator pw::IntrusiveMultiSet< T >::end () noexcept
 
const_iterator pw::IntrusiveMultiSet< T >::end () const noexcept
 
const_iterator pw::IntrusiveMultiSet< T >::cend () const noexcept
 
reverse_iterator pw::IntrusiveMultiSet< T >::rbegin () noexcept
 
const_reverse_iterator pw::IntrusiveMultiSet< T >::rbegin () const noexcept
 
const_reverse_iterator pw::IntrusiveMultiSet< T >::crbegin () const noexcept
 
reverse_iterator pw::IntrusiveMultiSet< T >::rend () noexcept
 
const_reverse_iterator pw::IntrusiveMultiSet< T >::rend () const noexcept
 
const_reverse_iterator pw::IntrusiveMultiSet< T >::crend () const noexcept
 
bool pw::IntrusiveMultiSet< T >::empty () const noexcept
 Returns whether the multiset has zero items or not.
 
size_t pw::IntrusiveMultiSet< T >::size () const
 Returns the number of items in the multiset.
 
constexpr size_t pw::IntrusiveMultiSet< T >::max_size () const noexcept
 
void pw::IntrusiveMultiSet< T >::clear ()
 
iterator pw::IntrusiveMultiSet< T >::insert (T &item)
 Adds the given item to the multiset.
 
iterator pw::IntrusiveMultiSet< T >::insert (iterator, T &item)
 
template<class Iterator >
void pw::IntrusiveMultiSet< T >::insert (Iterator first, Iterator last)
 
void pw::IntrusiveMultiSet< T >::insert (std::initializer_list< T * > ilist)
 
iterator pw::IntrusiveMultiSet< T >::erase (iterator pos)
 
iterator pw::IntrusiveMultiSet< T >::erase (iterator first, iterator last)
 
size_t pw::IntrusiveMultiSet< T >::erase (const T &item)
 
void pw::IntrusiveMultiSet< T >::swap (IntrusiveMultiSet< T > &other)
 Exchanges this multiset's items with the other multiset's items.
 
template<typename MapType >
void pw::IntrusiveMultiSet< T >::merge (MapType &other)
 
size_t pw::IntrusiveMultiSet< T >::count (const T &item) const
 Returns the number of items in the multimap with the given key.
 
iterator pw::IntrusiveMultiSet< T >::find (const T &item)
 
const_iterator pw::IntrusiveMultiSet< T >::find (const T &item) const
 
std::pair< iterator, iteratorpw::IntrusiveMultiSet< T >::equal_range (const T &item)
 
std::pair< const_iterator, const_iteratorpw::IntrusiveMultiSet< T >::equal_range (const T &item) const
 
iterator pw::IntrusiveMultiSet< T >::lower_bound (const T &item)
 
const_iterator pw::IntrusiveMultiSet< T >::lower_bound (const T &item) const
 
iterator pw::IntrusiveMultiSet< T >::upper_bound (const T &item)
 
const_iterator pw::IntrusiveMultiSet< T >::upper_bound (const T &item) const
 
constexpr pw::IntrusiveSet< T >::IntrusiveSet ()
 Constructs an empty set of items.
 
template<typename Comparator >
constexpr pw::IntrusiveSet< T >::IntrusiveSet (Comparator compare)
 
template<typename Iterator , typename... Functors>
 pw::IntrusiveSet< T >::IntrusiveSet (Iterator first, Iterator last, Functors &&... functors)
 
template<typename... Functors>
 pw::IntrusiveSet< T >::IntrusiveSet (std::initializer_list< T * > items, Functors &&... functors)
 
iterator pw::IntrusiveSet< T >::begin () noexcept
 
const_iterator pw::IntrusiveSet< T >::begin () const noexcept
 
const_iterator pw::IntrusiveSet< T >::cbegin () const noexcept
 
iterator pw::IntrusiveSet< T >::end () noexcept
 
const_iterator pw::IntrusiveSet< T >::end () const noexcept
 
const_iterator pw::IntrusiveSet< T >::cend () const noexcept
 
reverse_iterator pw::IntrusiveSet< T >::rbegin () noexcept
 
const_reverse_iterator pw::IntrusiveSet< T >::rbegin () const noexcept
 
const_reverse_iterator pw::IntrusiveSet< T >::crbegin () const noexcept
 
reverse_iterator pw::IntrusiveSet< T >::rend () noexcept
 
const_reverse_iterator pw::IntrusiveSet< T >::rend () const noexcept
 
const_reverse_iterator pw::IntrusiveSet< T >::crend () const noexcept
 
bool pw::IntrusiveSet< T >::empty () const noexcept
 Returns whether the set has zero items or not.
 
size_t pw::IntrusiveSet< T >::size () const
 Returns the number of items in the set.
 
constexpr size_t pw::IntrusiveSet< T >::max_size () const noexcept
 
void pw::IntrusiveSet< T >::clear ()
 
std::pair< iterator, bool > pw::IntrusiveSet< T >::insert (T &item)
 
iterator pw::IntrusiveSet< T >::insert (iterator, T &item)
 
template<class Iterator >
void pw::IntrusiveSet< T >::insert (Iterator first, Iterator last)
 
void pw::IntrusiveSet< T >::insert (std::initializer_list< T * > ilist)
 
iterator pw::IntrusiveSet< T >::erase (iterator pos)
 
iterator pw::IntrusiveSet< T >::erase (iterator first, iterator last)
 
size_t pw::IntrusiveSet< T >::erase (const T &item)
 
void pw::IntrusiveSet< T >::swap (IntrusiveSet< T > &other)
 Exchanges this set's items with the other set's items.
 
template<typename MapType >
void pw::IntrusiveSet< T >::merge (MapType &other)
 
size_t pw::IntrusiveSet< T >::count (const T &item) const
 
iterator pw::IntrusiveSet< T >::find (const T &item)
 
const_iterator pw::IntrusiveSet< T >::find (const T &item) const
 
std::pair< iterator, iteratorpw::IntrusiveSet< T >::equal_range (const T &item)
 
std::pair< const_iterator, const_iteratorpw::IntrusiveSet< T >::equal_range (const T &item) const
 
iterator pw::IntrusiveSet< T >::lower_bound (const T &item)
 
const_iterator pw::IntrusiveSet< T >::lower_bound (const T &item) const
 
iterator pw::IntrusiveSet< T >::upper_bound (const T &item)
 
const_iterator pw::IntrusiveSet< T >::upper_bound (const T &item) const
 

Friends

template<typename >
class pw::IntrusiveMultiSet< T >::IntrusiveSet
 
template<typename >
class pw::IntrusiveSet< T >::IntrusiveMultiSet
 

Function Documentation

◆ clear() [1/2]

template<typename T >
void pw::IntrusiveMultiSet< T >::clear ( )
inline

Removes all items from the multiset and leaves it empty.

The items themselves are not destructed.

◆ clear() [2/2]

template<typename T >
void pw::IntrusiveSet< T >::clear ( )
inline

Removes all items from the set and leaves it empty.

The items themselves are not destructed.

◆ count()

template<typename T >
size_t pw::IntrusiveSet< T >::count ( const T &  item) const
inline

Returns the number of equivalent items in the set.

Since the set requires unique keys, this is always 0 or 1.

◆ equal_range() [1/2]

template<typename T >
std::pair< iterator, iterator > pw::IntrusiveMultiSet< T >::equal_range ( const T &  item)
inline

Returns a pair of iterators where the first points to the item with the smallest key that is not less than the given key, and the second points to the item with the smallest key that is greater than the given key.

◆ equal_range() [2/2]

template<typename T >
std::pair< iterator, iterator > pw::IntrusiveSet< T >::equal_range ( const T &  item)
inline

Returns a pair of iterators where the first points to the smallest item that is not less than the given item, and the second points to the smallest item that is strictly greater than the given item.

◆ erase() [1/2]

template<typename T >
iterator pw::IntrusiveMultiSet< T >::erase ( iterator  pos)
inline

Removes an item from the multiset and returns an iterator to the item after the removed item.

The items themselves are not destructed.

◆ erase() [2/2]

template<typename T >
iterator pw::IntrusiveSet< T >::erase ( iterator  pos)
inline

Removes an item from the set and returns an iterator to the item after the removed item..

The items themselves are not destructed.

◆ find() [1/2]

template<typename T >
iterator pw::IntrusiveMultiSet< T >::find ( const T &  item)
inline

Returns a pointer to an item with the given key, or null if the multimap does not contain such an item.

◆ find() [2/2]

template<typename T >
iterator pw::IntrusiveSet< T >::find ( const T &  item)
inline

Returns a pointer to an item with the given key, or null if the set does not contain such an item.

◆ insert()

template<typename T >
std::pair< iterator, bool > pw::IntrusiveSet< T >::insert ( T &  item)
inline

Attempts to add the given item to the set.

The item will be added if the set does not already contain an equivalent item.

Returns
A pointer to the inserted item and true, or a pointer to the equivalent item and false.

◆ IntrusiveMultiSet() [1/3]

template<typename T >
template<typename Comparator >
constexpr pw::IntrusiveMultiSet< T >::IntrusiveMultiSet ( Comparator  compare)
inlineexplicitconstexpr

Constructs an empty set of items.

SFINAE is used to disambiguate between this constructor and the one that takes an initializer list.

Parameters
CompareFunction with the signature bool(T, T) that is used to order items.

◆ IntrusiveMultiSet() [2/3]

template<typename T >
template<typename Iterator , typename... Functors>
pw::IntrusiveMultiSet< T >::IntrusiveMultiSet ( Iterator  first,
Iterator  last,
Functors &&...  functors 
)
inline

Constructs an IntrusiveMultiSet from an iterator over Items.

The iterator may dereference as either Item& (e.g. from std::array<Item>) or Item* (e.g. from std::initializer_list<Item*>).

◆ IntrusiveMultiSet() [3/3]

template<typename T >
template<typename... Functors>
pw::IntrusiveMultiSet< T >::IntrusiveMultiSet ( std::initializer_list< T * >  items,
Functors &&...  functors 
)
inline

Constructs an IntrusiveMultiSet from a std::initializer_list of pointers to items.

◆ IntrusiveSet() [1/3]

template<typename T >
template<typename Comparator >
constexpr pw::IntrusiveSet< T >::IntrusiveSet ( Comparator  compare)
inlineexplicitconstexpr

Constructs an empty set of items.

SFINAE is used to disambiguate between this constructor and the one that takes an initializer list.

Parameters
CompareFunction with the signature bool(T, T) that is used to order items.

◆ IntrusiveSet() [2/3]

template<typename T >
template<typename Iterator , typename... Functors>
pw::IntrusiveSet< T >::IntrusiveSet ( Iterator  first,
Iterator  last,
Functors &&...  functors 
)
inline

Constructs an IntrusiveSet from an iterator over Items.

The iterator may dereference as either Item& (e.g. from std::array<Item>) or Item* (e.g. from std::initializer_list<Item*>).

◆ IntrusiveSet() [3/3]

template<typename T >
template<typename... Functors>
pw::IntrusiveSet< T >::IntrusiveSet ( std::initializer_list< T * >  items,
Functors &&...  functors 
)
inline

Constructs an IntrusiveSet from a std::initializer_list of pointers to items.

◆ lower_bound() [1/2]

template<typename T >
iterator pw::IntrusiveMultiSet< T >::lower_bound ( const T &  item)
inline

Returns an iterator to the item in the multimap with the smallest key that is greater than or equal to the given key, or end() if the multimap is empty.

◆ lower_bound() [2/2]

template<typename T >
iterator pw::IntrusiveSet< T >::lower_bound ( const T &  item)
inline

Returns an iterator to the smallest item in the set that is greater than or equal to the given item, or end() if the set is empty.

◆ max_size() [1/2]

template<typename T >
constexpr size_t pw::IntrusiveMultiSet< T >::max_size ( ) const
inlineconstexprnoexcept

Returns how many items can be added.

As an intrusive container, this is effectively unbounded.

◆ max_size() [2/2]

template<typename T >
constexpr size_t pw::IntrusiveSet< T >::max_size ( ) const
inlineconstexprnoexcept

Returns how many items can be added.

As an intrusive container, this is effectively unbounded.

◆ merge() [1/2]

template<typename T >
template<typename MapType >
void pw::IntrusiveMultiSet< T >::merge ( MapType &  other)
inline

Splices items from the other set into this one.

The receiving set's Compare function is used when inserting items.

◆ merge() [2/2]

template<typename T >
template<typename MapType >
void pw::IntrusiveSet< T >::merge ( MapType &  other)
inline

Splices items from the other set into this one.

The receiving set's Compare function is used when inserting items.

◆ upper_bound() [1/2]

template<typename T >
iterator pw::IntrusiveMultiSet< T >::upper_bound ( const T &  item)
inline

Returns an iterator to the item in the multimap with the smallest key that is strictly greater than the given key, or end() if the multimap is empty.

◆ upper_bound() [2/2]

template<typename T >
iterator pw::IntrusiveSet< T >::upper_bound ( const T &  item)
inline

Returns an iterator to the smallest item in the set that is strictly greater than the given item, or end() if the set is empty.