\hypertarget{classTestVarRW}{
\section{TestVarRW Class Reference}
\label{classTestVarRW}\index{TestVarRW@{TestVarRW}}
}
Inheritance diagram for TestVarRW:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classTestVarRW}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
const \hyperlink{classElement}{Element} \& \hyperlink{classTestVarRW_a3777daabf4ac7a7be3a28e367deb2622}{read} (const Id \&id)
\begin{DoxyCompactList}\small\item\em Read a variable from a route \mbox{[}such as nexthop\mbox{]}. \item\end{DoxyCompactList}\item 
void \hyperlink{classTestVarRW_a7eea5d3beaaa1dc1583e64f5b0aeaf0c}{write} (const Id \&id, const \hyperlink{classElement}{Element} \&elem)
\begin{DoxyCompactList}\small\item\em Write a variable to a route. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Types}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classTestVarRW_a5857a3c6e027b0202bdcfff6e3b6765e}{
typedef map$<$ Id, const \hyperlink{classElement}{Element} $\ast$ $>$ {\bfseries ELEM}}
\label{classTestVarRW_a5857a3c6e027b0202bdcfff6e3b6765e}

\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classTestVarRW_a184636c9b180bd1344f57d599539feb5}{
ELEM {\bfseries \_\-elem}}
\label{classTestVarRW_a184636c9b180bd1344f57d599539feb5}

\end{DoxyCompactItemize}


\subsection{Member Function Documentation}
\hypertarget{classTestVarRW_a3777daabf4ac7a7be3a28e367deb2622}{
\index{TestVarRW@{TestVarRW}!read@{read}}
\index{read@{read}!TestVarRW@{TestVarRW}}
\subsubsection[{read}]{\setlength{\rightskip}{0pt plus 5cm}const {\bf Element} \& TestVarRW::read (
\begin{DoxyParamCaption}
\item[{const Id \&}]{id}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classTestVarRW_a3777daabf4ac7a7be3a28e367deb2622}


Read a variable from a route \mbox{[}such as nexthop\mbox{]}. 

If \hyperlink{protocolthe-p}{the} protocol doesn't support \hyperlink{protocolthe-p}{the} requested variable, and exception should be thrown.

If \hyperlink{protocolthe-p}{the} variable is not present in \hyperlink{protocolthe-p}{the} current route, then an \hyperlink{classElemNull}{ElemNull} should be returned \mbox{[}for example if ipv6 is requested on a v4 route\mbox{]}.

\hyperlink{classVarRW}{VarRW} is responsible for deleting \hyperlink{protocolthe-p}{the} object read \mbox{[}it owns it\mbox{]}. However care must be taken not to delete objects that were obtained by \hyperlink{classTestVarRW_a7eea5d3beaaa1dc1583e64f5b0aeaf0c}{write()} even though we pass them to \hyperlink{classTestVarRW_a3777daabf4ac7a7be3a28e367deb2622}{read()} later.

\begin{DoxyReturn}{Returns}
\hyperlink{classElement}{Element} requested, or \hyperlink{classElemNull}{ElemNull} of element is not available. 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em id} & The variable that is being requested \mbox{[}such as metric\mbox{]}. \\
\hline
\end{DoxyParams}


Implements \hyperlink{classVarRW_acb944450b84b487faeb1cbde243f76f4}{VarRW}.

\hypertarget{classTestVarRW_a7eea5d3beaaa1dc1583e64f5b0aeaf0c}{
\index{TestVarRW@{TestVarRW}!write@{write}}
\index{write@{write}!TestVarRW@{TestVarRW}}
\subsubsection[{write}]{\setlength{\rightskip}{0pt plus 5cm}void TestVarRW::write (
\begin{DoxyParamCaption}
\item[{const Id \&}]{id, }
\item[{const {\bf Element} \&}]{e}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classTestVarRW_a7eea5d3beaaa1dc1583e64f5b0aeaf0c}


Write a variable to a route. 

\hyperlink{classVarRW}{VarRW} does not own \hyperlink{classElement}{Element}, so it must not delete it.


\begin{DoxyParams}{Parameters}
{\em id} & Identifier of variable that must be written to. \\
\hline
{\em e} & Value that must be written to \hyperlink{protocolthe-p}{the} variable. \\
\hline
\end{DoxyParams}


Implements \hyperlink{classVarRW_ad7447615a7d30de4c5ad847d1f885f25}{VarRW}.



The documentation for this class was generated from the following files:\begin{DoxyCompactItemize}
\item 
/home/greearb/git/xorp.ct.github/xorp/policy/test\_\-varrw.hh\item 
/home/greearb/git/xorp.ct.github/xorp/policy/test\_\-varrw.cc\end{DoxyCompactItemize}
