\hypertarget{structNetCmp}{
\section{NetCmp$<$ A $>$ Struct Template Reference}
\label{structNetCmp}\index{NetCmp@{NetCmp}}
}


A network comparitor class for \hyperlink{protocolthe-p}{the} purposes of ordering networks in sorted containers.  




{\ttfamily \#include $<$route\_\-db.hh$>$}

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

\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{structNetCmp_a877c8b3842d0207f81b0f103a3dc108f}{
bool {\bfseries operator()} (const \hyperlink{classIPNet}{Net} \&l, const \hyperlink{classIPNet}{Net} \&r) const }
\label{structNetCmp_a877c8b3842d0207f81b0f103a3dc108f}

\item 
\hypertarget{structNetCmp_a660cd89019698f7917625251674883cd}{
bool {\bfseries operator()} (const \hyperlink{classIPNet}{IPNet}$<$ A $>$ \&l, const \hyperlink{classIPNet}{IPNet}$<$ A $>$ \&r) const }
\label{structNetCmp_a660cd89019698f7917625251674883cd}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$typename A$>$ struct NetCmp$<$ A $>$}

A network comparitor class for \hyperlink{protocolthe-p}{the} purposes of ordering networks in sorted containers. A comparitor for \hyperlink{protocolthe-p}{the} purposes of sorting containers of \hyperlink{classRouteEntry}{RouteEntry} objects.

It examines \hyperlink{protocolthe-p}{the} data rather than using \hyperlink{protocolthe-p}{the} address of pointers. The latter approach makes testing difficult on different platforms since \hyperlink{protocolthe-p}{the} tests may inadvertantly make assumptions about \hyperlink{protocolthe-p}{the} memory layout. The comparison is arbitrary, it just has to be consistent and reversible.

IFF speed proves to be an issue, \hyperlink{classRouteEntry}{RouteEntry} can be changed to be an element in an intrusive linked list that has a sentinel embedded in \hyperlink{protocolthe-p}{the} \hyperlink{classRouteEntryOrigin}{RouteEntryOrigin}. 

The documentation for this struct was generated from the following files:\begin{DoxyCompactItemize}
\item 
/home/greearb/git/xorp.ct.github/xorp/rip/route\_\-db.hh\item 
/home/greearb/git/xorp.ct.github/xorp/rip/route\_\-entry.cc\item 
/home/greearb/git/xorp.ct.github/xorp/rip/route\_\-db.cc\end{DoxyCompactItemize}
