\hypertarget{classUpdateQueueImpl}{
\section{UpdateQueueImpl$<$ A $>$ Class Template Reference}
\label{classUpdateQueueImpl}\index{UpdateQueueImpl@{UpdateQueueImpl}}
}


Internal implementation of \hyperlink{classUpdateQueue}{UpdateQueue} class.  


\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{structUpdateQueueImpl_1_1ReaderPos}{ReaderPos}
\begin{DoxyCompactList}\small\item\em State associated with an \hyperlink{classUpdateQueue}{UpdateQueue} reader. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
uint32\_\-t \hyperlink{classUpdateQueueImpl_a1cebd9bd5f0d171acb7289c3b517594e}{add\_\-reader} ()
\begin{DoxyCompactList}\small\item\em Create state for a new reader. \item\end{DoxyCompactList}\item 
void \hyperlink{classUpdateQueueImpl_a9a4faf56036186fc5fa5e75f99e73464}{remove\_\-reader} (uint32\_\-t id)
\begin{DoxyCompactList}\small\item\em Destroy state for reader. \item\end{DoxyCompactList}\item 
\hypertarget{classUpdateQueueImpl_ac3b94eb757c01ddda95f59cd43d81e16}{
void \hyperlink{classUpdateQueueImpl_ac3b94eb757c01ddda95f59cd43d81e16}{garbage\_\-collect} ()}
\label{classUpdateQueueImpl_ac3b94eb757c01ddda95f59cd43d81e16}

\begin{DoxyCompactList}\small\item\em Remove blocks at front of queue who have no referrers. \item\end{DoxyCompactList}\item 
bool \hyperlink{classUpdateQueueImpl_ab351ce0b23c46d9c7c77b479b9d0c18a}{advance\_\-reader} (uint32\_\-t id)
\begin{DoxyCompactList}\small\item\em Advance position of reader by 1 update. \item\end{DoxyCompactList}\item 
void \hyperlink{classUpdateQueueImpl_a203c5cff43ae75dbc18057de486d1f2b}{ffwd\_\-reader} (uint32\_\-t id)
\begin{DoxyCompactList}\small\item\em Fast forward reader to end of updates. \item\end{DoxyCompactList}\item 
\hypertarget{classUpdateQueueImpl_ad5708c3bb8f13254420ee8a96f8dcae1}{
void {\bfseries rwd\_\-reader} (uint32\_\-t id)}
\label{classUpdateQueueImpl_ad5708c3bb8f13254420ee8a96f8dcae1}

\item 
\hypertarget{classUpdateQueueImpl_a3754104aa912fd317a81871a7fbac214}{
void \hyperlink{classUpdateQueueImpl_a3754104aa912fd317a81871a7fbac214}{flush} ()}
\label{classUpdateQueueImpl_a3754104aa912fd317a81871a7fbac214}

\begin{DoxyCompactList}\small\item\em Fast forward all readers to end of updates. \item\end{DoxyCompactList}\item 
\hypertarget{classUpdateQueueImpl_a9b9ea1e74a1c09070afdcabf695e206b}{
const \hyperlink{classRouteEntry}{RouteEntry}$<$ A $>$ $\ast$ \hyperlink{classUpdateQueueImpl_a9b9ea1e74a1c09070afdcabf695e206b}{read} (uint32\_\-t id)}
\label{classUpdateQueueImpl_a9b9ea1e74a1c09070afdcabf695e206b}

\begin{DoxyCompactList}\small\item\em Get data associated with reader. \item\end{DoxyCompactList}\item 
\hypertarget{classUpdateQueueImpl_aaa9c1abbd912ada8424bea65ba669434}{
bool {\bfseries push\_\-back} (const \hyperlink{classRouteEntryRef}{RouteUpdate} \&u)}
\label{classUpdateQueueImpl_aaa9c1abbd912ada8424bea65ba669434}

\item 
\hypertarget{classUpdateQueueImpl_adc419fa2a14013801383b0c334fef8a9}{
uint32\_\-t {\bfseries updates\_\-queued} () const }
\label{classUpdateQueueImpl_adc419fa2a14013801383b0c334fef8a9}

\end{DoxyCompactItemize}
\subsection*{Private Types}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classUpdateQueueImpl_a789f7440a8d3b3f50dfe1fb22eaeeac1}{
typedef \hyperlink{classUpdateQueue}{UpdateQueue}$<$ A $>$::\hyperlink{classRouteEntryRef}{RouteUpdate} {\bfseries RouteUpdate}}
\label{classUpdateQueueImpl_a789f7440a8d3b3f50dfe1fb22eaeeac1}

\item 
\hypertarget{classUpdateQueueImpl_a534c210d0f24053bd337f57e69b99ee9}{
typedef list$<$ \hyperlink{structUpdateBlock}{UpdateBlock}$<$ A $>$ $>$ {\bfseries UpdateBlockList}}
\label{classUpdateQueueImpl_a534c210d0f24053bd337f57e69b99ee9}

