ERC CISST - cisst software

mtsQueue< _elementType > Class Template Reference
[Multi Task Support]

#include <mtsQueue.h>

Inheritance diagram for mtsQueue< _elementType >:

Inheritance graph
[legend]
Collaboration diagram for mtsQueue< _elementType >:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<class _elementType>
class mtsQueue< _elementType >

Defines a queue that can be accessed in a thread-safe manner, assuming that there is only one reader and one writer and that pointer updates are atomic.

Definition at line 41 of file mtsQueue.h.

Public Types

Public Member Functions

Protected Member Functions

Protected Attributes


Member Function Documentation

template<class _elementType>
void mtsQueue< _elementType >::SetSize ( size_type  size,
const_reference  value 
) [inline]

Sets the size of the queue (destructive, i.e. won't preserve previously queued elements).

Definition at line 101 of file mtsQueue.h.

Referenced by mtsCommandQueuedWrite< _argumentType >::Allocate(), and mtsCommandQueuedWrite< _argumentType >::mtsCommandQueuedWrite().

template<class _elementType>
size_type mtsQueue< _elementType >::GetSize ( void   )  const [inline]

Returns size of queue.

Definition at line 108 of file mtsQueue.h.

template<class _elementType>
size_type mtsQueue< _elementType >::GetAvailable ( void   )  const [inline]

Returns number of elements available in queue, i.e. the number of slots used.

Definition at line 115 of file mtsQueue.h.

template<class _elementType>
bool mtsQueue< _elementType >::IsFull ( void   )  const [inline]

Returns true if queue is full.

Definition at line 126 of file mtsQueue.h.

template<class _elementType>
bool mtsQueue< _elementType >::IsEmpty ( void   )  const [inline]

Returns true if queue is empty.

Definition at line 136 of file mtsQueue.h.

template<class _elementType>
const_pointer mtsQueue< _elementType >::Put ( const typename mtsGenericTypesUnwrap< value_type >::BaseType &  newObject  )  [inline]

Copy an object to the queue.

Parameters:
in reference to the object to be copied
Returns:
Pointer to element in queue (use iterator instead?)

Definition at line 148 of file mtsQueue.h.

Referenced by mtsCommandQueuedWrite< _argumentType >::Execute().

template<class _elementType>
pointer mtsQueue< _elementType >::Peek ( void   )  const [inline]

Get a pointer to the next object to be read, but do not remove the item from the queue.

Returns:
Pointer to top element in queue (use iterator instead?)

Definition at line 170 of file mtsQueue.h.

template<class _elementType>
pointer mtsQueue< _elementType >::Get ( void   )  [inline]

Pop the next object to be read from the queue.

Returns:
Pointer to element just popped (use iterator instead?)

Definition at line 181 of file mtsQueue.h.

Referenced by mtsCommandQueuedWrite< _argumentType >::Execute().


The documentation for this class was generated from the following file:
erc-cisst-devel<at>lists.johnshopkins.edu