minimizer_table< Value, Comparator, Listener > Class Template Reference

#include <source/ariba/overlay/modules/chord/detail/minimizer_table.hpp>

Inheritance diagram for minimizer_table< Value, Comparator, Listener >:

Inheritance graph
[legend]
Collaboration diagram for minimizer_table< Value, Comparator, Listener >:

Collaboration graph
[legend]

List of all members.

Public Types

typedef super::iterator iterator
 delegates from vector<Value>
typedef super::const_iterator const_iterator
 delegates from vector<Value>

Public Member Functions

 minimizer_table (size_t max_size, Comparator compare=Comparator(), Listener &listener=Listener::DEFAULT)
 explicitly construct a minimizer table
bool insertable (const Value &value)
 returns true, if the value would fit into the table
iterator insert (const Value &value, bool simulate=false)
 inserts a value into an ordered list
bool remove (const Value &value)
 remove value from ordered list
bool contains (const Value &value) const
 check whether this list contains a specific value
Comparator & get_compare ()

Private Types

typedef vector< Value > super

Private Attributes

size_t max_size
Comparator compare
Listener & listener


Detailed Description

template<class Value, class Comparator, typename Listener = table_listener>
class minimizer_table< Value, Comparator, Listener >

TODO: Doc

Author:
Sebastian Mies <mies@tm.uka.de>

Definition at line 54 of file minimizer_table.hpp.


Member Typedef Documentation

template<class Value, class Comparator, typename Listener = table_listener>
typedef vector<Value> minimizer_table< Value, Comparator, Listener >::super [private]

Definition at line 57 of file minimizer_table.hpp.

template<class Value, class Comparator, typename Listener = table_listener>
typedef super::iterator minimizer_table< Value, Comparator, Listener >::iterator

delegates from vector<Value>

Definition at line 69 of file minimizer_table.hpp.

template<class Value, class Comparator, typename Listener = table_listener>
typedef super::const_iterator minimizer_table< Value, Comparator, Listener >::const_iterator

delegates from vector<Value>

Definition at line 72 of file minimizer_table.hpp.


Constructor & Destructor Documentation

template<class Value, class Comparator, typename Listener = table_listener>
minimizer_table< Value, Comparator, Listener >::minimizer_table ( size_t  max_size,
Comparator  compare = Comparator(),
Listener &  listener = Listener::DEFAULT 
) [inline, explicit]

explicitly construct a minimizer table

Definition at line 75 of file minimizer_table.hpp.


Member Function Documentation

template<class Value, class Comparator, typename Listener = table_listener>
bool minimizer_table< Value, Comparator, Listener >::insertable ( const Value &  value  )  [inline]

returns true, if the value would fit into the table

Definition at line 81 of file minimizer_table.hpp.

Referenced by chord_routing_table::is_insertable().

template<class Value, class Comparator, typename Listener = table_listener>
iterator minimizer_table< Value, Comparator, Listener >::insert ( const Value &  value,
bool  simulate = false 
) [inline]

template<class Value, class Comparator, typename Listener = table_listener>
bool minimizer_table< Value, Comparator, Listener >::remove ( const Value &  value  )  [inline]

remove value from ordered list

Definition at line 131 of file minimizer_table.hpp.

Referenced by chord_routing_table::remove().

template<class Value, class Comparator, typename Listener = table_listener>
bool minimizer_table< Value, Comparator, Listener >::contains ( const Value &  value  )  const [inline]

check whether this list contains a specific value

Definition at line 141 of file minimizer_table.hpp.

template<class Value, class Comparator, typename Listener = table_listener>
Comparator& minimizer_table< Value, Comparator, Listener >::get_compare (  )  [inline]

Definition at line 147 of file minimizer_table.hpp.


Member Data Documentation

template<class Value, class Comparator, typename Listener = table_listener>
size_t minimizer_table< Value, Comparator, Listener >::max_size [private]

Definition at line 60 of file minimizer_table.hpp.

template<class Value, class Comparator, typename Listener = table_listener>
Comparator minimizer_table< Value, Comparator, Listener >::compare [private]

template<class Value, class Comparator, typename Listener = table_listener>
Listener& minimizer_table< Value, Comparator, Listener >::listener [private]


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

Generated on Wed May 27 18:23:43 2009 for Ariba by  doxygen 1.5.6