unique_id< uniquifier > Class Template Reference

Provides an abstraction for the responsibilities of a unique identifier. More...

#include <unique_id.h>

Inheritance diagram for unique_id< uniquifier >:

Inheritance graph
[legend]
Collaboration diagram for unique_id< uniquifier >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 unique_id (uniquifier initial_value)
 Constructs a unique id from the "initial_value".
 unique_id (const unique_id< uniquifier > &to_copy)
 Constructs a unique id as a copy of the "to_copy" object.
 ~unique_id ()
bool operator== (const unique_id< uniquifier > &to_compare) const
 Returns true if the held id is the same as "to_compare".
unique_idoperator= (const unique_id< uniquifier > &to_copy)
 Sets this id to be the same as "to_copy".
bool operator!= (const unique_id &to_compare) const
 Returns true if this is unequal with "to_compare".
uniquifier raw_id () const
 Returns the held identifier in its native form.
void set_raw_id (uniquifier new_value)
 Sets the held identifier to "new_value".

Detailed Description

template<class uniquifier>
class unique_id< uniquifier >

Provides an abstraction for the responsibilities of a unique identifier.

These are generally used as a way of masking the underlying ID object while providing some equality comparisons. It is especially useful when the underlying object is not itself an object, but just a simple type.

Definition at line 28 of file unique_id.h.


Constructor & Destructor Documentation

template<class uniquifier>
unique_id< uniquifier >::unique_id ( uniquifier  initial_value  )  [inline]

Constructs a unique id from the "initial_value".

Definition at line 31 of file unique_id.h.

template<class uniquifier>
unique_id< uniquifier >::unique_id ( const unique_id< uniquifier > &  to_copy  )  [inline]

Constructs a unique id as a copy of the "to_copy" object.

Definition at line 33 of file unique_id.h.

template<class uniquifier>
unique_id< uniquifier >::~unique_id (  )  [inline]

Definition at line 35 of file unique_id.h.


Member Function Documentation

template<class uniquifier>
bool unique_id< uniquifier >::operator== ( const unique_id< uniquifier > &  to_compare  )  const [inline]

Returns true if the held id is the same as "to_compare".

The templated uniquifying type absolutely must provide an equality operator (==) and an assignment operator (=).

Definition at line 40 of file unique_id.h.

template<class uniquifier>
unique_id& unique_id< uniquifier >::operator= ( const unique_id< uniquifier > &  to_copy  )  [inline]

Sets this id to be the same as "to_copy".

Definition at line 43 of file unique_id.h.

template<class uniquifier>
bool unique_id< uniquifier >::operator!= ( const unique_id< uniquifier > &  to_compare  )  const [inline]

Returns true if this is unequal with "to_compare".

Definition at line 47 of file unique_id.h.

template<class uniquifier>
uniquifier unique_id< uniquifier >::raw_id (  )  const [inline]

Returns the held identifier in its native form.

Definition at line 50 of file unique_id.h.

Referenced by life_maintainer::acquire(), scheduler::add(), life_maintainer::add(), connection_table::add(), buffer_manager::add_buffer(), connection_table::complain_missing_connection(), connection::conn_id(), connection_table::connected(), post_office::deliver_mail_on_route(), buffer_manager::extract(), connection_table::find(), connection_table::find_live_reals(), connection_table::get_conn_state(), connection_table::live(), connection_table::liveness(), life_maintainer::locking_find(), connection_table::owns_connection(), connection_table::record_request(), scheduler::remove_by_id(), connection_table::reset_time(), schedulable::schedulable_text_form(), connection_table::set_conn_state(), connection_table::set_liveness(), connection_table::socket_to_real_transport(), connection::text_form(), linked_buffer::text_form(), buffer_key::text_form(), buffer::text_form(), connection_table::update(), and connection_table::zap().

template<class uniquifier>
void unique_id< uniquifier >::set_raw_id ( uniquifier  new_value  )  [inline]

Sets the held identifier to "new_value".

Definition at line 52 of file unique_id.h.


The documentation for this class was generated from the following file:
Generated on Fri Nov 28 04:31:03 2008 for HOOPLE Libraries by  doxygen 1.5.1