\hypertarget{classRIPVarRW}{
\section{RIPVarRW$<$ A $>$ Class Template Reference}
\label{classRIPVarRW}\index{RIPVarRW@{RIPVarRW}}
}


Enables reading and writing variables of RIP routes.  




{\ttfamily \#include $<$rip\_\-varrw.hh$>$}

Inheritance diagram for RIPVarRW$<$ A $>$:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3.000000cm]{classRIPVarRW}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
enum \{ \par
{\bfseries VAR\_\-NETWORK4} =  VAR\_\-PROTOCOL, 
{\bfseries VAR\_\-NEXTHOP4}, 
{\bfseries VAR\_\-NETWORK6}, 
{\bfseries VAR\_\-NEXTHOP6}, 
\par
{\bfseries VAR\_\-METRIC}
 \}
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classRIPVarRW_ad1640f8a709250ec09d8b607527a1cd4}{RIPVarRW} (\hyperlink{classRouteEntry}{RouteEntry}$<$ A $>$ \&route)
\item 
\hypertarget{classRIPVarRW_abc992cfaa884d0a03f93590a9048e0b5}{
void \hyperlink{classRIPVarRW_abc992cfaa884d0a03f93590a9048e0b5}{start\_\-read} ()}
\label{classRIPVarRW_abc992cfaa884d0a03f93590a9048e0b5}

\begin{DoxyCompactList}\small\item\em If any reads are performed, this is a marker which informs \hyperlink{protocolthe-p}{the} derived class that reads will now start. \item\end{DoxyCompactList}\item 
\hyperlink{classElement}{Element} $\ast$ \hyperlink{classRIPVarRW_a9bddce5cdf356328d9f53baa3d036651}{single\_\-read} (const Id \&id)
\begin{DoxyCompactList}\small\item\em Read of a variable. \item\end{DoxyCompactList}\item 
void \hyperlink{classRIPVarRW_a335c57299517205e95ee20a4fb674afb}{single\_\-write} (const Id \&id, const \hyperlink{classElement}{Element} \&e)
\begin{DoxyCompactList}\small\item\em Write of a variable. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{classRIPVarRW_a9bbb75db5a81e3a00733a6e2081a1daa}{read\_\-route\_\-nexthop} (\hyperlink{classRouteEntry}{RouteEntry}$<$ A $>$ \&route)
\item 
bool \hyperlink{classRIPVarRW_a7b208da0967d1e88cc9f70f873f0ecc9}{write\_\-nexthop} (const Id \&id, const \hyperlink{classElement}{Element} \&e)
\begin{DoxyCompactList}\small\item\em Specialized template method to write correct nexthop value based on address family of route. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classRIPVarRW_ae03176f00e7c53b8732db1efcfb6e880}{
\hyperlink{classRouteEntry}{RouteEntry}$<$ A $>$ \& {\bfseries \_\-route}}
\label{classRIPVarRW_ae03176f00e7c53b8732db1efcfb6e880}

\end{DoxyCompactItemize}


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

Enables reading and writing variables of RIP routes. 

\subsection{Constructor \& Destructor Documentation}
\hypertarget{classRIPVarRW_ad1640f8a709250ec09d8b607527a1cd4}{
\index{RIPVarRW@{RIPVarRW}!RIPVarRW@{RIPVarRW}}
\index{RIPVarRW@{RIPVarRW}!RIPVarRW@{RIPVarRW}}
\subsubsection[{RIPVarRW}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A $>$ {\bf RIPVarRW}$<$ A $>$::{\bf RIPVarRW} (
\begin{DoxyParamCaption}
\item[{{\bf RouteEntry}$<$ A $>$ \&}]{route}
\end{DoxyParamCaption}
)}}
\label{classRIPVarRW_ad1640f8a709250ec09d8b607527a1cd4}

\begin{DoxyParams}{Parameters}
{\em route} & route to read/write values from. \\
\hline
\end{DoxyParams}


