VR-Forces 4.3 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtLockedBufferedQueue.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2007 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /******************************************************************************
6 ** $RCSfile: DtLockedBufferedQueue.h,v $ $Revision: 1.11 $ $State: Exp $
7 ******************************************************************************/
8 
12 
13 #ifndef DtLockedBufferedQueue_H_
14 #define DtLockedBufferedQueue_H_
15 
16 #include <vrvUtil/vrvUtil.h>
17 #include <vlutil/vlMutex.h>
18 #include <vector>
19 
20 namespace makVrv
21 {
26  template <typename T>
28  {
29  public:
31 
36 
37 
41  unsigned int push(T value);
42 
47  unsigned int push( std::vector<T>& valueVector );
48 
68  void getForReading(std::vector<T>*& output);
69 
74  void deleteAllPointers();
75 
79  void clearBuffers();
80 
81  protected:
82 
85  void swapBuffers();
86 
87  std::vector<T> myFirstBuffer;
88  std::vector<T> mySecondBuffer;
89  std::vector<T>* myCurrentBuffer;
90 
91  DtMutex myBufferMutex;
92  };
93 
94 }
95 
96 #define DtLockedBufferedQueue_INL_
97 #include <vrvUtil/DtLockedBufferedQueue.inl>
98 #undef DtLockedBufferedQueue_INL_
99 
100 
101 #endif
102 

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)