RadarFX API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
List of all members | Public Member Functions | Protected Attributes | Private Member Functions
makRadarFx::DtLocklessQueue< T > Class Template Reference

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

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

Public Member Functions

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

Protected Attributes

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

Private Member Functions

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

Detailed Description

template<class T>
class makRadarFx::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 >
makRadarFx::DtLocklessQueue< T >::DtLocklessQueue ( int  size)
template<class T >
makRadarFx::DtLocklessQueue< T >::~DtLocklessQueue ( )

DTOR.

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

Default CTOR (unimplemented)

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

Copy CTOR (unimplemented)

Member Function Documentation

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

Add an element on the queue.

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

Remove an element from the queue.

template<class T >
bool makRadarFx::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 makRadarFx::DtLocklessQueue< T >::count ( )

Get the current element count.

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

Assignment operator (unimplemented)

Member Data Documentation

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

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

Document ID: 1.0
Copyright © 2015 VT MÄK Inc. All Rights Reserved (www.mak.com)