\hypertarget{classVisitorSemantic}{
\section{VisitorSemantic Class Reference}
\label{classVisitorSemantic}\index{VisitorSemantic@{VisitorSemantic}}
}


A policy semantic checker.  




{\ttfamily \#include $<$visitor\_\-semantic.hh$>$}

Inheritance diagram for VisitorSemantic:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classVisitorSemantic}
\end{center}
\end{figure}
\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \hyperlink{classVisitorSemantic_1_1sem__error}{sem\_\-error}
\begin{DoxyCompactList}\small\item\em Exception thrown on a semantic error. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
enum {\bfseries PolicyType} \{ {\bfseries IMPORT}, 
{\bfseries EXPORT}
 \}
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classVisitorSemantic_a62bc783c804e1e564147cd19bc999ed7}{VisitorSemantic} (\hyperlink{classSemanticVarRW}{SemanticVarRW} \&varrw, \hyperlink{classVarMap}{VarMap} \&varmap, \hyperlink{classSetMap}{SetMap} \&setmap, \hyperlink{classPolicyMap}{PolicyMap} \&pmap, const string \&protocol, PolicyType ptype)
\item 
\hypertarget{classVisitorSemantic_a2ffc97db424fbb3e9fa686b859a7e8db}{
const \hyperlink{classElement}{Element} $\ast$ {\bfseries visit} (\hyperlink{classPolicyStatement}{PolicyStatement} \&policy)}
\label{classVisitorSemantic_a2ffc97db424fbb3e9fa686b859a7e8db}

\item 
\hypertarget{classVisitorSemantic_a31b9b24cfffd3672843135d0d1657410}{
const \hyperlink{classElement}{Element} $\ast$ {\bfseries visit} (\hyperlink{classTerm}{Term} \&term)}
\label{classVisitorSemantic_a31b9b24cfffd3672843135d0d1657410}

\item 
\hypertarget{classVisitorSemantic_a06146f64daba825bc363be1b9fd4ae09}{
const \hyperlink{classElement}{Element} $\ast$ {\bfseries visit} (\hyperlink{classNodeUn}{NodeUn} \&node)}
\label{classVisitorSemantic_a06146f64daba825bc363be1b9fd4ae09}

\item 
\hypertarget{classVisitorSemantic_adbe002edce54daea65d20910e432e8e0}{
const \hyperlink{classElement}{Element} $\ast$ {\bfseries visit} (\hyperlink{classNodeBin}{NodeBin} \&node)}
\label{classVisitorSemantic_adbe002edce54daea65d20910e432e8e0}

\item 
\hypertarget{classVisitorSemantic_a94a71623255d9335aff1522ad597fc28}{
const \hyperlink{classElement}{Element} $\ast$ {\bfseries visit} (\hyperlink{classNodeAssign}{NodeAssign} \&node)}
\label{classVisitorSemantic_a94a71623255d9335aff1522ad597fc28}

\item 
\hypertarget{classVisitorSemantic_a44f0042d3ee2805f0ad32738b6c77d76}{
const \hyperlink{classElement}{Element} $\ast$ {\bfseries visit} (\hyperlink{classNodeAny}{NodeVar} \&node)}
\label{classVisitorSemantic_a44f0042d3ee2805f0ad32738b6c77d76}

\item 
\hypertarget{classVisitorSemantic_aa727eab43fb2a83099fffde4557c28e5}{
const \hyperlink{classElement}{Element} $\ast$ {\bfseries visit} (\hyperlink{classNodeSet}{NodeSet} \&node)}
\label{classVisitorSemantic_aa727eab43fb2a83099fffde4557c28e5}

\item 
\hypertarget{classVisitorSemantic_ac8bce038183732d45a8692ecf23bdb9f}{
const \hyperlink{classElement}{Element} $\ast$ {\bfseries visit} (\hyperlink{classNodeElem}{NodeElem} \&node)}
\label{classVisitorSemantic_ac8bce038183732d45a8692ecf23bdb9f}

\item 
\hypertarget{classVisitorSemantic_af80998387f623f933e0579db25cf5c76}{
const \hyperlink{classElement}{Element} $\ast$ {\bfseries visit} (\hyperlink{classNodeAccept}{NodeAccept} \&node)}
\label{classVisitorSemantic_af80998387f623f933e0579db25cf5c76}

