TrinityCore
Loading...
Searching...
No Matches
Trinity::Containers::FlatSet< Key, Compare, KeyContainer > Class Template Reference

#include <FlatSet.h>

Public Types

using iterator = typename KeyContainer::iterator
 
using const_iterator = typename KeyContainer::const_iterator
 

Public Member Functions

bool empty () const
 
auto size () const
 
auto begin ()
 
auto begin () const
 
auto end ()
 
auto end () const
 
bool contains (Key const &value) const
 
auto find (Key const &value) const
 
auto find (Key const &value)
 
template<class... Args>
std::pair< iterator, bool > emplace (Args &&... args)
 
std::pair< iterator, bool > insert (Key const &key)
 
std::size_t erase (Key const &key)
 
auto erase (const_iterator itr)
 
void clear ()
 
void shrink_to_fit ()
 

Private Attributes

KeyContainer _storage
 

Friends

std::strong_ordering operator<=> (FlatSet const &left, FlatSet const &right)=default
 
bool operator== (FlatSet const &left, FlatSet const &right)=default
 

Detailed Description

template<class Key, class Compare = std::less<Key>, class KeyContainer = std::vector<Key>>
class Trinity::Containers::FlatSet< Key, Compare, KeyContainer >

Definition at line 27 of file FlatSet.h.

Member Typedef Documentation

◆ const_iterator

template<class Key , class Compare = std::less<Key>, class KeyContainer = std::vector<Key>>
using Trinity::Containers::FlatSet< Key, Compare, KeyContainer >::const_iterator = typename KeyContainer::const_iterator

Definition at line 31 of file FlatSet.h.

◆ iterator

template<class Key , class Compare = std::less<Key>, class KeyContainer = std::vector<Key>>
using Trinity::Containers::FlatSet< Key, Compare, KeyContainer >::iterator = typename KeyContainer::iterator

Definition at line 30 of file FlatSet.h.

Member Function Documentation

◆ begin() [1/2]

◆ begin() [2/2]

template<class Key , class Compare = std::less<Key>, class KeyContainer = std::vector<Key>>
auto Trinity::Containers::FlatSet< Key, Compare, KeyContainer >::begin ( ) const
inline

◆ clear()

template<class Key , class Compare = std::less<Key>, class KeyContainer = std::vector<Key>>
void Trinity::Containers::FlatSet< Key, Compare, KeyContainer >::clear ( )
inline

◆ contains()

template<class Key , class Compare = std::less<Key>, class KeyContainer = std::vector<Key>>
bool Trinity::Containers::FlatSet< Key, Compare, KeyContainer >::contains ( Key const &  value) const
inline

◆ emplace()

template<class Key , class Compare = std::less<Key>, class KeyContainer = std::vector<Key>>
template<class... Args>
std::pair< iterator, bool > Trinity::Containers::FlatSet< Key, Compare, KeyContainer >::emplace ( Args &&...  args)
inline

◆ empty()

template<class Key , class Compare = std::less<Key>, class KeyContainer = std::vector<Key>>
bool Trinity::Containers::FlatSet< Key, Compare, KeyContainer >::empty ( ) const
inline

◆ end() [1/2]

◆ end() [2/2]

template<class Key , class Compare = std::less<Key>, class KeyContainer = std::vector<Key>>
auto Trinity::Containers::FlatSet< Key, Compare, KeyContainer >::end ( ) const
inline

◆ erase() [1/2]

template<class Key , class Compare = std::less<Key>, class KeyContainer = std::vector<Key>>
auto Trinity::Containers::FlatSet< Key, Compare, KeyContainer >::erase ( const_iterator  itr)
inline

◆ erase() [2/2]

◆ find() [1/2]

template<class Key , class Compare = std::less<Key>, class KeyContainer = std::vector<Key>>
auto Trinity::Containers::FlatSet< Key, Compare, KeyContainer >::find ( Key const &  value)
inline

◆ find() [2/2]

template<class Key , class Compare = std::less<Key>, class KeyContainer = std::vector<Key>>
auto Trinity::Containers::FlatSet< Key, Compare, KeyContainer >::find ( Key const &  value) const
inline

◆ insert()

◆ shrink_to_fit()

template<class Key , class Compare = std::less<Key>, class KeyContainer = std::vector<Key>>
void Trinity::Containers::FlatSet< Key, Compare, KeyContainer >::shrink_to_fit ( )
inline

◆ size()

template<class Key , class Compare = std::less<Key>, class KeyContainer = std::vector<Key>>
auto Trinity::Containers::FlatSet< Key, Compare, KeyContainer >::size ( ) const
inline

Friends And Related Symbol Documentation

◆ operator<=>

template<class Key , class Compare = std::less<Key>, class KeyContainer = std::vector<Key>>
std::strong_ordering operator<=> ( FlatSet< Key, Compare, KeyContainer > const &  left,
FlatSet< Key, Compare, KeyContainer > const &  right 
)
friend

◆ operator==

template<class Key , class Compare = std::less<Key>, class KeyContainer = std::vector<Key>>
bool operator== ( FlatSet< Key, Compare, KeyContainer > const &  left,
FlatSet< Key, Compare, KeyContainer > const &  right 
)
friend

Member Data Documentation

◆ _storage


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