\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classUpdateQueueImpl_a4ca9a6ff06eedffb316f0acde6141431}{
UpdateBlockList {\bfseries \_\-update\_\-blocks}}
\label{classUpdateQueueImpl_a4ca9a6ff06eedffb316f0acde6141431}

\item 
\hypertarget{classUpdateQueueImpl_a874bb79a3095af21bdbdb79097fa5ed4}{
vector$<$ \hyperlink{structUpdateQueueImpl_1_1ReaderPos}{ReaderPos} $\ast$ $>$ {\bfseries \_\-readers}}
\label{classUpdateQueueImpl_a874bb79a3095af21bdbdb79097fa5ed4}

\item 
\hypertarget{classUpdateQueueImpl_a6d1722a648d9e9f5da3af82b98e39a13}{
uint32\_\-t {\bfseries \_\-num\_\-readers}}
\label{classUpdateQueueImpl_a6d1722a648d9e9f5da3af82b98e39a13}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$typename A$>$ class UpdateQueueImpl$<$ A $>$}

Internal implementation of \hyperlink{classUpdateQueue}{UpdateQueue} class. 

\subsection{Member Function Documentation}
\hypertarget{classUpdateQueueImpl_a1cebd9bd5f0d171acb7289c3b517594e}{
\index{UpdateQueueImpl@{UpdateQueueImpl}!add\_\-reader@{add\_\-reader}}
\index{add\_\-reader@{add\_\-reader}!UpdateQueueImpl@{UpdateQueueImpl}}
\subsubsection[{add\_\-reader}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A$>$ uint32\_\-t {\bf UpdateQueueImpl}$<$ A $>$::add\_\-reader (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classUpdateQueueImpl_a1cebd9bd5f0d171acb7289c3b517594e}


Create state for a new reader. 

\begin{DoxyReturn}{Returns}
id for reader. 
\end{DoxyReturn}
\hypertarget{classUpdateQueueImpl_ab351ce0b23c46d9c7c77b479b9d0c18a}{
\index{UpdateQueueImpl@{UpdateQueueImpl}!advance\_\-reader@{advance\_\-reader}}
\index{advance\_\-reader@{advance\_\-reader}!UpdateQueueImpl@{UpdateQueueImpl}}
\subsubsection[{advance\_\-reader}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A$>$ bool {\bf UpdateQueueImpl}$<$ A $>$::advance\_\-reader (
\begin{DoxyParamCaption}
\item[{uint32\_\-t}]{id}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classUpdateQueueImpl_ab351ce0b23c46d9c7c77b479b9d0c18a}


Advance position of reader by 1 update. 


\begin{DoxyParams}{Parameters}
{\em id} & unique id of reader. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if reader advanced, false if reader has reached end. 
\end{DoxyReturn}
\hypertarget{classUpdateQueueImpl_a203c5cff43ae75dbc18057de486d1f2b}{
\index{UpdateQueueImpl@{UpdateQueueImpl}!ffwd\_\-reader@{ffwd\_\-reader}}
\index{ffwd\_\-reader@{ffwd\_\-reader}!UpdateQueueImpl@{UpdateQueueImpl}}
\subsubsection[{ffwd\_\-reader}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A$>$ void {\bf UpdateQueueImpl}$<$ A $>$::ffwd\_\-reader (
\begin{DoxyParamCaption}
\item[{uint32\_\-t}]{id}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classUpdateQueueImpl_a203c5cff43ae75dbc18057de486d1f2b}


Fast forward reader to end of updates. 


\begin{DoxyParams}{Parameters}
{\em id} & unique id of reader. \\
\hline
\end{DoxyParams}
\hypertarget{classUpdateQueueImpl_a9a4faf56036186fc5fa5e75f99e73464}{
\index{UpdateQueueImpl@{UpdateQueueImpl}!remove\_\-reader@{remove\_\-reader}}
\index{remove\_\-reader@{remove\_\-reader}!UpdateQueueImpl@{UpdateQueueImpl}}
\subsubsection[{remove\_\-reader}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A$>$ void {\bf UpdateQueueImpl}$<$ A $>$::remove\_\-reader (
\begin{DoxyParamCaption}
\item[{uint32\_\-t}]{id}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classUpdateQueueImpl_a9a4faf56036186fc5fa5e75f99e73464}


Destroy state for reader. 


\begin{DoxyParams}{Parameters}
{\em id} & unique id of reader. \\
\hline
\end{DoxyParams}


The documentation for this class was generated from the following file:\begin{DoxyCompactItemize}
\item 
/home/greearb/git/xorp.ct.github/xorp/rip/update\_\-queue.cc\end{DoxyCompactItemize}
