\hypertarget{classRefTriePostOrderIterator}{
\section{RefTriePostOrderIterator$<$ A, Payload $>$ Class Template Reference}
\label{classRefTriePostOrderIterator}\index{RefTriePostOrderIterator@{RefTriePostOrderIterator}}
}


Postorder Iterator on a trie.  




{\ttfamily \#include $<$ref\_\-trie.hh$>$}

\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classRefTriePostOrderIterator_a4cc1b2d11d8759a85dbfd79095f533ac}{
typedef \hyperlink{classIPNet}{IPNet}$<$ A $>$ {\bfseries Key}}
\label{classRefTriePostOrderIterator_a4cc1b2d11d8759a85dbfd79095f533ac}

\item 
\hypertarget{classRefTriePostOrderIterator_a875b3712cdc08fbe71569dd22b7f40c5}{
typedef ::RefTrie$<$ A, Payload $>$ {\bfseries RefTrie}}
\label{classRefTriePostOrderIterator_a875b3712cdc08fbe71569dd22b7f40c5}

\item 
\hypertarget{classRefTriePostOrderIterator_aab0952d474bb553750707375b70922b4}{
typedef \hyperlink{classRefTrieNode}{RefTrieNode}$<$ A, Payload $>$ {\bfseries Node}}
\label{classRefTriePostOrderIterator_aab0952d474bb553750707375b70922b4}

\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classRefTriePostOrderIterator_a4eedfb96f2fd7eec537f06c9c32c3cc5}{
\hyperlink{classRefTriePostOrderIterator_a4eedfb96f2fd7eec537f06c9c32c3cc5}{RefTriePostOrderIterator} ()}
\label{classRefTriePostOrderIterator_a4eedfb96f2fd7eec537f06c9c32c3cc5}

\begin{DoxyCompactList}\small\item\em Constructors. \item\end{DoxyCompactList}\item 
\hypertarget{classRefTriePostOrderIterator_a4fa913a94c80be3240d75d339afe492f}{
\hyperlink{classRefTriePostOrderIterator_a4fa913a94c80be3240d75d339afe492f}{RefTriePostOrderIterator} (const RefTrie $\ast$trie, \hyperlink{classRefTrieNode}{Node} $\ast$n)}
\label{classRefTriePostOrderIterator_a4fa913a94c80be3240d75d339afe492f}

\begin{DoxyCompactList}\small\item\em constructor for exact searches: both \hyperlink{protocolthe-p}{the} current node and \hyperlink{protocolthe-p}{the} search key are taken from n, so \hyperlink{protocolthe-p}{the} iterator will only loop once. \item\end{DoxyCompactList}\item 
\hypertarget{classRefTriePostOrderIterator_ab30403c41c64e83c4104b097f4b2b296}{
\hyperlink{classRefTriePostOrderIterator_ab30403c41c64e83c4104b097f4b2b296}{RefTriePostOrderIterator} (const RefTrie $\ast$trie, \hyperlink{classRefTrieNode}{Node} $\ast$n, const \hyperlink{classIPNet}{Key} \&k)}
\label{classRefTriePostOrderIterator_ab30403c41c64e83c4104b097f4b2b296}

\begin{DoxyCompactList}\small\item\em construct for subtree scanning: \hyperlink{protocolthe-p}{the} root key is set explicitly, and \hyperlink{protocolthe-p}{the} current node is set according to \hyperlink{protocolthe-p}{the} search order. \item\end{DoxyCompactList}\item 
\hypertarget{classRefTriePostOrderIterator_a6adbb4f9e91298c321b17fe60cbc8111}{
{\bfseries RefTriePostOrderIterator} (const \hyperlink{classRefTriePostOrderIterator}{RefTriePostOrderIterator} \&x)}
\label{classRefTriePostOrderIterator_a6adbb4f9e91298c321b17fe60cbc8111}

\item 
\hypertarget{classRefTriePostOrderIterator_a03b45ba0b848faf83c2286b2d138cfae}{
\hyperlink{classRefTriePostOrderIterator}{RefTriePostOrderIterator} $\ast$ \hyperlink{classRefTriePostOrderIterator_a03b45ba0b848faf83c2286b2d138cfae}{begin} ()}
\label{classRefTriePostOrderIterator_a03b45ba0b848faf83c2286b2d138cfae}

