Elm  1.0
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
elm::avl::Set< T, C > Class Template Reference

#include <elm/avl/Set.h>

+ Inheritance diagram for elm::avl::Set< T, C >:

Public Member Functions

void add (const T &value)
 
template<class CC >
void addAll (const CC &coll)
 
- Public Member Functions inherited from elm::avl::GenTree< T, IdAdapter< T >, C >
 GenTree (void)
 
 GenTree (const GenTree< T > &tree)
 
 ~GenTree (void)
 
T * get (const typename IdAdapter< T >::key_t &key)
 
const T * get (const typename IdAdapter< T >::key_t &key) const
 
int count (void) const
 
bool contains (const typename IdAdapter< T >::key_t &item) const
 
bool isEmpty (void) const
 
 operator bool (void) const
 
bool containsAll (const Co< T > &coll) const
 
void clear (void)
 
void copy (const GenTree< T, IdAdapter< T >, C > &tree)
 
GenTree< T, IdAdapter< T >, C > & operator= (const GenTree< T, IdAdapter< T >, C > &tree)
 
void add (const T &item)
 
void set (const T &item)
 
void remove (const typename IdAdapter< T >::key_t &item)
 
void remove (const Iterator &iter)
 
void addAll (const CC &coll)
 
void removeAll (const CC &coll)
 
bool equals (const GenTree< T, IdAdapter< T >, C > &tree) const
 
bool operator== (const GenTree< T, IdAdapter< T >, C > &tree) const
 
bool operator!= (const GenTree< T, IdAdapter< T >, C > &tree) const
 

Static Public Attributes

static const Set< T, C > null
 

Additional Inherited Members

- Protected Member Functions inherited from elm::avl::GenTree< T, IdAdapter< T >, C >
Nodefind (const typename IdAdapter< T >::key_t &key) const
 
- Protected Member Functions inherited from elm::avl::AbstractTree
 AbstractTree (void)
 
void insert (unsigned char da[], int dir, Node *node, Node *q, Node *y, Node *z)
 
void remove (Node *pa[], unsigned char da[], int k, Node *p)
 
int count (void) const
 
- Protected Attributes inherited from elm::avl::AbstractTree
Noderoot
 
int cnt
 

Detailed Description

template<class T, class C = elm::Comparator<T>>
class elm::avl::Set< T, C >

Implements a set collection based on an AVL tree, that is, supporting access and modifications with a O(log n) complexity.

Implemented concepts
  • elm::concept::Collection<T>
  • elm::concept::MutableCollection<T>
  • elm::concept::Set<T>
Parameters
TType of stored items.
CComparator used to sort the items (must implements the elm::concept::Comparator<T> concept, as a default elm::Comparator<T>).
See also
elm::avl::GenTree

Member Function Documentation

template<class T, class C = elm::Comparator<T>>
void elm::avl::Set< T, C >::add ( const T &  value)
template<class T, class C = elm::Comparator<T>>
template<class CC >
void elm::avl::Set< T, C >::addAll ( const CC &  coll)

Member Data Documentation

template<class T, class C = elm::Comparator<T>>
const Set< T, C > elm::avl::Set< T, C >::null
static

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