\hypertarget{classSetMap}{
\section{SetMap Class Reference}
\label{classSetMap}\index{SetMap@{SetMap}}
}


Container of all sets.  




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

\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \hyperlink{classSetMap_1_1SetMapError}{SetMapError}
\begin{DoxyCompactList}\small\item\em Exception thrown on error, such as deleting a set in use. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
const \hyperlink{classElement}{Element} \& \hyperlink{classSetMap_a5582acd116b68d5a9e8eb24c39f37be3}{getSet} (const string \&name) const 
\begin{DoxyCompactList}\small\item\em Throws exception if set is not found. \item\end{DoxyCompactList}\item 
void \hyperlink{classSetMap_a198097c26337fbc39eb81e930cdcd1f2}{create} (const string \&name)
\begin{DoxyCompactList}\small\item\em Create a new set. \item\end{DoxyCompactList}\item 
void \hyperlink{classSetMap_a916c95d3d70f1f34c5f2ef557e060338}{update\_\-set} (const string \&type, const string \&name, const string \&elements, set$<$ string $>$ \&modified)
\begin{DoxyCompactList}\small\item\em Replace \hyperlink{protocolthe-p}{the} elements of a set. \item\end{DoxyCompactList}\item 
void \hyperlink{classSetMap_af2f411cbf2435ce62eb65ec84edeef06}{delete\_\-set} (const string \&name)
\begin{DoxyCompactList}\small\item\em Attempts to delete a set. \item\end{DoxyCompactList}\item 
void \hyperlink{classSetMap_ac20809907e914fbae9a0152ab2f87fe2}{add\_\-to\_\-set} (const string \&type, const string \&name, const string \&element, set$<$ string $>$ \&modified)
\begin{DoxyCompactList}\small\item\em Add an element to a set. \item\end{DoxyCompactList}\item 
void \hyperlink{classSetMap_a9d633d321bd1c2f92df3689a187c6857}{delete\_\-from\_\-set} (const string \&type, const string \&name, const string \&element, set$<$ string $>$ \&modified)
\begin{DoxyCompactList}\small\item\em Delete an element from a set. \item\end{DoxyCompactList}\item 
void \hyperlink{classSetMap_a9055b9324841c7d929111ebd7e1b6392}{add\_\-dependency} (const string \&setname, const string \&policyname)
\begin{DoxyCompactList}\small\item\em Add a dependency of a policy using a set. \item\end{DoxyCompactList}\item 
void \hyperlink{classSetMap_ac96bcd7258b8fc125de96e943b905f1c}{del\_\-dependency} (const string \&setname, const string \&policyname)
\begin{DoxyCompactList}\small\item\em Delete a dependency of a policy using a set. \item\end{DoxyCompactList}\item 
string \hyperlink{classSetMap_a44cec36cbd6dfea01d747db3bf139c73}{str} () const 
\item 
\hypertarget{classSetMap_a973d1457216b0f63238656d15842cb47}{
void {\bfseries sets\_\-by\_\-type} (SETS \&s, const string \&type) const }
\label{classSetMap_a973d1457216b0f63238656d15842cb47}

\end{DoxyCompactItemize}
\subsection*{Private Types}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classSetMap_a6e2a1756f7f0f4dfb93d5aec4069744e}{
typedef \hyperlink{classDependency}{Dependency}$<$ \hyperlink{classElement}{Element} $>$ {\bfseries Dep}}
\label{classSetMap_a6e2a1756f7f0f4dfb93d5aec4069744e}

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

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

\end{DoxyCompactItemize}


\subsection{Detailed Description}
Container of all sets. The \hyperlink{classSetMap}{SetMap} owns all sets in \hyperlink{protocolthe-p}{the} policy configuration. It also tracks dependencies between sets and policies. 

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


Add a dependency of a policy using a set. 

Throws an exception if set is not found.


