include/util/sync_queue.hpp File Reference


Detailed Description

Definition of synchronized queue (CSyncQueue template) and templates related to it.

See also: Using CSyncQueue class.

Definition in file sync_queue.hpp.

#include <corelib/ncbistd.hpp>
#include <corelib/ncbi_limits.hpp>
#include <corelib/ncbiexpt.hpp>
#include <corelib/ncbidbg.hpp>
#include <corelib/ncbimtx.hpp>
#include <corelib/ncbitime.hpp>
#include <corelib/ncbicntr.hpp>
#include <corelib/ncbithr.hpp>
#include <deque>
#include <list>
#include <set>
#include <vector>
#include <queue>

Include dependency graph for sync_queue.hpp:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  CSyncQueue< Type, Container >
 Thread-safe queue object with a blocking mechanism. More...
class  CSyncQueue_ConstAccessGuard< Type, Container >
 Access guard to a constant CSyncQueue. More...
class  CSyncQueue_AccessGuard< Type, Container >
 Access guard to non-constant CSyncQueue. More...
struct  GetTypeWhenNotEqual< Type, NotType >
 Helper template returning some Type when it's not equal to NotType. More...
struct  GetTypeWhenNotEqual< Type, Type >
class  CSyncQueue_I_Base< Type, Container >
 Base class for both iterator and const_iterator for SyncQueue Used internally for unifying storage of iterators in guardian. More...
class  CSyncQueue_I< Type, Container, TNativeIterator >
 Iterator for CSyncQueue (constant or non-constant depending on template parameters). More...
class  CSyncQueueException
 Exception object used throughout all CSyncQueue classes. More...
class  CSyncQueue_set< Key, Compare, Allocator >
 Adaptor class to use STL set<> in CSyncQueue. More...
class  CSyncQueue_multiset< Key, Compare, Allocator >
 Adaptor class to use STL multiset<> in CSyncQueue. More...
class  CSyncQueue_priority_queue< Type, Container, Compare >
 Adaptor class to use STL priority_queue<> in CSyncQueue. More...
class  CSyncQueue_InternalAutoLock< Type, Container >
 Auto-lock the queue and unlock it when object will be destroyed. More...

Functions

void ThrowSyncQueueTimeout (void)
 Throw an exception about expired timeout with standard message.
void ThrowSyncQueueNoRoom (void)
 Throw an exception about no room in a queue with standard message.
void ThrowSyncQueueEmpty (void)
 Throw an exception about empty queue with standard message.
template<class Type, class Container, class TNativeIterator>
CSyncQueue_I< Type, Container,
TNativeIterator > 
operator+ (typename CSyncQueue_I< Type, Container, TNativeIterator >::TDiff offset, const CSyncQueue_I< Type, Container, TNativeIterator > &iter)
template<class Type, class Container, class TNativeIterL, class TNativeIterR>
CSyncQueue_I< Type, Container,
TNativeIterL >::TDiff 
operator- (const CSyncQueue_I< Type, Container, TNativeIterL > &left, const CSyncQueue_I< Type, Container, TNativeIterR > &right)
template<class Type, class Container, class TNativeIterL, class TNativeIterR>
bool operator== (const CSyncQueue_I< Type, Container, TNativeIterL > &left, const CSyncQueue_I< Type, Container, TNativeIterR > &right)
template<class Type, class Container, class TNativeIterL, class TNativeIterR>
bool operator!= (const CSyncQueue_I< Type, Container, TNativeIterL > &left, const CSyncQueue_I< Type, Container, TNativeIterR > &right)
template<class Type, class Container, class TNativeIterL, class TNativeIterR>
bool operator< (const CSyncQueue_I< Type, Container, TNativeIterL > &left, const CSyncQueue_I< Type, Container, TNativeIterR > &right)
template<class Type, class Container, class TNativeIterL, class TNativeIterR>
bool operator> (const CSyncQueue_I< Type, Container, TNativeIterL > &left, const CSyncQueue_I< Type, Container, TNativeIterR > &right)
template<class Type, class Container, class TNativeIterL, class TNativeIterR>
bool operator<= (const CSyncQueue_I< Type, Container, TNativeIterL > &left, const CSyncQueue_I< Type, Container, TNativeIterR > &right)
template<class Type, class Container, class TNativeIterL, class TNativeIterR>
bool operator>= (const CSyncQueue_I< Type, Container, TNativeIterL > &left, const CSyncQueue_I< Type, Container, TNativeIterR > &right)