\begin{DoxyCompactList}\small\item\em move to \hyperlink{protocolthe-p}{the} starting position according to \hyperlink{protocolthe-p}{the} visiting order \item\end{DoxyCompactList}\item 
\hyperlink{classRefTriePostOrderIterator}{RefTriePostOrderIterator} \hyperlink{classRefTriePostOrderIterator_a15f5a5ded4c11eb562cb8516f28aaa43}{operator++} (int)
\begin{DoxyCompactList}\small\item\em Postfix increment. \item\end{DoxyCompactList}\item 
\hyperlink{classRefTriePostOrderIterator}{RefTriePostOrderIterator} \& \hyperlink{classRefTriePostOrderIterator_a8541e8b985ef56f9a20307b3ab447b80}{operator++} ()
\begin{DoxyCompactList}\small\item\em Prefix increment. \item\end{DoxyCompactList}\item 
\hyperlink{classRefTriePostOrderIterator_a8741443c2fac7c8bd7c0bf9ddb2cb6c7}{operator RefTriePreOrderIterator$<$ A, Payload $>$} () const 
\begin{DoxyCompactList}\small\item\em Conversion operator. \item\end{DoxyCompactList}\item 
\hypertarget{classRefTriePostOrderIterator_a48617521e1c3e37864b25c64da267273}{
void {\bfseries next} () const }
\label{classRefTriePostOrderIterator_a48617521e1c3e37864b25c64da267273}

\item 
\hypertarget{classRefTriePostOrderIterator_a63df972863e33c2375d6e9aec5ae97ca}{
void {\bfseries force\_\-valid} () const }
\label{classRefTriePostOrderIterator_a63df972863e33c2375d6e9aec5ae97ca}

\item 
\hypertarget{classRefTriePostOrderIterator_ad9346dc0328cd9b3ed1524db633fe267}{
\hyperlink{classRefTrieNode}{Node} $\ast$ {\bfseries cur} () const }
\label{classRefTriePostOrderIterator_ad9346dc0328cd9b3ed1524db633fe267}

\item 
\hypertarget{classRefTriePostOrderIterator_ad55fdf5c36f36f94bfd2415b3ae873f2}{
bool {\bfseries operator==} (const \hyperlink{classRefTriePostOrderIterator}{RefTriePostOrderIterator} \&x) const }
\label{classRefTriePostOrderIterator_ad55fdf5c36f36f94bfd2415b3ae873f2}

\item 
\hypertarget{classRefTriePostOrderIterator_a5848f92c1b806ee72872259507e66e0a}{
bool {\bfseries operator!=} (const \hyperlink{classRefTriePostOrderIterator}{RefTriePostOrderIterator} \&x) const }
\label{classRefTriePostOrderIterator_a5848f92c1b806ee72872259507e66e0a}

\item 
\hypertarget{classRefTriePostOrderIterator_a77e914eae0c07e300e618f11a80176e7}{
Payload \& {\bfseries payload} ()}
\label{classRefTriePostOrderIterator_a77e914eae0c07e300e618f11a80176e7}

\item 
\hypertarget{classRefTriePostOrderIterator_a1eddaee8571b5d61d01bb4fe2ec305aa}{
const \hyperlink{classIPNet}{Key} \& {\bfseries key} () const }
\label{classRefTriePostOrderIterator_a1eddaee8571b5d61d01bb4fe2ec305aa}

\item 
\hypertarget{classRefTriePostOrderIterator_a4a3cf5e16d5d3197f58742382a9bdcc5}{
\hyperlink{classRefTriePostOrderIterator}{RefTriePostOrderIterator} \& {\bfseries operator=} (const \hyperlink{classRefTriePostOrderIterator}{RefTriePostOrderIterator} \&x)}
\label{classRefTriePostOrderIterator_a4a3cf5e16d5d3197f58742382a9bdcc5}

\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classRefTriePostOrderIterator_ae6ae6775a0284eac3fad756abbd04782}{
bool {\bfseries node\_\-is\_\-left} (\hyperlink{classRefTrieNode}{Node} $\ast$n) const }
\label{classRefTriePostOrderIterator_ae6ae6775a0284eac3fad756abbd04782}

\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classRefTriePostOrderIterator_ab8122d921ddbc419685a4dba0ef9c30c}{
\hyperlink{classRefTrieNode}{Node} $\ast$ {\bfseries \_\-cur}}
\label{classRefTriePostOrderIterator_ab8122d921ddbc419685a4dba0ef9c30c}