\subsection{Member Function Documentation}
\hypertarget{classRIPVarRW_a9bbb75db5a81e3a00733a6e2081a1daa}{
\index{RIPVarRW@{RIPVarRW}!read\_\-route\_\-nexthop@{read\_\-route\_\-nexthop}}
\index{read\_\-route\_\-nexthop@{read\_\-route\_\-nexthop}!RIPVarRW@{RIPVarRW}}
\subsubsection[{read\_\-route\_\-nexthop}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A$>$ void {\bf RIPVarRW}$<$ A $>$::read\_\-route\_\-nexthop (
\begin{DoxyParamCaption}
\item[{{\bf RouteEntry}$<$ A $>$ \&}]{route}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classRIPVarRW_a9bbb75db5a81e3a00733a6e2081a1daa}

\begin{DoxyParams}{Parameters}
{\em route} & route to read nexthop and network from. \\
\hline
\end{DoxyParams}
\hypertarget{classRIPVarRW_a9bddce5cdf356328d9f53baa3d036651}{
\index{RIPVarRW@{RIPVarRW}!single\_\-read@{single\_\-read}}
\index{single\_\-read@{single\_\-read}!RIPVarRW@{RIPVarRW}}
\subsubsection[{single\_\-read}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A $>$ {\bf Element} $\ast$ {\bf RIPVarRW}$<$ A $>$::single\_\-read (
\begin{DoxyParamCaption}
\item[{const Id \&}]{id}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classRIPVarRW_a9bddce5cdf356328d9f53baa3d036651}


Read of a variable. 

The \hyperlink{classVarRW}{VarRW} needs to read a particular element. This may return NULL indicating ElemNull-\/-\/-\/i.e. variable not present in THIS route.

\begin{DoxyReturn}{Returns}
variable requested. 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em id} & \hyperlink{protocolthe-p}{the} id of \hyperlink{protocolthe-p}{the} variable. \\
\hline
\end{DoxyParams}


Implements \hyperlink{classSingleVarRW_a54ef877baad0937b181563e8b5eef44a}{SingleVarRW}.

\hypertarget{classRIPVarRW_a335c57299517205e95ee20a4fb674afb}{
\index{RIPVarRW@{RIPVarRW}!single\_\-write@{single\_\-write}}
\index{single\_\-write@{single\_\-write}!RIPVarRW@{RIPVarRW}}
\subsubsection[{single\_\-write}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A $>$ void {\bf RIPVarRW}$<$ A $>$::single\_\-write (
\begin{DoxyParamCaption}
\item[{const Id \&}]{id, }
\item[{const {\bf Element} \&}]{e}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classRIPVarRW_a335c57299517205e95ee20a4fb674afb}


Write of a variable. 

The write MUST be performed now, as \hyperlink{protocolthe-p}{the} element pointer may become invalid after this call. Also, a single write will be called for each modified element.


\begin{DoxyParams}{Parameters}
{\em id} & identifier of variable to be written to. \\
\hline
{\em e} & value of variable. \\
\hline
\end{DoxyParams}


Implements \hyperlink{classSingleVarRW_a24cde180db3bac1e4554cafa1809ba7a}{SingleVarRW}.

\hypertarget{classRIPVarRW_a7b208da0967d1e88cc9f70f873f0ecc9}{
\index{RIPVarRW@{RIPVarRW}!write\_\-nexthop@{write\_\-nexthop}}
\index{write\_\-nexthop@{write\_\-nexthop}!RIPVarRW@{RIPVarRW}}
\subsubsection[{write\_\-nexthop}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A$>$ bool {\bf RIPVarRW}$<$ A $>$::write\_\-nexthop (
\begin{DoxyParamCaption}
\item[{const Id \&}]{id, }
\item[{const {\bf Element} \&}]{e}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classRIPVarRW_a7b208da0967d1e88cc9f70f873f0ecc9}


Specialized template method to write correct nexthop value based on address family of route. 


\begin{DoxyParams}{Parameters}
{\em id} & variable to write. \\
\hline
{\em e} & value of variable. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if write was performed, false otherwise. 
\end{DoxyReturn}


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