Function Documentation

template<class Type, class Container, class TNativeIterL, class TNativeIterR>
bool operator!= const CSyncQueue_I< Type, Container, TNativeIterL > &  left,
const CSyncQueue_I< Type, Container, TNativeIterR > &  right
[inline]
 

Definition at line 1967 of file sync_queue.hpp.

template<class Type, class Container, class TNativeIterator>
CSyncQueue_I<Type, Container, TNativeIterator> operator+ typename CSyncQueue_I< Type, Container, TNativeIterator >::TDiff  offset,
const CSyncQueue_I< Type, Container, TNativeIterator > &  iter
[inline]
 

Definition at line 1810 of file sync_queue.hpp.

template<class Type, class Container, class TNativeIterL, class TNativeIterR>
CSyncQueue_I<Type, Container, TNativeIterL>::TDiff operator- const CSyncQueue_I< Type, Container, TNativeIterL > &  left,
const CSyncQueue_I< Type, Container, TNativeIterR > &  right
[inline]
 

Definition at line 1849 of file sync_queue.hpp.

template<class Type, class Container, class TNativeIterL, class TNativeIterR>
bool operator< const CSyncQueue_I< Type, Container, TNativeIterL > &  left,
const CSyncQueue_I< Type, Container, TNativeIterR > &  right
[inline]
 

Definition at line 1976 of file sync_queue.hpp.

template<class Type, class Container, class TNativeIterL, class TNativeIterR>
bool operator<= const CSyncQueue_I< Type, Container, TNativeIterL > &  left,
const CSyncQueue_I< Type, Container, TNativeIterR > &  right
[inline]
 

Definition at line 1997 of file sync_queue.hpp.

template<class Type, class Container, class TNativeIterL, class TNativeIterR>
bool operator== const CSyncQueue_I< Type, Container, TNativeIterL > &  left,
const CSyncQueue_I< Type, Container, TNativeIterR > &  right
[inline]
 

Definition at line 1955 of file sync_queue.hpp.

template<class Type, class Container, class TNativeIterL, class TNativeIterR>
bool operator> const CSyncQueue_I< Type, Container, TNativeIterL > &  left,
const CSyncQueue_I< Type, Container, TNativeIterR > &  right
[inline]
 

Definition at line 1988 of file sync_queue.hpp.

template<class Type, class Container, class TNativeIterL, class TNativeIterR>
bool operator>= const CSyncQueue_I< Type, Container, TNativeIterL > &  left,
const CSyncQueue_I< Type, Container, TNativeIterR > &  right
[inline]
 

Definition at line 2006 of file sync_queue.hpp.

void ThrowSyncQueueEmpty void   )  [inline]
 

Throw an exception about empty queue with standard message.

Definition at line 1036 of file sync_queue.hpp.

References eEmpty, and NCBI_THROW.

Referenced by CSyncQueue< Type, Container >::x_LockAndWaitWhileEmpty(), and CSyncQueue< Type, Container >::x_Pop_NonBlocking().

void ThrowSyncQueueNoRoom void   )  [inline]
 

Throw an exception about no room in a queue with standard message.

Definition at line 1028 of file sync_queue.hpp.

References NCBI_THROW.

Referenced by CSyncQueue< Type, Container >::x_LockAndWaitWhileFull(), and CSyncQueue< Type, Container >::x_Push_NonBlocking().

void ThrowSyncQueueTimeout void   )  [inline]
 

Throw an exception about expired timeout with standard message.

Definition at line 1021 of file sync_queue.hpp.

References NCBI_THROW.

Referenced by CSyncQueue< Type, Container >::Clear(), CSyncQueue< Type, Container >::CopyTo(), CSyncQueue_InternalAutoLock< Type, Container >::CSyncQueue_InternalAutoLock(), CSyncQueue< Type, Container >::x_DoubleLock(), and CSyncQueue< Type, Container >::x_GuardedLock().


Generated on Wed Dec 9 07:40:52 2009 for NCBI C++ ToolKit by  doxygen 1.4.6
Modified on Wed Dec 09 08:18:29 2009 by modify_doxy.py rev. 173732