\begin{DoxyParams}{Parameters}
{\em setname} & name of set in which dependency should be added. \\
\hline
{\em policyname} & name of policy which uses \hyperlink{protocolthe-p}{the} set. \\
\hline
\end{DoxyParams}
\hypertarget{classSetMap_ac20809907e914fbae9a0152ab2f87fe2}{
\index{SetMap@{SetMap}!add\_\-to\_\-set@{add\_\-to\_\-set}}
\index{add\_\-to\_\-set@{add\_\-to\_\-set}!SetMap@{SetMap}}
\subsubsection[{add\_\-to\_\-set}]{\setlength{\rightskip}{0pt plus 5cm}void SetMap::add\_\-to\_\-set (
\begin{DoxyParamCaption}
\item[{const string \&}]{type, }
\item[{const string \&}]{name, }
\item[{const string \&}]{element, }
\item[{set$<$ string $>$ \&}]{modified}
\end{DoxyParamCaption}
)}}
\label{classSetMap_ac20809907e914fbae9a0152ab2f87fe2}


Add an element to a set. 

Throws an expcetion if set does not exist.


\begin{DoxyParams}{Parameters}
{\em type} & type of \hyperlink{protocolthe-p}{the} set. \\
\hline
{\em name} & name of \hyperlink{protocolthe-p}{the} set. \\
\hline
{\em element} & \hyperlink{protocolthe-p}{the} element to add. \\
\hline
{\em modified} & set filled with policies which are now modified. \\
\hline
\end{DoxyParams}
\hypertarget{classSetMap_a198097c26337fbc39eb81e930cdcd1f2}{
\index{SetMap@{SetMap}!create@{create}}
\index{create@{create}!SetMap@{SetMap}}
\subsubsection[{create}]{\setlength{\rightskip}{0pt plus 5cm}void SetMap::create (
\begin{DoxyParamCaption}
\item[{const string \&}]{name}
\end{DoxyParamCaption}
)}}
\label{classSetMap_a198097c26337fbc39eb81e930cdcd1f2}


Create a new set. 

Throws exception if set exists.


\begin{DoxyParams}{Parameters}
{\em name} & name of \hyperlink{protocolthe-p}{the} set. \\
\hline
\end{DoxyParams}
\hypertarget{classSetMap_ac96bcd7258b8fc125de96e943b905f1c}{
\index{SetMap@{SetMap}!del\_\-dependency@{del\_\-dependency}}
\index{del\_\-dependency@{del\_\-dependency}!SetMap@{SetMap}}
\subsubsection[{del\_\-dependency}]{\setlength{\rightskip}{0pt plus 5cm}void SetMap::del\_\-dependency (
\begin{DoxyParamCaption}
\item[{const string \&}]{setname, }
\item[{const string \&}]{policyname}
\end{DoxyParamCaption}
)}}
\label{classSetMap_ac96bcd7258b8fc125de96e943b905f1c}


Delete a dependency of a policy using a set. 

Throws an exception if set or policy is not found.


\begin{DoxyParams}{Parameters}
{\em setname} & name of set in which dependency should be removed. \\
\hline
{\em policyname} & name of policy which no longer uses \hyperlink{protocolthe-p}{the} set. \\
\hline
\end{DoxyParams}
\hypertarget{classSetMap_a9d633d321bd1c2f92df3689a187c6857}{
\index{SetMap@{SetMap}!delete\_\-from\_\-set@{delete\_\-from\_\-set}}
\index{delete\_\-from\_\-set@{delete\_\-from\_\-set}!SetMap@{SetMap}}
\subsubsection[{delete\_\-from\_\-set}]{\setlength{\rightskip}{0pt plus 5cm}void SetMap::delete\_\-from\_\-set (
\begin{DoxyParamCaption}
\item[{const string \&}]{type, }
\item[{const string \&}]{name, }
\item[{const string \&}]{element, }
\item[{set$<$ string $>$ \&}]{modified}
\end{DoxyParamCaption}
)}}
\label{classSetMap_a9d633d321bd1c2f92df3689a187c6857}


