#include <aa_tree.h>
Public Types | |
using | iterator = AATreeIterator<> |
Public Member Functions | |
constexpr | GenericAATree (bool unique_keys) |
~GenericAATree () | |
Destructor. | |
GenericAATree (const GenericAATree &)=delete | |
GenericAATree & | operator= (const GenericAATree &)=delete |
constexpr bool | unique_keys () const |
void | SetRoot (AATreeItem *item) |
Sets the tree's root item. | |
constexpr iterator | begin () noexcept |
Returns a pointer to the first item, if any. | |
constexpr iterator | end () noexcept |
Returns a pointer to the last item, if any. | |
constexpr bool | empty () const |
Returns whether the tree has zero items or not. | |
size_t | size () const |
Returns the number of items in the tree. | |
constexpr size_t | max_size () const noexcept |
void | clear () |
iterator | erase_one (AATreeItem &item) |
iterator | erase_range (AATreeItem &first, AATreeItem &last) |
void | swap (GenericAATree &other) |
Exchanges this tree's items with the other tree's items. | |
Friends | |
template<typename , typename > | |
class | AATree |
Base type for an AA tree that is devoid of template parameters.
This generic class does not implement any functionality that requires comparing keys, and should not be used directly. Instead, see the AATree
class that is templated on methods to get and compare keys.
|
inlineexplicitconstexpr |
Constructs an empty AA tree.
unique_keys | Indicates if this tree requires unique keys or allows duplicate keys. |
void pw::containers::internal::GenericAATree::clear | ( | ) |
Removes all items from the tree and leaves it empty.
The items themselves are not destructed.
iterator pw::containers::internal::GenericAATree::erase_one | ( | AATreeItem & | item | ) |
Removes an item from the tree and returns an iterator to the item after the removed item.
The items themselves are not destructed.
iterator pw::containers::internal::GenericAATree::erase_range | ( | AATreeItem & | first, |
AATreeItem & | last | ||
) |
Removes the items from first, inclusive, to last, exclusive from the tree and returns an iterator to the item after the last removed item.
The items themselves are not destructed.
|
inlineconstexprnoexcept |
Returns how many items can be added.
As an intrusive container, this is effectively unbounded.