MAK RTIspy API Documentation for HLA 1516
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
vlThreadSafeQueue.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2005 MaK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: vlThreadSafeQueue.h,v $ $Revision: 1.3 $ $State: Exp $
7 *******************************************************************************/
8 
11 
12 #ifndef DtThreadSafeQueue_H_
13 #define DtThreadSafeQueue_H_
14 
15 #include <vlutil/vlMutex.h>
16 #include <deque>
17 
18 
27 template < class T >
29 {
30 public:
31 
34 
36  virtual ~DtThreadSafeQueue();
37 
39  virtual inline void push_back( std::auto_ptr<T> elem );
40 
42  virtual inline void push_front( std::auto_ptr<T> elem );
43 
46  virtual inline std::auto_ptr<T> pop();
47 
48  virtual inline size_t size() const;
49 
50 protected:
51 
53 
54  std::deque< T* > myQueue;
55 
57  mutable MAKRti::DtMutex myLock;
58 
59 };
60 
62 #define DtThreadSafeQueue_Inl_
63 #include "vlThreadSafeQueue.inl"
64 #undef DtThreadSafeQueue_Inl_
65 
66 #endif

Document ID: Generated on Mon Jul 9 10:30:41 EDT 2018 from SVN revision 190224
Copyright © 2005-2018 VT MÄK Inc. All Rights Reserved (www.mak.com)