| AAX SDK 2.8.0 Avid Audio Extensions Development Kit

- Welcome
- Manual
- Classes
- Files
- Lists
- Support

- Class List
- Class Index
- Class Hierarchy
- Class Members

Loading...
Searching...
No Matches
List of all members | Public Types | Public Member Functions | Static Public Attributes
AAX_CAtomicQueue< T, S > Class Template Reference

`#include <AAX_CAtomicQueue.h>`

Inheritance diagram for AAX_CAtomicQueue< T, S >:
[legend]
Collaboration diagram for AAX_CAtomicQueue< T, S >:
[legend]

## Description

template<typename T, size_t S>
class AAX_CAtomicQueue< T, S >

Multi-writer, single-reader implementation of AAX_IPointerQueue

Template parameters:

- `T:` Type of the objects pointed to by this queue
- `S:` Size of the queue's ring buffer. Should be a power of two less than `UINT_32_MAX`

Properties:

- Read operations are non-blocking
- Write operations are synchronized, but very fast
- Supports only one read thread - do not call Pop() or Peek() concurrently
- Supports any number of write threads
- Does not support placing `NULL` values onto the queue. Push will return eStatus_Unsupported if a `NULL` value is pushed onto the queue, and the value will be ignored.

## Public Types
typedef AAX_IPointerQueue< T >::template_type | template_type
| The type used for this template instance.
typedef AAX_IPointerQueue< T >::value_type | value_type
| The type of values stored in this queue.
Public Types inherited from AAX_IPointerQueue< T >
typedef T | template_type
| The type used for this template instance.
typedef T * | value_type
| The type of values stored in this queue.
Public Types inherited from AAX_IContainer
enum | EStatus { eStatus_Success = 0 , eStatus_Overflow = 1 , eStatus_NotInitialized = 2 , eStatus_Unavailable = 3 , eStatus_Unsupported = 4 }

## Public Member Functions
virtual | ~AAX_CAtomicQueue ()
| AAX_CAtomicQueue ()
virtual void | Clear ()
virtual AAX_IContainer::EStatus | Push (value_type inElem)
virtual value_type | Pop ()
virtual value_type | Peek () const
Public Member Functions inherited from AAX_IPointerQueue< T >
virtual | ~AAX_IPointerQueue ()
virtual void | Clear ()=0
virtual AAX_IContainer::EStatus | Push (value_type inElem)=0
virtual value_type | Pop ()=0
virtual value_type | Peek () const =0
Public Member Functions inherited from AAX_IContainer
virtual | ~AAX_IContainer ()
virtual void | Clear ()=0

## Static Public Attributes
static const size_t | template_size = S
| The size used for this template instance.

## Member Typedef Documentation

## ◆ template_type

template<typename T , size_t S>

typedef AAX_IPointerQueue<T>::template_type AAX_CAtomicQueue< T, S >::template_type

The type used for this template instance.

## ◆ value_type

template<typename T , size_t S>

typedef AAX_IPointerQueue<T>::value_type AAX_CAtomicQueue< T, S >::value_type

The type of values stored in this queue.

## Constructor & Destructor Documentation

## ◆ ~AAX_CAtomicQueue()

template<typename T , size_t S>

virtual AAX_CAtomicQueue< T, S >::~AAX_CAtomicQueue | ( |  | ) |
| inline virtual

## ◆ AAX_CAtomicQueue()

template<typename T , size_t S>

AAX_CAtomicQueue< T, S >::AAX_CAtomicQueue | ( |  | ) |

## Member Function Documentation

## ◆ Clear()

template<typename T , size_t S>

virtual void AAX_CAtomicQueue< T, S >::Clear | ( |  | ) |
| virtual

Note
  This operation is NOT atomic
  This does NOT call the destructor for any pointed-to elements; it only clears the pointer values in the queue

Implements AAX_IPointerQueue< T >.

## ◆ Push()

template<typename T , size_t S>

virtual AAX_IContainer::EStatus AAX_CAtomicQueue< T, S >::Push | ( | value_type | inElem | ) |
| virtual

Push an element onto the queue

Call from: Write thread

Returns
  AAX_IContainer::eStatus_Success if the push succeeded

Implements AAX_IPointerQueue< T >.

Referenced by AAX_CMonolithicParameters::GenerateCoefficients(), and AAX_CMonolithicParameters::StaticRenderAudio().

Here is the caller graph for this function:

## ◆ Pop()

template<typename T , size_t S>

virtual value_type AAX_CAtomicQueue< T, S >::Pop | ( |  | ) |
| virtual

Pop the front element from the queue

Call from: Read thread

Returns
  `NULL` if no element is available

Implements AAX_IPointerQueue< T >.

## ◆ Peek()

template<typename T , size_t S>

virtual value_type AAX_CAtomicQueue< T, S >::Peek | ( |  | ) | const
| virtual

Get the current top element without popping it off of the queue

Call from: Read thread

Note
  This value will change if another thread calls Pop()

Implements AAX_IPointerQueue< T >.

## Member Data Documentation

## ◆ template_size

template<typename T , size_t S>

const size_t AAX_CAtomicQueue< T, S >::template_size = S
| static

The size used for this template instance.

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

- AAX_CAtomicQueue.h