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


Postorder Iterator on a trie.  




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

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

\item 
\hypertarget{classTriePostOrderIterator_af6a54250663f03f441381bf2685974ef}{
typedef \hyperlink{classTrieNode}{TrieNode}$<$ A, Payload $>$ {\bfseries Node}}
\label{classTriePostOrderIterator_af6a54250663f03f441381bf2685974ef}

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

\begin{DoxyCompactList}\small\item\em Constructors. \item\end{DoxyCompactList}\item 
\hypertarget{classTriePostOrderIterator_ae8b6c1f2c057b5380d1fe1229eb0e5f8}{
\hyperlink{classTriePostOrderIterator_ae8b6c1f2c057b5380d1fe1229eb0e5f8}{TriePostOrderIterator} (\hyperlink{classTrieNode}{Node} $\ast$n)}
\label{classTriePostOrderIterator_ae8b6c1f2c057b5380d1fe1229eb0e5f8}

\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{classTriePostOrderIterator_ab96a6403d889f556aa54b0fc5805fcbb}{
\hyperlink{classTriePostOrderIterator_ab96a6403d889f556aa54b0fc5805fcbb}{TriePostOrderIterator} (\hyperlink{classTrieNode}{Node} $\ast$n, const \hyperlink{classIPNet}{Key} \&k)}
\label{classTriePostOrderIterator_ab96a6403d889f556aa54b0fc5805fcbb}

\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{classTriePostOrderIterator_a3820d7387439584f9b6b6827d7dd4987}{
\hyperlink{classTriePostOrderIterator}{TriePostOrderIterator} $\ast$ \hyperlink{classTriePostOrderIterator_a3820d7387439584f9b6b6827d7dd4987}{begin} ()}
\label{classTriePostOrderIterator_a3820d7387439584f9b6b6827d7dd4987}

\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{classTriePostOrderIterator}{TriePostOrderIterator} \hyperlink{classTriePostOrderIterator_a613c4e428fbab80672590bb0e346b801}{operator++} (int)
\begin{DoxyCompactList}\small\item\em Postfix increment. \item\end{DoxyCompactList}\item 
\hyperlink{classTriePostOrderIterator}{TriePostOrderIterator} \& \hyperlink{classTriePostOrderIterator_a1a24bb8bb6ac34cdf416982821212a0a}{operator++} ()
\begin{DoxyCompactList}\small\item\em Prefix increment. \item\end{DoxyCompactList}\item 
\hypertarget{classTriePostOrderIterator_af4272777c09afe54191167b7f16f5bbe}{
\hyperlink{classTrieNode}{Node} $\ast$ {\bfseries cur} () const }
\label{classTriePostOrderIterator_af4272777c09afe54191167b7f16f5bbe}

\item 
\hypertarget{classTriePostOrderIterator_ade76bf4d33f094bbd102fe3c663498e4}{
bool {\bfseries operator==} (const \hyperlink{classTriePostOrderIterator}{TriePostOrderIterator} \&x) const }
\label{classTriePostOrderIterator_ade76bf4d33f094bbd102fe3c663498e4}

\item 
\hypertarget{classTriePostOrderIterator_a3ba6521394b64b71738e8e5e0745c60a}{
bool {\bfseries has\_\-payload} () const }
\label{classTriePostOrderIterator_a3ba6521394b64b71738e8e5e0745c60a}

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

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

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

\item 
\hypertarget{classTriePostOrderIterator_a08a534fe7dd0aff4a265b82ed4a046ab}{
void {\bfseries next} ()}
\label{classTriePostOrderIterator_a08a534fe7dd0aff4a265b82ed4a046ab}

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

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

\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$class A, class Payload$>$ class TriePostOrderIterator$<$ 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{classTriePostOrderIterator_a613c4e428fbab80672590bb0e346b801}{
\index{TriePostOrderIterator@{TriePostOrderIterator}!operator++@{operator++}}
\index{operator++@{operator++}!TriePostOrderIterator@{TriePostOrderIterator}}
\subsubsection[{operator++}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A, class Payload$>$ {\bf TriePostOrderIterator} {\bf TriePostOrderIterator}$<$ A, Payload $>$::operator++ (
\begin{DoxyParamCaption}
\item[{int}]{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classTriePostOrderIterator_a613c4e428fbab80672590bb0e346b801}


Postfix increment. 

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


Prefix increment. 

Updates position of iterator in tree. \begin{DoxyReturn}{Returns}
position of iterator after 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/trie.hh\end{DoxyCompactItemize}
