\hypertarget{a01797}{}\doxysection{AAX\+\_\+\+CAtomic\+Queue\texorpdfstring{$<$}{<} T, S \texorpdfstring{$>$}{>} Class Template Reference}
\label{a01797}\index{AAX\_CAtomicQueue$<$ T, S $>$@{AAX\_CAtomicQueue$<$ T, S $>$}}


{\ttfamily \#include $<$AAX\+\_\+\+CAtomic\+Queue.\+h$>$}



Inheritance diagram for AAX\+\_\+\+CAtomic\+Queue\texorpdfstring{$<$}{<} T, S \texorpdfstring{$>$}{>}\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=224pt]{a01796}
\end{center}
\end{figure}


Collaboration diagram for AAX\+\_\+\+CAtomic\+Queue\texorpdfstring{$<$}{<} T, S \texorpdfstring{$>$}{>}\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=224pt]{a01795}
\end{center}
\end{figure}


\doxysubsection{Description}
\subsubsection*{template$<$typename T, size\+\_\+t S$>$\newline
class AAX\+\_\+\+CAtomic\+Queue$<$ T, S $>$}
Multi-\/writer, single-\/reader implementation of \mbox{\hyperlink{a02281}{AAX\+\_\+\+IPointer\+Queue}}

Template parameters\+:
\begin{DoxyItemize}
\item {\ttfamily T\+:} Type of the objects pointed to by this queue
\item {\ttfamily S\+:} Size of the queue\textquotesingle{}s ring buffer. Should be a power of two less than {\ttfamily UINT\+\_\+32\+\_\+\+MAX} 
\end{DoxyItemize}

Properties\+:
\begin{DoxyItemize}
\item Read operations are non-\/blocking
\item Write operations are synchronized, but very fast
\item Supports only one read thread -\/ do not call \mbox{\hyperlink{a01797_a0c64180813c16b4952761f82e32d7edd}{Pop()}} or \mbox{\hyperlink{a01797_a0b732544b0bcdd59acfca7fac5dca984}{Peek()}} concurrently
\item Supports any number of write threads
\item Does not support placing {\ttfamily NULL} values onto the queue. \mbox{\hyperlink{a01797_a2304d6ba1f1026b6a42de48056ab3050}{Push}} will return \mbox{\hyperlink{a02197_aea020100f0b06636ce7cb25c2fdb0af7a1585c38bb587c4adcadefbe3823ee9f8}{e\+Status\+\_\+\+Unsupported}} if a {\ttfamily NULL} value is pushed onto the queue, and the value will be ignored. 
\end{DoxyItemize}\doxysubsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
typedef \mbox{\hyperlink{a02281}{AAX\+\_\+\+IPointer\+Queue}}$<$ T $>$\+::template\+\_\+type \mbox{\hyperlink{a01797_aae36349d9419de62ce8e74b397749c27}{template\+\_\+type}}
\begin{DoxyCompactList}\small\item\em The type used for this template instance.   \end{DoxyCompactList}\item 
typedef \mbox{\hyperlink{a02281}{AAX\+\_\+\+IPointer\+Queue}}$<$ T $>$\+::value\+\_\+type \mbox{\hyperlink{a01797_acbb95bad3be34c7e4c770bc8c455c252}{value\+\_\+type}}
\begin{DoxyCompactList}\small\item\em The type of values stored in this queue.   \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Public Types inherited from \mbox{\hyperlink{a02281}{AAX\+\_\+\+IPointer\+Queue$<$ T $>$}}}
\begin{DoxyCompactItemize}
\item 
typedef T \mbox{\hyperlink{a02281_ae37a600f078ca0ee6f24b9f45aadc254}{template\+\_\+type}}
\begin{DoxyCompactList}\small\item\em The type used for this template instance. \end{DoxyCompactList}\item 
typedef T $\ast$ \mbox{\hyperlink{a02281_a2d28a2dffe8dc2b7fe218c41b46734e9}{value\+\_\+type}}
\begin{DoxyCompactList}\small\item\em The type of values stored in this queue. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Public Types inherited from \mbox{\hyperlink{a02197}{AAX\+\_\+\+IContainer}}}
\begin{DoxyCompactItemize}
\item 
enum \mbox{\hyperlink{a02197_aea020100f0b06636ce7cb25c2fdb0af7}{EStatus}} \{ \newline
\mbox{\hyperlink{a02197_aea020100f0b06636ce7cb25c2fdb0af7add595169a28f04ed79be4f1c5974eb48}{e\+Status\+\_\+\+Success}} = 0
, \newline
\mbox{\hyperlink{a02197_aea020100f0b06636ce7cb25c2fdb0af7a977319edf1a7a788eeee29dd71982f66}{e\+Status\+\_\+\+Overflow}} = 1
, \newline
\mbox{\hyperlink{a02197_aea020100f0b06636ce7cb25c2fdb0af7a26ef7d5d740723455d59080b273ac217}{e\+Status\+\_\+\+Not\+Initialized}} = 2
, \newline
\mbox{\hyperlink{a02197_aea020100f0b06636ce7cb25c2fdb0af7a7586eb60b4cb29ee8ed06aa7c539fe62}{e\+Status\+\_\+\+Unavailable}} = 3
, \newline
\mbox{\hyperlink{a02197_aea020100f0b06636ce7cb25c2fdb0af7a1585c38bb587c4adcadefbe3823ee9f8}{e\+Status\+\_\+\+Unsupported}} = 4
 \}
