Zero  0.1.0
Public Member Functions | Public Attributes | List of all members
zero::hashtable_deque::HashtableDeque< key_type, invalid_key >::KeyPair Class Reference

A pair of keys for the implementation of a deque as a doubly-linked list. More...

Public Member Functions

 KeyPair ()
 Constructor for an empty pair of keys. More...
 
 KeyPair (const key_type &previous, const key_type &next)
 Constructor for a pair of keys with initial values. More...
 
virtual ~KeyPair ()
 Destructor for a pair of keys. More...
 

Public Attributes

key_type _previous
 The previous element of this element. More...
 
key_type _next
 The next element of this element. More...
 

Detailed Description

template<class key_type, key_type invalid_key>
class zero::hashtable_deque::HashtableDeque< key_type, invalid_key >::KeyPair

A pair of keys for the implementation of a deque as a doubly-linked list.

Instances of this class can be used to represent entries of a doubly-linked list which only stores the pointer without any other value.

Author
Max Gilbert

Constructor & Destructor Documentation

§ KeyPair() [1/2]

template<class key_type, key_type invalid_key>
zero::hashtable_deque::HashtableDeque< key_type, invalid_key >::KeyPair::KeyPair ( )
inline

Constructor for an empty pair of keys.

This constructor instantiates a key pair without setting the members _previous and _next .

§ KeyPair() [2/2]

template<class key_type, key_type invalid_key>
zero::hashtable_deque::HashtableDeque< key_type, invalid_key >::KeyPair::KeyPair ( const key_type &  previous,
const key_type &  next 
)
inline

Constructor for a pair of keys with initial values.

This constructor instantiates a key pair and initializes the members _previous and _next as specified.

Parameters
previousThe initial value of _previous.
nextThe initial value of _next.

§ ~KeyPair()

template<class key_type, key_type invalid_key>
zero::hashtable_deque::HashtableDeque< key_type, invalid_key >::KeyPair::~KeyPair ( )
inlinevirtual

Destructor for a pair of keys.

As this class does not allocate memory dynamically, this destructor does not do anything.

Member Data Documentation

§ _next

template<class key_type, key_type invalid_key>
zero::hashtable_deque::HashtableDeque< key_type, invalid_key >::KeyPair::_next

The next element of this element.

The key of the next element with regard to the deque order. The next element is closer to the back of the deque. If this element represents the back of the deque, this member variable will contain an invalid key.

§ _previous

template<class key_type, key_type invalid_key>
zero::hashtable_deque::HashtableDeque< key_type, invalid_key >::KeyPair::_previous

The previous element of this element.

The key of the previous element with regard to the deque order. The previous element is closer to the front of the deque. If this element represents the front of the deque, this member variable will contain an invalid key.


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