IBR-DTNSuite  0.8
ibrcommon::Queue< T > Class Template Reference

#include <Queue.h>

List of all members.

Classes

class  Locked

Public Types

enum  WAIT_MODES { QUEUE_NOT_EMPTY = 0, QUEUE_EMPTY = 1 }

Public Member Functions

 Queue (size_t max=0)
virtual ~Queue ()
bool empty ()
size_t size () const
T & front ()
const T & front () const
T & back ()
const T & back () const
void push (const T &x)
void pop ()
getnpop (bool blocking=false, size_t timeout=0) throw (QueueUnblockedException)
void abort () throw ()
void reset ()
void wait (WAIT_MODES mode, const size_t timeout=0) throw (QueueUnblockedException)
Queue< T >::Locked exclusive ()

Protected Member Functions

void __push (const T &x)
void __pop ()
void __wait (const WAIT_MODES mode) throw (QueueUnblockedException)
void __wait (const WAIT_MODES mode, const size_t timeout) throw (QueueUnblockedException)

Detailed Description

template<class T>
class ibrcommon::Queue< T >

Definition at line 60 of file Queue.h.


Member Enumeration Documentation

template<class T>
enum ibrcommon::Queue::WAIT_MODES
Enumerator:
QUEUE_NOT_EMPTY 
QUEUE_EMPTY 

Definition at line 174 of file Queue.h.


Constructor & Destructor Documentation

template<class T>
ibrcommon::Queue< T >::Queue ( size_t  max = 0) [inline]

Definition at line 68 of file Queue.h.

template<class T>
virtual ibrcommon::Queue< T >::~Queue ( ) [inline, virtual]

Definition at line 71 of file Queue.h.


Member Function Documentation

template<class T>
void ibrcommon::Queue< T >::__pop ( ) [inline, protected]
template<class T>
void ibrcommon::Queue< T >::__push ( const T &  x) [inline, protected]

Definition at line 261 of file Queue.h.

template<class T>
void ibrcommon::Queue< T >::__wait ( const WAIT_MODES  mode) throw (QueueUnblockedException) [inline, protected]
template<class T>
void ibrcommon::Queue< T >::__wait ( const WAIT_MODES  mode,
const size_t  timeout 
) throw (QueueUnblockedException) [inline, protected]

Definition at line 315 of file Queue.h.

template<class T>
T& ibrcommon::Queue< T >::back ( ) [inline]

Definition at line 103 of file Queue.h.

template<class T>
const T& ibrcommon::Queue< T >::back ( ) const [inline]

Definition at line 109 of file Queue.h.

template<class T>
bool ibrcommon::Queue< T >::empty ( ) [inline]

Definition at line 77 of file Queue.h.

Referenced by ibrcommon::vsocket::select().

template<class T>
Queue<T>::Locked ibrcommon::Queue< T >::exclusive ( ) [inline]

Definition at line 255 of file Queue.h.

Referenced by ibrcommon::vsocket::select().

template<class T>
T& ibrcommon::Queue< T >::front ( ) [inline]

Definition at line 90 of file Queue.h.

template<class T>
const T& ibrcommon::Queue< T >::front ( ) const [inline]

Definition at line 96 of file Queue.h.

template<class T>
void ibrcommon::Queue< T >::pop ( ) [inline]

Definition at line 126 of file Queue.h.

template<class T>
void ibrcommon::Queue< T >::reset ( ) [inline]

Definition at line 169 of file Queue.h.

Referenced by dtn::api::Registration::detach().

template<class T>
size_t ibrcommon::Queue< T >::size ( ) const [inline]

Definition at line 84 of file Queue.h.

template<class T>
void ibrcommon::Queue< T >::wait ( WAIT_MODES  mode,
const size_t  timeout = 0 
) throw (QueueUnblockedException) [inline]

Definition at line 180 of file Queue.h.


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