\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
virtual \mbox{\hyperlink{a01797_a838ca2b3763f10c4e4d9e72b676fd358}{$\sim$\+AAX\+\_\+\+CAtomic\+Queue}} ()
\item 
\mbox{\hyperlink{a01797_ae048321b8d75f9fa073e6a24088d8260}{AAX\+\_\+\+CAtomic\+Queue}} ()
\item 
virtual void \mbox{\hyperlink{a01797_a9819ff531e285f2acd2c9fd2351617c4}{Clear}} ()
\item 
virtual \mbox{\hyperlink{a02197_aea020100f0b06636ce7cb25c2fdb0af7}{AAX\+\_\+\+IContainer\+::\+EStatus}} \mbox{\hyperlink{a01797_a2304d6ba1f1026b6a42de48056ab3050}{Push}} (\mbox{\hyperlink{a01797_acbb95bad3be34c7e4c770bc8c455c252}{value\+\_\+type}} in\+Elem)
\item 
virtual \mbox{\hyperlink{a01797_acbb95bad3be34c7e4c770bc8c455c252}{value\+\_\+type}} \mbox{\hyperlink{a01797_a0c64180813c16b4952761f82e32d7edd}{Pop}} ()
\item 
virtual \mbox{\hyperlink{a01797_acbb95bad3be34c7e4c770bc8c455c252}{value\+\_\+type}} \mbox{\hyperlink{a01797_a0b732544b0bcdd59acfca7fac5dca984}{Peek}} () const
\end{DoxyCompactItemize}
\doxysubsubsection*{Public Member Functions inherited from \mbox{\hyperlink{a02281}{AAX\+\_\+\+IPointer\+Queue$<$ T $>$}}}
\begin{DoxyCompactItemize}
\item 
virtual \mbox{\hyperlink{a02281_a6e5e9c6bc4f527d35506236dd41a093a}{$\sim$\+AAX\+\_\+\+IPointer\+Queue}} ()
\item 
virtual void \mbox{\hyperlink{a02281_a42bdf5794a2481d0ae3f294fd8f8203e}{Clear}} ()=0
\item 
virtual \mbox{\hyperlink{a02197_aea020100f0b06636ce7cb25c2fdb0af7}{AAX\+\_\+\+IContainer\+::\+EStatus}} \mbox{\hyperlink{a02281_a6f8185d83cac520021bbca7054c57d38}{Push}} (\mbox{\hyperlink{a02281_a2d28a2dffe8dc2b7fe218c41b46734e9}{value\+\_\+type}} in\+Elem)=0
\item 
virtual \mbox{\hyperlink{a02281_a2d28a2dffe8dc2b7fe218c41b46734e9}{value\+\_\+type}} \mbox{\hyperlink{a02281_a49990f21819f0f4493183ea0770d4125}{Pop}} ()=0
\item 
virtual \mbox{\hyperlink{a02281_a2d28a2dffe8dc2b7fe218c41b46734e9}{value\+\_\+type}} \mbox{\hyperlink{a02281_a005cd2626fb8db4d5d708f255b48a0be}{Peek}} () const =0
\end{DoxyCompactItemize}
\doxysubsubsection*{Public Member Functions inherited from \mbox{\hyperlink{a02197}{AAX\+\_\+\+IContainer}}}
\begin{DoxyCompactItemize}
\item 
virtual \mbox{\hyperlink{a02197_ac8974c4fdc9352dc662bf7242b83c7c9}{$\sim$\+AAX\+\_\+\+IContainer}} ()
\item 
virtual void \mbox{\hyperlink{a02197_a35280907fac53883d3501beef8c30596}{Clear}} ()=0
\end{DoxyCompactItemize}
\doxysubsection*{Static Public Attributes}
\begin{DoxyCompactItemize}
\item 
static const size\+\_\+t \mbox{\hyperlink{a01797_a7040410a6baeae48d153ef44ee0df1f1}{template\+\_\+size}} = S
\begin{DoxyCompactList}\small\item\em The size used for this template instance. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Member Typedef Documentation}
\mbox{\Hypertarget{a01797_aae36349d9419de62ce8e74b397749c27}\label{a01797_aae36349d9419de62ce8e74b397749c27}} 
\index{AAX\_CAtomicQueue$<$ T, S $>$@{AAX\_CAtomicQueue$<$ T, S $>$}!template\_type@{template\_type}}
\index{template\_type@{template\_type}!AAX\_CAtomicQueue$<$ T, S $>$@{AAX\_CAtomicQueue$<$ T, S $>$}}
\doxysubsubsection{\texorpdfstring{template\_type}{template\_type}}
{\footnotesize\ttfamily template$<$typename T , size\+\_\+t S$>$ \\
typedef \mbox{\hyperlink{a02281}{AAX\+\_\+\+IPointer\+Queue}}$<$T$>$\+::template\+\_\+type \mbox{\hyperlink{a01797}{AAX\+\_\+\+CAtomic\+Queue}}$<$ T, S $>$\+::template\+\_\+type}



