\hypertarget{classRIBVarRW}{
\section{RIBVarRW$<$ A $>$ Class Template Reference}
\label{classRIBVarRW}\index{RIBVarRW@{RIBVarRW}}
}


Enables reading and writing variables to a \hyperlink{classRIB}{RIB} route.  




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

Inheritance diagram for RIBVarRW$<$ A $>$:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3.000000cm]{classRIBVarRW}
\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{classRIBVarRW_af59b89480e204851a75392495c0fa266}{RIBVarRW} (\hyperlink{classIPRouteEntry}{IPRouteEntry}$<$ A $>$ \&route)
\item 
\hypertarget{classRIBVarRW_a374502fd0e3381cf013fc899ca04958f}{
void \hyperlink{classRIBVarRW_a374502fd0e3381cf013fc899ca04958f}{start\_\-read} ()}
\label{classRIBVarRW_a374502fd0e3381cf013fc899ca04958f}

\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 
void \hyperlink{classRIBVarRW_a39e2908c71f3cdd79d28ee8dfc090745}{single\_\-write} (const Id \&id, const \hyperlink{classElement}{Element} \&e)
\begin{DoxyCompactList}\small\item\em Write a variable. \item\end{DoxyCompactList}\item 
\hyperlink{classElement}{Element} $\ast$ \hyperlink{classRIBVarRW_ae87edea94ef2fa71ce9df60d45def4c1}{single\_\-read} (const Id \&id)
\begin{DoxyCompactList}\small\item\em Read of a variable. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{classRIBVarRW_afc589092757e6452cbcd1648cf2c657b}{read\_\-route\_\-nexthop} (\hyperlink{classIPRouteEntry}{IPRouteEntry}$<$ A $>$ \&r)
\begin{DoxyCompactList}\small\item\em Specialized template to read nexthop and ip address. \item\end{DoxyCompactList}\item 
\hypertarget{classRIBVarRW_a87756b2279264586cdb1f61905c2a047}{
{\footnotesize template$<$$>$ }\\void {\bfseries read\_\-route\_\-nexthop} (\hyperlink{classIPRouteEntry}{IPRouteEntry}$<$ \hyperlink{classIPv4}{IPv4} $>$ \&route)}
\label{classRIBVarRW_a87756b2279264586cdb1f61905c2a047}

\item 
\hypertarget{classRIBVarRW_af32efb8ee72aa382bb0805adce1b74eb}{
{\footnotesize template$<$$>$ }\\void {\bfseries read\_\-route\_\-nexthop} (\hyperlink{classIPRouteEntry}{IPRouteEntry}$<$ \hyperlink{classIPv6}{IPv6} $>$ \&route)}
\label{classRIBVarRW_af32efb8ee72aa382bb0805adce1b74eb}

\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classRIBVarRW_a5256b44a184ab64d4542ba1d8279a2b4}{
\hyperlink{classIPRouteEntry}{IPRouteEntry}$<$ A $>$ \& {\bfseries \_\-route}}
\label{classRIBVarRW_a5256b44a184ab64d4542ba1d8279a2b4}

\item 
\hypertarget{classRIBVarRW_ae59e3d45f679933af1f237783225e745}{
\hyperlink{classElementFactory}{ElementFactory} {\bfseries \_\-ef}}
\label{classRIBVarRW_ae59e3d45f679933af1f237783225e745}

\end{DoxyCompactItemize}


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

Enables reading and writing variables to a \hyperlink{classRIB}{RIB} route. This class is intended for connected routes only, and supports only policytags being altered. 

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

\begin{DoxyParams}{Parameters}
{\em route} & route to filter and possibly modify. \\
\hline
\end{DoxyParams}


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


Specialized template to read nexthop and ip address. 

If it is a v4 specialization, v6 addresses are set to null and vice-\/versa.


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


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


Write a variable. 


\begin{DoxyParams}{Parameters}
{\em id} & variablea to write. \\
\hline
{\em e} & value of variable. \\
\hline
\end{DoxyParams}


Implements \hyperlink{classSingleVarRW_a24cde180db3bac1e4554cafa1809ba7a}{SingleVarRW}.



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