\item 
\hypertarget{classVisitorSemantic_aec5a6a125f78c661bfe39faea4e19bb3}{
const \hyperlink{classElement}{Element} $\ast$ {\bfseries visit} (\hyperlink{classNodeReject}{NodeReject} \&node)}
\label{classVisitorSemantic_aec5a6a125f78c661bfe39faea4e19bb3}

\item 
\hypertarget{classVisitorSemantic_aaf31c704da60648b5e8ff5a754ffdecc}{
const \hyperlink{classElement}{Element} $\ast$ {\bfseries visit} (\hyperlink{classNodeProto}{NodeProto} \&node)}
\label{classVisitorSemantic_aaf31c704da60648b5e8ff5a754ffdecc}

\item 
\hypertarget{classVisitorSemantic_a963632c67d0a0ffd60672076517acfc0}{
const \hyperlink{classElement}{Element} $\ast$ {\bfseries visit} (\hyperlink{classNodeNext}{NodeNext} \&node)}
\label{classVisitorSemantic_a963632c67d0a0ffd60672076517acfc0}

\item 
\hypertarget{classVisitorSemantic_a992dc3415c2f29f1528f2f38eb388e0e}{
const \hyperlink{classElement}{Element} $\ast$ {\bfseries visit} (\hyperlink{classNodeSubr}{NodeSubr} \&node)}
\label{classVisitorSemantic_a992dc3415c2f29f1528f2f38eb388e0e}

\item 
const set$<$ string $>$ \& \hyperlink{classVisitorSemantic_a89cf1bf74059b72194c844d9c77d3717}{sets} () const 
\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classVisitorSemantic_a4c90518578c85a239be957a0802131ad}{
void {\bfseries change\_\-protocol} (const string \&proto)}
\label{classVisitorSemantic_a4c90518578c85a239be957a0802131ad}

\item 
\hypertarget{classVisitorSemantic_af5518707ab14d8a25a6df17f0a21a0cc}{
const string \& {\bfseries semantic\_\-protocol} ()}
\label{classVisitorSemantic_af5518707ab14d8a25a6df17f0a21a0cc}

\item 
\hypertarget{classVisitorSemantic_a9d151e30b0590830d7e485ae13b56117}{
const \hyperlink{classElement}{Element} $\ast$ {\bfseries do\_\-bin} (const \hyperlink{classElement}{Element} \&left, const \hyperlink{classElement}{Element} \&right, const \hyperlink{classBinOper}{BinOper} \&op, const \hyperlink{classNode}{Node} \&from)}
\label{classVisitorSemantic_a9d151e30b0590830d7e485ae13b56117}

\item 
\hypertarget{classVisitorSemantic_a8d564ad9afd953cae580e93454ffcb1b}{
void {\bfseries do\_\-policy\_\-statement} (\hyperlink{classPolicyStatement}{PolicyStatement} \&ps)}
\label{classVisitorSemantic_a8d564ad9afd953cae580e93454ffcb1b}

\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classVisitorSemantic_accb80d707efc85b2b8853121cfc4f6c9}{
\hyperlink{classSemanticVarRW}{SemanticVarRW} \& {\bfseries \_\-varrw}}
\label{classVisitorSemantic_accb80d707efc85b2b8853121cfc4f6c9}

\item 
\hypertarget{classVisitorSemantic_a015661a9440211885b753fd61f6955fb}{
\hyperlink{classVarMap}{VarMap} \& {\bfseries \_\-varmap}}
\label{classVisitorSemantic_a015661a9440211885b753fd61f6955fb}

\item 
\hypertarget{classVisitorSemantic_a984d2b8b966393c8b8f96fee3660d276}{
\hyperlink{classSetMap}{SetMap} \& {\bfseries \_\-setmap}}
\label{classVisitorSemantic_a984d2b8b966393c8b8f96fee3660d276}

\item 
\hypertarget{classVisitorSemantic_a2794cfff33f8929779fe87773e9e2130}{
\hyperlink{classPolicyMap}{PolicyMap} \& {\bfseries \_\-pmap}}
\label{classVisitorSemantic_a2794cfff33f8929779fe87773e9e2130}

\item 
\hypertarget{classVisitorSemantic_a2c42dbd4ccfbfc48a5c759d1785472bc}{
\hyperlink{classDispatcher}{Dispatcher} {\bfseries \_\-disp}}
\label{classVisitorSemantic_a2c42dbd4ccfbfc48a5c759d1785472bc}

\item 
\hypertarget{classVisitorSemantic_acf2be9d91b0682c4d556880f7c1b1517}{
set$<$ string $>$ {\bfseries \_\-sets}}
\label{classVisitorSemantic_acf2be9d91b0682c4d556880f7c1b1517}

