Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

lock_list< T > Class Template Reference

#include <lock_list.h>

A list which inherits from mutex to provide synchronization capabilities.
Guarantees:


Parameters
T
The type of element to be stored in the list.

Inheritance diagram for lock_list< T >:

mutex List of all members.

Public Types

typedef list_type::iterator iterator
typedef list_type::const_iterator const_iterator
typedef list_type::size_type size_type
typedef T value_type

Public Member Functions

iterator begin ()
iterator end ()
const_iterator begin () const
const_iterator end () const
void push_front (const T &t)
void push_back (const T &t)
void pop_front ()
void pop_back ()
size_type size () const
void clear ()
size_type erase (const value_type &k)
iterator erase (iterator pos)
iterator find (const value_type &k)

Private Types

typedef std::list< T > list_type

Private Attributes

list_type m_list

template<class T>
class lock_list< T >


Member Typedef Documentation

template<class T>
typedef list_type::const_iterator lock_list< T >::const_iterator
 

A bidirectional iterator for the list. A const_iterator cannot modify an element of the list.

template<class T>
typedef list_type::iterator lock_list< T >::iterator
 

A bidirectional iterator for the list. This iterator may be used to modify the elements of the list.

template<class T>
typedef std::list<T> lock_list< T >::list_type [private]
 

The type of list used by lock_list. At the moment this is std::list.

template<class T>
typedef list_type::size_type lock_list< T >::size_type
 

A type that keeps track of the number of elements in the list.

template<class T>
typedef T lock_list< T >::value_type
 

The type of the elements in the list.


Member Function Documentation

template<class T>
const_iterator lock_list< T >::begin  )  const [inline]
 

Gets an iterator to the first element in the list. This iterator cannot be used to modify the elements of the list.

Return Value
An iterator referring to the first element of the list.

template<class T>
iterator lock_list< T >::begin  )  [inline]
 

Gets an iterator to the first element of the list.

Return Value
An iterator referring to the first element of the list.

template<class T>
void lock_list< T >::clear  )  [inline]
 

Removes all elements from the list.

template<class T>
const_iterator lock_list< T >::end  )  const [inline]
 

Gets an iterator to the end of the list. Note that this iterator does not initially refer to a valid element, and elements that it may refer to may not be modified.

Return Value
An iterator referring to the end of the list.

template<class T>
iterator lock_list< T >::end  )  [inline]
 

Gets an iterator to the end of the list. Note that this iterator does not initially refer to a valid element.

Return Value
An iterator referring to the end of the list.

template<class T>
iterator lock_list< T >::erase iterator  pos  )  [inline]
 

Erases an element of the list.

Parameters

pos
An iterator referring to the element to be erased.
Return Value
An iterator referring to the element after the erased element, or the end of the list if the element erased was the last element in the list.

template<class T>
size_type lock_list< T >::erase const value_type k  )  [inline]
 

Erases elements of the list equal to the parameter. Note that this removes all elements of the list equal to the parameter, not just the first one.

Parameters

k
The value of the elements to be removed.
Return Value
The number of elements that have been removed.

template<class T>
iterator lock_list< T >::find const value_type k  )  [inline]
 

Finds an element in the list.

Parameters

k
The value to find in the list.
Return Value
An iterator referring to first element in the list with a value of k.

template<class T>
void lock_list< T >::pop_back  )  [inline]
 

Removes the element at the end of the list.

template<class T>
void lock_list< T >::pop_front  )  [inline]
 

Removes the element at the front of the list.

template<class T>
void lock_list< T >::push_back const T &  t  )  [inline]
 

Inserts an element at the end of the list.

Parameters

t
The value to be inserted.

template<class T>
void lock_list< T >::push_front const T &  t  )  [inline]
 

Inserts an element at the front of the list.

Parameter

t
The value to be inserted.

template<class T>
size_type lock_list< T >::size  )  const [inline]
 

Gets the size of the list.

Return Value
The size of the list.


Member Data Documentation

template<class T>
list_type lock_list< T >::m_list [private]
 


The documentation for this class was generated from the following file:
Generated on Wed May 24 23:03:25 2006 for RTSync by  doxygen 1.4.4