\item 
\hypertarget{classRefTriePostOrderIterator_a81167b5325aec9bf3e1b1736847a028c}{
\hyperlink{classIPNet}{Key} {\bfseries \_\-root}}
\label{classRefTriePostOrderIterator_a81167b5325aec9bf3e1b1736847a028c}

\item 
\hypertarget{classRefTriePostOrderIterator_afd8ae509fe3ed74d5287b59511021d1f}{
const RefTrie $\ast$ {\bfseries \_\-trie}}
\label{classRefTriePostOrderIterator_afd8ae509fe3ed74d5287b59511021d1f}

\end{DoxyCompactItemize}
\subsection*{Friends}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classRefTriePostOrderIterator_a55a74fc21532dc60310356fc243eb7f0}{
class \hyperlink{classRefTriePostOrderIterator_a55a74fc21532dc60310356fc243eb7f0}{RefTriePreOrderIterator$<$ A, Payload $>$}}
\label{classRefTriePostOrderIterator_a55a74fc21532dc60310356fc243eb7f0}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$class A, class Payload$>$ class RefTriePostOrderIterator$<$ A, Payload $>$}

Postorder Iterator on a trie. \_\-cur points to \hyperlink{protocolthe-p}{the} current object, \_\-root contains \hyperlink{protocolthe-p}{the} search key for root of \hyperlink{protocolthe-p}{the} subtree we want to scan. The iterator skips over empty nodes, and visits \hyperlink{protocolthe-p}{the} subtree in depth-\/first, left-\/to-\/right order. The keys returned by this iterator are not sorted by prefix length. 

\subsection{Member Function Documentation}
\hypertarget{classRefTriePostOrderIterator_a8741443c2fac7c8bd7c0bf9ddb2cb6c7}{
\index{RefTriePostOrderIterator@{RefTriePostOrderIterator}!operator RefTriePreOrderIterator$<$ A, Payload $>$@{operator RefTriePreOrderIterator$<$ A, Payload $>$}}
\index{operator RefTriePreOrderIterator$<$ A, Payload $>$@{operator RefTriePreOrderIterator$<$ A, Payload $>$}!RefTriePostOrderIterator@{RefTriePostOrderIterator}}
\subsubsection[{operator RefTriePreOrderIterator$<$ A, Payload $>$}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A, class Payload$>$ {\bf RefTriePostOrderIterator}$<$ A, Payload $>$::operator {\bf RefTriePreOrderIterator}$<$ A, Payload $>$ (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classRefTriePostOrderIterator_a8741443c2fac7c8bd7c0bf9ddb2cb6c7}


Conversion operator. 

Converts into a PreOrderIterator \hypertarget{classRefTriePostOrderIterator_a8541e8b985ef56f9a20307b3ab447b80}{
\index{RefTriePostOrderIterator@{RefTriePostOrderIterator}!operator++@{operator++}}
\index{operator++@{operator++}!RefTriePostOrderIterator@{RefTriePostOrderIterator}}
\subsubsection[{operator++}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A, class Payload$>$ {\bf RefTriePostOrderIterator}\& {\bf RefTriePostOrderIterator}$<$ A, Payload $>$::operator++ (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classRefTriePostOrderIterator_a8541e8b985ef56f9a20307b3ab447b80}


Prefix increment. 

Updates position of iterator in tree. \begin{DoxyReturn}{Returns}
position of iterator after increment. 
\end{DoxyReturn}
\hypertarget{classRefTriePostOrderIterator_a15f5a5ded4c11eb562cb8516f28aaa43}{
\index{RefTriePostOrderIterator@{RefTriePostOrderIterator}!operator++@{operator++}}
\index{operator++@{operator++}!RefTriePostOrderIterator@{RefTriePostOrderIterator}}
\subsubsection[{operator++}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A, class Payload$>$ {\bf RefTriePostOrderIterator} {\bf RefTriePostOrderIterator}$<$ A, Payload $>$::operator++ (
\begin{DoxyParamCaption}
\item[{int}]{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classRefTriePostOrderIterator_a15f5a5ded4c11eb562cb8516f28aaa43}


Postfix increment. 

Updates position of iterator in tree. \begin{DoxyReturn}{Returns}
position of iterator before increment. 
\end{DoxyReturn}


The documentation for this class was generated from the following file:\begin{DoxyCompactItemize}
\item 
/home/greearb/git/xorp.ct.github/xorp/libxorp/ref\_\-trie.hh\end{DoxyCompactItemize}
