VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Attributes | Private Member Functions
makVrf::DtLocklessQueue< T > Class Template Reference

DtLocklessQueue is a thread safe queue for single reader/single writer. More...

Inheritance diagram for makVrf::DtLocklessQueue< T >:
Inheritance graph
[legend]

Public Member Functions

 DtLocklessQueue (int size)
 CTOR. More...
 
 ~DtLocklessQueue ()
 DTOR. More...
 
void push (T newElement)
 Add an element on the queue. More...
 
pop ()
 Remove an element from the queue. More...
 
bool okToPush ()
 Check to see if there is room in the queue. More...
 
int count ()
 Get the current element count. More...
 

Protected Attributes

std::vector< T > myElements
 
int myReadHead
 
int myWriteHead
 

Private Member Functions

 DtLocklessQueue ()
 Default CTOR (unimplemented) More...
 
 DtLocklessQueue (const DtLocklessQueue &orig)
 Copy CTOR (unimplemented) More...
 
DtLocklessQueueoperator= (const DtLocklessQueue &rhs)
 Assignment operator (unimplemented) More...
 

Detailed Description

template<class T>
class makVrf::DtLocklessQueue< T >

DtLocklessQueue is a thread safe queue for single reader/single writer.

It may block if the queue fills. This provides a fast/safe way to to transmit data between threads.

Constructor & Destructor Documentation

template<class T>
makVrf::DtLocklessQueue< T >::DtLocklessQueue ( int  size)

CTOR.

template<class T>
makVrf::DtLocklessQueue< T >::~DtLocklessQueue ( )

DTOR.

template<class T>
makVrf::DtLocklessQueue< T >::DtLocklessQueue ( )
private

Default CTOR (unimplemented)

template<class T>
makVrf::DtLocklessQueue< T >::DtLocklessQueue ( const DtLocklessQueue< T > &  orig)
private

Copy CTOR (unimplemented)

Member Function Documentation

template<class T>
void makVrf::DtLocklessQueue< T >::push ( newElement)

Add an element on the queue.

template<class T>
T makVrf::DtLocklessQueue< T >::pop ( )

Remove an element from the queue.

template<class T>
bool makVrf::DtLocklessQueue< T >::okToPush ( )

Check to see if there is room in the queue.

If there is not enough room, the call to push will block

template<class T>
int makVrf::DtLocklessQueue< T >::count ( )

Get the current element count.

template<class T>
DtLocklessQueue& makVrf::DtLocklessQueue< T >::operator= ( const DtLocklessQueue< T > &  rhs)
private

Assignment operator (unimplemented)

Member Data Documentation

template<class T>
std::vector<T> makVrf::DtLocklessQueue< T >::myElements
protected
template<class T>
int makVrf::DtLocklessQueue< T >::myReadHead
protected
template<class T>
int makVrf::DtLocklessQueue< T >::myWriteHead
protected

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

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)