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

#include <Queue.h>

Collaboration diagram for ibrcommon::Queue< T >:
Collaboration graph

Classes

class  Locked
 

Public Types

enum  WAIT_MODES { QUEUE_NOT_EMPTY = 0, QUEUE_EMPTY = 1 }
 

Public Member Functions

 Queue (unsigned int 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 ()
 
get (bool blocking=false, size_t timeout=0) throw (QueueUnblockedException)
 
getnpop (bool blocking=false, size_t timeout=0) throw (QueueUnblockedException)
 
void abort () throw ()
 
void reset () throw ()
 
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 74 of file Queue.h.

Member Enumeration Documentation

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

Definition at line 217 of file Queue.h.

Constructor & Destructor Documentation

template<class T>
ibrcommon::Queue< T >::Queue ( unsigned int  max = 0)
inline

Definition at line 82 of file Queue.h.

template<class T>
virtual ibrcommon::Queue< T >::~Queue ( )
inlinevirtual

Definition at line 85 of file Queue.h.

Member Function Documentation

template<class T>
void ibrcommon::Queue< T >::__pop ( )
inlineprotected
template<class T>
void ibrcommon::Queue< T >::__push ( const T &  x)
inlineprotected

Definition at line 304 of file Queue.h.

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

Definition at line 358 of file Queue.h.

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

Definition at line 117 of file Queue.h.

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

Definition at line 123 of file Queue.h.

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

Definition at line 91 of file Queue.h.

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

Definition at line 104 of file Queue.h.

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

Definition at line 110 of file Queue.h.

template<class T>
T ibrcommon::Queue< T >::get ( bool  blocking = false,
size_t  timeout = 0 
) throw (QueueUnblockedException)
inline

Definition at line 146 of file Queue.h.

Referenced by dtn::storage::DataStorage::run().

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

Definition at line 140 of file Queue.h.

Referenced by dtn::storage::DataStorage::run().

template<class T>
void ibrcommon::Queue< T >::reset ( ) throw ()
inline
template<class T>
size_t ibrcommon::Queue< T >::size ( ) const
inline

Definition at line 98 of file Queue.h.

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

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