Classes | Public Member Functions

threadsafe_queue< T > Class Template Reference
[Threadsafe Collection API]

#include <threadsafe_queue.h>

Collaboration diagram for threadsafe_queue< T >:
Collaboration graph
[legend]

List of all members.

Classes

class  iterator_t

Public Member Functions

void push_back (IN T &t)
 push an element onto the back of the queue
bool pop_front (OUT T &t)
 pop an element from the front of the queue.
int size (void) const throw ()
 returns the number of elements in the queue
void getIterator (OUT iterator_t &i) const throw ()
 resets the given iterator to point to the beginning of the queue
bool getNextElement (IO iterator_t &i, OUT T &t) const
 gets element pointed to by iterator, and increments iterator

Detailed Description

template<class T>
class threadsafe_queue< T >

A threadsafe FIFO queue. Supports basic push/pop operations, and iteration.

Definition at line 49 of file threadsafe_queue.h.


Member Function Documentation

template<class T >
void threadsafe_queue< T >::push_back ( IN T &  t  )  [inline]

push an element onto the back of the queue

Definition at line 66 of file threadsafe_queue.h.

template<class T >
bool threadsafe_queue< T >::pop_front ( OUT T &  t  )  [inline]

pop an element from the front of the queue.

Returns false if the queue is empty

Definition at line 74 of file threadsafe_queue.h.

template<class T >
int threadsafe_queue< T >::size ( void   )  const throw () [inline]

returns the number of elements in the queue

Definition at line 87 of file threadsafe_queue.h.

template<class T >
void threadsafe_queue< T >::getIterator ( OUT iterator_t i  )  const throw () [inline]

resets the given iterator to point to the beginning of the queue

Definition at line 94 of file threadsafe_queue.h.

template<class T >
bool threadsafe_queue< T >::getNextElement ( IO iterator_t i,
OUT T &  t 
) const [inline]

gets element pointed to by iterator, and increments iterator

Definition at line 102 of file threadsafe_queue.h.


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