\item 
\hypertarget{classVisitorSemantic_a3660ca61a232e678b04ca447581d5360}{
string {\bfseries \_\-protocol}}
\label{classVisitorSemantic_a3660ca61a232e678b04ca447581d5360}

\item 
\hypertarget{classVisitorSemantic_a96c9eec37a5c3adb330d5aa531a61ab6}{
string {\bfseries \_\-current\_\-protocol}}
\label{classVisitorSemantic_a96c9eec37a5c3adb330d5aa531a61ab6}

\item 
\hypertarget{classVisitorSemantic_acaa180bf0bf56b096e1cfc47f5d82464}{
string {\bfseries \_\-semantic\_\-protocol}}
\label{classVisitorSemantic_acaa180bf0bf56b096e1cfc47f5d82464}

\item 
\hypertarget{classVisitorSemantic_acf9b08bdfac7e3a3b7128b2b1f728de2}{
PolicyType {\bfseries \_\-ptype}}
\label{classVisitorSemantic_acf9b08bdfac7e3a3b7128b2b1f728de2}

\item 
\hypertarget{classVisitorSemantic_ab92926920e84f090237f9c68eec9b762}{
set$<$ \hyperlink{classElement}{Element} $\ast$ $>$ {\bfseries \_\-trash}}
\label{classVisitorSemantic_ab92926920e84f090237f9c68eec9b762}

\item 
\hypertarget{classVisitorSemantic_a74747055f35acfbfc2c596ec63cc0432}{
bool {\bfseries \_\-reject}}
\label{classVisitorSemantic_a74747055f35acfbfc2c596ec63cc0432}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
A policy semantic checker. A policy is instantiated by a protocol and policytype. Thus, semantic checking must be performed realtive to \hyperlink{protocolthe-p}{the} instantiation. \mbox{[}Generic semantic checking may be accomplished too, but it is not done.\mbox{]} 

\subsection{Constructor \& Destructor Documentation}
\hypertarget{classVisitorSemantic_a62bc783c804e1e564147cd19bc999ed7}{
\index{VisitorSemantic@{VisitorSemantic}!VisitorSemantic@{VisitorSemantic}}
\index{VisitorSemantic@{VisitorSemantic}!VisitorSemantic@{VisitorSemantic}}
\subsubsection[{VisitorSemantic}]{\setlength{\rightskip}{0pt plus 5cm}VisitorSemantic::VisitorSemantic (
\begin{DoxyParamCaption}
\item[{{\bf SemanticVarRW} \&}]{varrw, }
\item[{{\bf VarMap} \&}]{varmap, }
\item[{{\bf SetMap} \&}]{setmap, }
\item[{{\bf PolicyMap} \&}]{pmap, }
\item[{const string \&}]{protocol, }
\item[{PolicyType}]{ptype}
\end{DoxyParamCaption}
)}}
\label{classVisitorSemantic_a62bc783c804e1e564147cd19bc999ed7}

\begin{DoxyParams}{Parameters}
{\em varrw} & semantic \hyperlink{classVarRW}{VarRW} used to simulate a protocol. \\
\hline
{\em varmap} & \hyperlink{protocolthe-p}{the} varmap. \\
\hline
{\em setmap} & \hyperlink{protocolthe-p}{the} \hyperlink{classSetMap}{SetMap} to check if sets exist. \\
\hline
{\em pmap} & \hyperlink{protocolthe-p}{the} policy map to check subroutines. \\
\hline
{\em protocol} & \hyperlink{protocolthe-p}{the} protocol which instantiates \hyperlink{protocolthe-p}{the} policy. \\
\hline
{\em ptype} & \hyperlink{protocolthe-p}{the} type of policy \mbox{[}import/export\mbox{]}. \\
\hline
\end{DoxyParams}


\subsection{Member Function Documentation}
\hypertarget{classVisitorSemantic_a89cf1bf74059b72194c844d9c77d3717}{
\index{VisitorSemantic@{VisitorSemantic}!sets@{sets}}
\index{sets@{sets}!VisitorSemantic@{VisitorSemantic}}
\subsubsection[{sets}]{\setlength{\rightskip}{0pt plus 5cm}const set$<$string$>$\& VisitorSemantic::sets (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classVisitorSemantic_a89cf1bf74059b72194c844d9c77d3717}
\begin{DoxyReturn}{Returns}
sets used by \hyperlink{protocolthe-p}{the} policy. 
\end{DoxyReturn}


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