Delete an element from a set. 

Throws an expcetion if set does not exist.


\begin{DoxyParams}{Parameters}
{\em type} & type of \hyperlink{protocolthe-p}{the} set. \\
\hline
{\em name} & name of \hyperlink{protocolthe-p}{the} set. \\
\hline
{\em element} & \hyperlink{protocolthe-p}{the} element to delete. \\
\hline
{\em modified} & set filled with policies which are now modified. \\
\hline
\end{DoxyParams}
\hypertarget{classSetMap_af2f411cbf2435ce62eb65ec84edeef06}{
\index{SetMap@{SetMap}!delete\_\-set@{delete\_\-set}}
\index{delete\_\-set@{delete\_\-set}!SetMap@{SetMap}}
\subsubsection[{delete\_\-set}]{\setlength{\rightskip}{0pt plus 5cm}void SetMap::delete\_\-set (
\begin{DoxyParamCaption}
\item[{const string \&}]{name}
\end{DoxyParamCaption}
)}}
\label{classSetMap_af2f411cbf2435ce62eb65ec84edeef06}


Attempts to delete a set. 

Throws an exception if set is in use.


\begin{DoxyParams}{Parameters}
{\em name} & name of \hyperlink{protocolthe-p}{the} set. \\
\hline
\end{DoxyParams}
\hypertarget{classSetMap_a5582acd116b68d5a9e8eb24c39f37be3}{
\index{SetMap@{SetMap}!getSet@{getSet}}
\index{getSet@{getSet}!SetMap@{SetMap}}
\subsubsection[{getSet}]{\setlength{\rightskip}{0pt plus 5cm}const {\bf Element} \& SetMap::getSet (
\begin{DoxyParamCaption}
\item[{const string \&}]{name}
\end{DoxyParamCaption}
) const}}
\label{classSetMap_a5582acd116b68d5a9e8eb24c39f37be3}


Throws exception if set is not found. 

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

\begin{DoxyParams}{Parameters}
{\em name} & set name requested. \\
\hline
\end{DoxyParams}
\hypertarget{classSetMap_a44cec36cbd6dfea01d747db3bf139c73}{
\index{SetMap@{SetMap}!str@{str}}
\index{str@{str}!SetMap@{SetMap}}
\subsubsection[{str}]{\setlength{\rightskip}{0pt plus 5cm}string SetMap::str (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const}}
\label{classSetMap_a44cec36cbd6dfea01d747db3bf139c73}
\begin{DoxyReturn}{Returns}
string representation of all sets. 
\end{DoxyReturn}
\hypertarget{classSetMap_a916c95d3d70f1f34c5f2ef557e060338}{
\index{SetMap@{SetMap}!update\_\-set@{update\_\-set}}
\index{update\_\-set@{update\_\-set}!SetMap@{SetMap}}
\subsubsection[{update\_\-set}]{\setlength{\rightskip}{0pt plus 5cm}void SetMap::update\_\-set (
\begin{DoxyParamCaption}
\item[{const string \&}]{type, }
\item[{const string \&}]{name, }
\item[{const string \&}]{elements, }
\item[{set$<$ string $>$ \&}]{modified}
\end{DoxyParamCaption}
)}}
\label{classSetMap_a916c95d3d70f1f34c5f2ef557e060338}


Replace \hyperlink{protocolthe-p}{the} elements of a set. 

Throws an expcetion if set does not exist.


\begin{DoxyParams}{Parameters}
{\em type} & type of \hyperlink{protocolthe-p}{the} set. \\
\hline
{\em name} & name of \hyperlink{protocolthe-p}{the} set. \\
\hline
{\em elements} & \hyperlink{protocolthe-p}{the} new elements comma separated. \\
\hline
{\em modified} & set filled with policies which are now modified. \\
\hline
\end{DoxyParams}


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