The type used for this template instance.   

\mbox{\Hypertarget{a01797_acbb95bad3be34c7e4c770bc8c455c252}\label{a01797_acbb95bad3be34c7e4c770bc8c455c252}} 
\index{AAX\_CAtomicQueue$<$ T, S $>$@{AAX\_CAtomicQueue$<$ T, S $>$}!value\_type@{value\_type}}
\index{value\_type@{value\_type}!AAX\_CAtomicQueue$<$ T, S $>$@{AAX\_CAtomicQueue$<$ T, S $>$}}
\doxysubsubsection{\texorpdfstring{value\_type}{value\_type}}
{\footnotesize\ttfamily template$<$typename T , size\+\_\+t S$>$ \\
typedef \mbox{\hyperlink{a02281}{AAX\+\_\+\+IPointer\+Queue}}$<$T$>$\+::value\+\_\+type \mbox{\hyperlink{a01797}{AAX\+\_\+\+CAtomic\+Queue}}$<$ T, S $>$\+::value\+\_\+type}



The type of values stored in this queue.   



\doxysubsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{a01797_a838ca2b3763f10c4e4d9e72b676fd358}\label{a01797_a838ca2b3763f10c4e4d9e72b676fd358}} 
\index{AAX\_CAtomicQueue$<$ T, S $>$@{AAX\_CAtomicQueue$<$ T, S $>$}!````~AAX\_CAtomicQueue@{$\sim$AAX\_CAtomicQueue}}
\index{````~AAX\_CAtomicQueue@{$\sim$AAX\_CAtomicQueue}!AAX\_CAtomicQueue$<$ T, S $>$@{AAX\_CAtomicQueue$<$ T, S $>$}}
\doxysubsubsection{\texorpdfstring{$\sim$AAX\_CAtomicQueue()}{~AAX\_CAtomicQueue()}}
{\footnotesize\ttfamily template$<$typename T , size\+\_\+t S$>$ \\
virtual \mbox{\hyperlink{a01797}{AAX\+\_\+\+CAtomic\+Queue}}$<$ T, S $>$\+::$\sim$\mbox{\hyperlink{a01797}{AAX\+\_\+\+CAtomic\+Queue}} (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}

\mbox{\Hypertarget{a01797_ae048321b8d75f9fa073e6a24088d8260}\label{a01797_ae048321b8d75f9fa073e6a24088d8260}} 
\index{AAX\_CAtomicQueue$<$ T, S $>$@{AAX\_CAtomicQueue$<$ T, S $>$}!AAX\_CAtomicQueue@{AAX\_CAtomicQueue}}
\index{AAX\_CAtomicQueue@{AAX\_CAtomicQueue}!AAX\_CAtomicQueue$<$ T, S $>$@{AAX\_CAtomicQueue$<$ T, S $>$}}
\doxysubsubsection{\texorpdfstring{AAX\_CAtomicQueue()}{AAX\_CAtomicQueue()}}
{\footnotesize\ttfamily template$<$typename T , size\+\_\+t S$>$ \\
\mbox{\hyperlink{a01797}{AAX\+\_\+\+CAtomic\+Queue}}$<$ T, S $>$\mbox{\hyperlink{a01797}{\+::\+AAX\+\_\+\+CAtomic\+Queue}} (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{a01797_a9819ff531e285f2acd2c9fd2351617c4}\label{a01797_a9819ff531e285f2acd2c9fd2351617c4}} 
\index{AAX\_CAtomicQueue$<$ T, S $>$@{AAX\_CAtomicQueue$<$ T, S $>$}!Clear@{Clear}}
\index{Clear@{Clear}!AAX\_CAtomicQueue$<$ T, S $>$@{AAX\_CAtomicQueue$<$ T, S $>$}}
\doxysubsubsection{\texorpdfstring{Clear()}{Clear()}}
{\footnotesize\ttfamily template$<$typename T , size\+\_\+t S$>$ \\
virtual void \mbox{\hyperlink{a01797}{AAX\+\_\+\+CAtomic\+Queue}}$<$ T, S $>$\+::\+Clear (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}





\begin{DoxyNote}{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   
\end{DoxyNote}


Implements \mbox{\hyperlink{a02281_a42bdf5794a2481d0ae3f294fd8f8203e}{AAX\+\_\+\+IPointer\+Queue$<$ T $>$}}.

\mbox{\Hypertarget{a01797_a2304d6ba1f1026b6a42de48056ab3050}\label{a01797_a2304d6ba1f1026b6a42de48056ab3050}} 
\index{AAX\_CAtomicQueue$<$ T, S $>$@{AAX\_CAtomicQueue$<$ T, S $>$}!Push@{Push}}
\index{Push@{Push}!AAX\_CAtomicQueue$<$ T, S $>$@{AAX\_CAtomicQueue$<$ T, S $>$}}
\doxysubsubsection{\texorpdfstring{Push()}{Push()}}
{\footnotesize\ttfamily template$<$typename T , size\+\_\+t S$>$ \\
virtual \mbox{\hyperlink{a02197_aea020100f0b06636ce7cb25c2fdb0af7}{AAX\+\_\+\+IContainer\+::\+EStatus}} \mbox{\hyperlink{a01797}{AAX\+\_\+\+CAtomic\+Queue}}$<$ T, S $>$\+::\+Push (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{a01797_acbb95bad3be34c7e4c770bc8c455c252}{value\+\_\+type}}}]{in\+Elem }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}





Push an element onto the queue

Call from\+: Write thread

\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{a02197_aea020100f0b06636ce7cb25c2fdb0af7add595169a28f04ed79be4f1c5974eb48}{AAX\+\_\+\+IContainer\+::e\+Status\+\_\+\+Success}} if the push succeeded   
\end{DoxyReturn}


Implements \mbox{\hyperlink{a02281_a6f8185d83cac520021bbca7054c57d38}{AAX\+\_\+\+IPointer\+Queue$<$ T $>$}}.



Referenced by \mbox{\hyperlink{a02433_a626cb2aaa68c64238298acfd6db448f5}{AAX\+\_\+\+CMonolithic\+Parameters\+::\+Generate\+Coefficients()}}, and \mbox{\hyperlink{a02433_aff6c9ac549ab88231759a9311b2a6640}{AAX\+\_\+\+CMonolithic\+Parameters\+::\+Static\+Render\+Audio()}}.

Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{a01797_a2304d6ba1f1026b6a42de48056ab3050_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{a01797_a0c64180813c16b4952761f82e32d7edd}\label{a01797_a0c64180813c16b4952761f82e32d7edd}} 
\index{AAX\_CAtomicQueue$<$ T, S $>$@{AAX\_CAtomicQueue$<$ T, S $>$}!Pop@{Pop}}
\index{Pop@{Pop}!AAX\_CAtomicQueue$<$ T, S $>$@{AAX\_CAtomicQueue$<$ T, S $>$}}
\doxysubsubsection{\texorpdfstring{Pop()}{Pop()}}
{\footnotesize\ttfamily template$<$typename T , size\+\_\+t S$>$ \\
virtual \mbox{\hyperlink{a01797_acbb95bad3be34c7e4c770bc8c455c252}{value\+\_\+type}} \mbox{\hyperlink{a01797}{AAX\+\_\+\+CAtomic\+Queue}}$<$ T, S $>$\+::\+Pop (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}





Pop the front element from the queue

Call from\+: Read thread

\begin{DoxyReturn}{Returns}
{\ttfamily NULL} if no element is available   
\end{DoxyReturn}


Implements \mbox{\hyperlink{a02281_a49990f21819f0f4493183ea0770d4125}{AAX\+\_\+\+IPointer\+Queue$<$ T $>$}}.

\mbox{\Hypertarget{a01797_a0b732544b0bcdd59acfca7fac5dca984}\label{a01797_a0b732544b0bcdd59acfca7fac5dca984}} 
\index{AAX\_CAtomicQueue$<$ T, S $>$@{AAX\_CAtomicQueue$<$ T, S $>$}!Peek@{Peek}}
\index{Peek@{Peek}!AAX\_CAtomicQueue$<$ T, S $>$@{AAX\_CAtomicQueue$<$ T, S $>$}}
\doxysubsubsection{\texorpdfstring{Peek()}{Peek()}}
{\footnotesize\ttfamily template$<$typename T , size\+\_\+t S$>$ \\
virtual \mbox{\hyperlink{a01797_acbb95bad3be34c7e4c770bc8c455c252}{value\+\_\+type}} \mbox{\hyperlink{a01797}{AAX\+\_\+\+CAtomic\+Queue}}$<$ T, S $>$\+::\+Peek (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [virtual]}}





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

Call from\+: Read thread

\begin{DoxyNote}{Note}
This value will change if another thread calls \mbox{\hyperlink{a01797_a0c64180813c16b4952761f82e32d7edd}{Pop()}}   
\end{DoxyNote}


Implements \mbox{\hyperlink{a02281_a005cd2626fb8db4d5d708f255b48a0be}{AAX\+\_\+\+IPointer\+Queue$<$ T $>$}}.



\doxysubsection{Member Data Documentation}
\mbox{\Hypertarget{a01797_a7040410a6baeae48d153ef44ee0df1f1}\label{a01797_a7040410a6baeae48d153ef44ee0df1f1}} 
\index{AAX\_CAtomicQueue$<$ T, S $>$@{AAX\_CAtomicQueue$<$ T, S $>$}!template\_size@{template\_size}}
\index{template\_size@{template\_size}!AAX\_CAtomicQueue$<$ T, S $>$@{AAX\_CAtomicQueue$<$ T, S $>$}}
\doxysubsubsection{\texorpdfstring{template\_size}{template\_size}}
{\footnotesize\ttfamily template$<$typename T , size\+\_\+t S$>$ \\
const size\+\_\+t \mbox{\hyperlink{a01797}{AAX\+\_\+\+CAtomic\+Queue}}$<$ T, S $>$\+::template\+\_\+size = S\hspace{0.3cm}{\ttfamily [static]}}



The size used for this template instance. 



The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{a00671}{AAX\+\_\+\+CAtomic\+Queue.\+h}}\end{DoxyCompactItemize}
