\hypertarget{classPolicyMap}{
\section{PolicyMap Class Reference}
\label{classPolicyMap}\index{PolicyMap@{PolicyMap}}
}


Container of all policies.  




{\ttfamily \#include $<$policy\_\-map.hh$>$}

\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \hyperlink{classPolicyMap_1_1PolicyMapError}{PolicyMapError}
\begin{DoxyCompactList}\small\item\em Exception thrown on errors such as when a policy is not found. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classPolicyMap_a34358a21a48b4bf022128b7f60732921}{
typedef \hyperlink{classDependency}{Dependency}$<$ \hyperlink{classPolicyStatement}{PolicyStatement} $>$::KEYS {\bfseries KEYS}}
\label{classPolicyMap_a34358a21a48b4bf022128b7f60732921}

\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classPolicyStatement}{PolicyStatement} \& \hyperlink{classPolicyMap_a2acce55a8e0d3c76eff3ff4970873e48}{find} (const string \&name) const 
\begin{DoxyCompactList}\small\item\em Find a policy. \item\end{DoxyCompactList}\item 
bool \hyperlink{classPolicyMap_addd7d5329b934417d38aa024113f64f3}{exists} (const string \&name)
\begin{DoxyCompactList}\small\item\em Checks if a policy exists. \item\end{DoxyCompactList}\item 
void \hyperlink{classPolicyMap_ad2417a0bace37cdb463e8211f3af3c9f}{create} (const string \&name, \hyperlink{classSetMap}{SetMap} \&smap)
\begin{DoxyCompactList}\small\item\em Attempts to create a policy and update depndencies. \item\end{DoxyCompactList}\item 
void \hyperlink{classPolicyMap_a42e6340d5ae62fe631c472b9ed817be4}{delete\_\-policy} (const string \&name)
\begin{DoxyCompactList}\small\item\em Attempts to delete a policy. \item\end{DoxyCompactList}\item 
void \hyperlink{classPolicyMap_a129d370c9c96f349664b50e7fda3f129}{add\_\-dependency} (const string \&policyname, const string \&protocol)
\begin{DoxyCompactList}\small\item\em Indicates \hyperlink{protocolthe-p}{the} use of a policy by a protocol. \item\end{DoxyCompactList}\item 
void \hyperlink{classPolicyMap_a11487cbaed35c5c02a710d63d97f5943}{del\_\-dependency} (const string \&policyname, const string \&protocol)
\begin{DoxyCompactList}\small\item\em Remove \hyperlink{protocolthe-p}{the} use of a policy by a protocol. \item\end{DoxyCompactList}\item 
string \hyperlink{classPolicyMap_a95d09a2dda98e355633b51b3aa6693a2}{str} ()
\begin{DoxyCompactList}\small\item\em Dumps all policies in human readable format. \item\end{DoxyCompactList}\item 
\hypertarget{classPolicyMap_a690af142cfe06efc25b3db2b0dfc2651}{
void {\bfseries clear} ()}
\label{classPolicyMap_a690af142cfe06efc25b3db2b0dfc2651}

\item 
\hypertarget{classPolicyMap_a72e69131af7a41fcbd364c6773e1b034}{
void {\bfseries policy\_\-deps} (const string \&policy, DEPS \&deps)}
\label{classPolicyMap_a72e69131af7a41fcbd364c6773e1b034}

\item 
\hypertarget{classPolicyMap_a5519ef52292863c08fa5a1788c268b34}{
void {\bfseries policies} (KEYS \&out)}
\label{classPolicyMap_a5519ef52292863c08fa5a1788c268b34}

\end{DoxyCompactItemize}
\subsection*{Private Types}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classPolicyMap_a07ac541b16861bb9451eb0f88ae671a1}{
typedef \hyperlink{classDependency}{Dependency}$<$ \hyperlink{classPolicyStatement}{PolicyStatement} $>$ {\bfseries Dep}}
\label{classPolicyMap_a07ac541b16861bb9451eb0f88ae671a1}

\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classPolicyMap_a74ea4e0548d0818ffae4fa65fc4ba261}{
\hyperlink{classDependency}{Dep} {\bfseries \_\-deps}}
\label{classPolicyMap_a74ea4e0548d0818ffae4fa65fc4ba261}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
Container of all policies. It relates policy names with actual policies and deals with dependencies. 

\subsection{Member Function Documentation}
\hypertarget{classPolicyMap_a129d370c9c96f349664b50e7fda3f129}{
\index{PolicyMap@{PolicyMap}!add\_\-dependency@{add\_\-dependency}}
\index{add\_\-dependency@{add\_\-dependency}!PolicyMap@{PolicyMap}}
\subsubsection[{add\_\-dependency}]{\setlength{\rightskip}{0pt plus 5cm}void PolicyMap::add\_\-dependency (
\begin{DoxyParamCaption}
\item[{const string \&}]{policyname, }
\item[{const string \&}]{protocol}
\end{DoxyParamCaption}
)}}
\label{classPolicyMap_a129d370c9c96f349664b50e7fda3f129}


