All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Radiant::ArraySet< Key, Allocator > Class Template Reference

Set implementation that uses simple std::vector to store the elements. More...

#include <Radiant/ArraySet.hpp>

Public Types

typedef Allocator allocator_type
 
typedef container::const_iterator const_iterator
 
typedef const value_type * const_pointer
 
typedef value_type & const_reference
 
typedef
container::const_reverse_iterator 
const_reverse_iterator
 
typedef std::vector< Key,
Allocator > 
container
 
typedef container::difference_type difference_type
 
typedef container::iterator iterator
 
typedef Key key_type
 
typedef value_type * pointer
 
typedef value_type & reference
 
typedef container::reverse_iterator reverse_iterator
 
typedef container::size_type size_type
 
typedef Key value_type
 

Public Member Functions

 ArraySet (int reserve)
 
 ArraySet (std::size_t reserve)
 
 ArraySet (const ArraySet &set)
 
 ArraySet (ArraySet &&set)
 
template<typename it >
 ArraySet (it first, it last)
 
template<typename T >
 ArraySet (const T &list)
 
iterator begin ()
 
const_iterator begin () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
void clear ()
 
int compare (const ArraySet &set) const
 
bool contains (const Key &key) const
 
bool containsAll (const ArraySet &set) const
 
std::size_t count (const Key &key) const
 
const_reverse_iterator crbegin () const
 
const_reverse_iterator crend () const
 
bool empty () const
 
iterator end ()
 
const_iterator end () const
 
iterator erase (iterator pos)
 
bool erase (const Key &key)
 
iterator find (const Key &key)
 
const_iterator find (const Key &key) const
 
bool insert (const Key &value)
 
bool insert (Key &&value)
 
template<typename it >
void insert (it first, it last)
 
bool isEmpty () const
 
ArraySet operator- (const ArraySet &set) const
 
void operator<< (const Key &key)
 
ArraySetoperator= (const ArraySet &set)
 
ArraySetoperator= (ArraySet &&set)
 
template<typename T >
void operator= (const T &list)
 
bool operator== (const ArraySet &set) const
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin () const
 
reverse_iterator rend ()
 
const_reverse_iterator rend () const
 
std::size_t size () const
 
void swap (ArraySet &set)
 
QList< Key > toList () const
 

Detailed Description

template<typename Key, typename Allocator = typename std::vector<Key>::allocator_type>
class Radiant::ArraySet< Key, Allocator >

Set implementation that uses simple std::vector to store the elements.

This can be used instead of std::set when number is elements is small. Do not ever use this class unless you have profiled that it actually makes a difference!

Notice that all non-const operations might invalidate all iterators.