Glossygloss  0.2
Glossygloss is set of classes to use several data structure as Tree or hash table.
 All Classes Files Functions Variables Macros Pages
Public Member Functions | Private Attributes | List of all members
Alveole< K, V > Class Template Reference

Class to define Hashtable alveoles. More...

#include <hashtable.hpp>

Public Member Functions

 Alveole (const Alveole< K, V > &other)
 
 Alveole (K key, V value)
 
 Alveole ()
 
 Alveole (K key, V value, Alveole< K, V > *next)
 
 ~Alveole ()
 
K getKey ()
 
V getValue ()
 
Alveole< K, V > * getNext ()
 
void setValue (V n_value)
 
void setNext (Alveole< K, V > *n_next)
 
string toString ()
 

Private Attributes

K _key
 
V _value
 
Alveole< K, V > * _next
 

Detailed Description

template<typename K, typename V>
class Alveole< K, V >

Class to define Hashtable alveoles.

Alveole class embodies a Hashtable's alveole. An alveole store a pair <k,v>. Alveoles are simply-linked elements.

Constructor & Destructor Documentation

template<typename K, typename V>
Alveole< K, V >::Alveole ( const Alveole< K, V > &  other)

next aveole Copy constructor

Parameters
[in]otherthe alveole to copy
template<typename K, typename V>
Alveole< K, V >::Alveole ( K  key,
V  value 
)

Pair constructor

Parameters
[in]keykey of the pair
[in]valuevalue of the pair
template<typename K, typename V>
Alveole< K, V >::Alveole ( )

Empty constructor create an 'empty' alveole

template<typename K, typename V>
Alveole< K, V >::Alveole ( K  key,
V  value,
Alveole< K, V > *  next 
)

Complex constructor

Parameters
[in]keykey of the pair
[in]valuevalue of the pair
[in]nextadresse to the next alveole
template<typename K, typename V>
Alveole< K, V >::~Alveole ( )

Destructor for Alveole

Member Function Documentation

template<typename K, typename V>
K Alveole< K, V >::getKey ( )

Get the key of an alveole

Parameters
[out]keykey stored into the alveole
template<typename K, typename V>
Alveole<K,V>* Alveole< K, V >::getNext ( )

Which alveole coming next ?

Parameters
[out]ptrmemory adress of the next alveole
template<typename K, typename V>
V Alveole< K, V >::getValue ( )

Get the value stored into an alveole

Parameters
[out]valuevalue of the alveole
template<typename K, typename V>
void Alveole< K, V >::setNext ( Alveole< K, V > *  n_next)

Set the next adress of the next alveole

Parameters
[in]n_nextadress of the new next alveole
template<typename K, typename V>
void Alveole< K, V >::setValue ( V  n_value)

Set the value stored into an alveole

Parameters
[in]n_valueThe new value of the pair
template<typename K, typename V>
string Alveole< K, V >::toString ( )

Return a string descriptionof the pair stored into the alveole

Parameters
[out]desca string represention of the alveole

Member Data Documentation

template<typename K, typename V>
K Alveole< K, V >::_key
private
template<typename K, typename V>
Alveole<K,V>* Alveole< K, V >::_next
private

value of the pair

template<typename K, typename V>
V Alveole< K, V >::_value
private

key of the pair


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