Indicates \hyperlink{protocolthe-p}{the} use of a policy by a protocol. 


\begin{DoxyParams}{Parameters}
{\em policyname} & policy name. \\
\hline
{\em protocol} & name of protocol which uses policy. \\
\hline
\end{DoxyParams}
\hypertarget{classPolicyMap_ad2417a0bace37cdb463e8211f3af3c9f}{
\index{PolicyMap@{PolicyMap}!create@{create}}
\index{create@{create}!PolicyMap@{PolicyMap}}
\subsubsection[{create}]{\setlength{\rightskip}{0pt plus 5cm}void PolicyMap::create (
\begin{DoxyParamCaption}
\item[{const string \&}]{name, }
\item[{{\bf SetMap} \&}]{smap}
\end{DoxyParamCaption}
)}}
\label{classPolicyMap_ad2417a0bace37cdb463e8211f3af3c9f}


Attempts to create a policy and update depndencies. 

Throws an exception on error.


\begin{DoxyParams}{Parameters}
{\em name} & name of policy. \\
\hline
{\em smap} & \hyperlink{classSetMap}{SetMap} used for updating dependencies. \\
\hline
\end{DoxyParams}
\hypertarget{classPolicyMap_a11487cbaed35c5c02a710d63d97f5943}{
\index{PolicyMap@{PolicyMap}!del\_\-dependency@{del\_\-dependency}}
\index{del\_\-dependency@{del\_\-dependency}!PolicyMap@{PolicyMap}}
\subsubsection[{del\_\-dependency}]{\setlength{\rightskip}{0pt plus 5cm}void PolicyMap::del\_\-dependency (
\begin{DoxyParamCaption}
\item[{const string \&}]{policyname, }
\item[{const string \&}]{protocol}
\end{DoxyParamCaption}
)}}
\label{classPolicyMap_a11487cbaed35c5c02a710d63d97f5943}


Remove \hyperlink{protocolthe-p}{the} use of a policy by a protocol. 


\begin{DoxyParams}{Parameters}
{\em policyname} & policy name. \\
\hline
{\em protocol} & name of protocol which no longer uses policy. \\
\hline
\end{DoxyParams}
\hypertarget{classPolicyMap_a42e6340d5ae62fe631c472b9ed817be4}{
\index{PolicyMap@{PolicyMap}!delete\_\-policy@{delete\_\-policy}}
\index{delete\_\-policy@{delete\_\-policy}!PolicyMap@{PolicyMap}}
\subsubsection[{delete\_\-policy}]{\setlength{\rightskip}{0pt plus 5cm}void PolicyMap::delete\_\-policy (
\begin{DoxyParamCaption}
\item[{const string \&}]{name}
\end{DoxyParamCaption}
)}}
\label{classPolicyMap_a42e6340d5ae62fe631c472b9ed817be4}


Attempts to delete a policy. 

Throws an exception on error.


\begin{DoxyParams}{Parameters}
{\em name} & policy name. \\
\hline
\end{DoxyParams}
\hypertarget{classPolicyMap_addd7d5329b934417d38aa024113f64f3}{
\index{PolicyMap@{PolicyMap}!exists@{exists}}
\index{exists@{exists}!PolicyMap@{PolicyMap}}
\subsubsection[{exists}]{\setlength{\rightskip}{0pt plus 5cm}bool PolicyMap::exists (
\begin{DoxyParamCaption}
\item[{const string \&}]{name}
\end{DoxyParamCaption}
)}}
\label{classPolicyMap_addd7d5329b934417d38aa024113f64f3}


Checks if a policy exists. 

\begin{DoxyReturn}{Returns}
true if policy exists. 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em name} & name of policy. \\
\hline
\end{DoxyParams}
\hypertarget{classPolicyMap_a2acce55a8e0d3c76eff3ff4970873e48}{
\index{PolicyMap@{PolicyMap}!find@{find}}
\index{find@{find}!PolicyMap@{PolicyMap}}
\subsubsection[{find}]{\setlength{\rightskip}{0pt plus 5cm}{\bf PolicyStatement} \& PolicyMap::find (
\begin{DoxyParamCaption}
\item[{const string \&}]{name}
\end{DoxyParamCaption}
) const}}
\label{classPolicyMap_a2acce55a8e0d3c76eff3ff4970873e48}


Find a policy. 

Throws an exception if not found.

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

\begin{DoxyParams}{Parameters}
{\em name} & name of policy wanted. \\
\hline
\end{DoxyParams}
\hypertarget{classPolicyMap_a95d09a2dda98e355633b51b3aa6693a2}{
\index{PolicyMap@{PolicyMap}!str@{str}}
\index{str@{str}!PolicyMap@{PolicyMap}}
\subsubsection[{str}]{\setlength{\rightskip}{0pt plus 5cm}string PolicyMap::str (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{classPolicyMap_a95d09a2dda98e355633b51b3aa6693a2}


Dumps all policies in human readable format. 

\begin{DoxyReturn}{Returns}
string representation of all policies. 
\end{DoxyReturn}


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