TrinityCore
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
 
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

bool operator== (FlatSet const &left, FlatSet const &right)
 
bool operator!= (FlatSet const &left, FlatSet const &right)
 

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 26 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 30 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 29 of file FlatSet.h.

Member Function Documentation

◆ begin() [1/2]

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

Definition at line 35 of file FlatSet.h.

+ Here is the caller graph for this function:

◆ 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

Definition at line 36 of file FlatSet.h.

◆ clear()

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

Definition at line 86 of file FlatSet.h.

◆ 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

Definition at line 62 of file FlatSet.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ empty()

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

Definition at line 32 of file FlatSet.h.

+ Here is the caller graph for this function:

◆ end() [1/2]

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

Definition at line 38 of file FlatSet.h.

+ Here is the caller graph for this function:

◆ 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

Definition at line 39 of file FlatSet.h.

◆ 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

Definition at line 84 of file FlatSet.h.

◆ erase() [2/2]

template<class Key , class Compare = std::less<Key>, class KeyContainer = std::vector<Key>>
std::size_t Trinity::Containers::FlatSet< Key, Compare, KeyContainer >::erase ( Key const &  key)
inline

Definition at line 75 of file FlatSet.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ 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

Definition at line 51 of file FlatSet.h.

+ Here is the call graph for this function:

◆ 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

Definition at line 41 of file FlatSet.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insert()

template<class Key , class Compare = std::less<Key>, class KeyContainer = std::vector<Key>>
std::pair< iterator, bool > Trinity::Containers::FlatSet< Key, Compare, KeyContainer >::insert ( Key const &  key)
inline

Definition at line 73 of file FlatSet.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ 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

Definition at line 88 of file FlatSet.h.

+ Here is the caller graph for this function:

◆ size()

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

Definition at line 33 of file FlatSet.h.

+ Here is the caller graph for this function:

Friends And Related Function Documentation

◆ 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

Definition at line 95 of file FlatSet.h.

◆ 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

Definition at line 90 of file FlatSet.h.

Member Data Documentation

◆ _storage

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

Definition at line 101 of file FlatSet.h.


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