\hypertarget{classPolicyTags}{
\section{PolicyTags Class Reference}
\label{classPolicyTags}\index{PolicyTags@{PolicyTags}}
}


A set of policy tags.  




{\ttfamily \#include $<$policytags.hh$>$}

\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \hyperlink{classPolicyTags_1_1PolicyTagsError}{PolicyTagsError}
\begin{DoxyCompactList}\small\item\em Exception thrown on failed initialization of tags. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classPolicyTags_ae8e5828e01497e962121d321b7077ebc}{PolicyTags} ()
\begin{DoxyCompactList}\small\item\em Empty policytags may be safely created. \item\end{DoxyCompactList}\item 
\hyperlink{classPolicyTags_a327f62ba0e270cb94071b3b5083bd560}{PolicyTags} (const \hyperlink{classXrlAtomList}{XrlAtomList} \&xrlatoms)
\begin{DoxyCompactList}\small\item\em Attempt to create policy tags from an \hyperlink{classXrlAtomList}{XrlAtomList}. \item\end{DoxyCompactList}\item 
string \hyperlink{classPolicyTags_afe7e4b139945e62fe5d972b31b6e1a65}{str} () const 
\item 
bool \hyperlink{classPolicyTags_ae4d89adeebdd7f49436a077fe48cd982}{operator==} (const \hyperlink{classPolicyTags}{PolicyTags} \&rhs) const 
\item 
\hyperlink{classElement}{Element} $\ast$ \hyperlink{classPolicyTags_a7e52d817e9c82107166da8a5e1549cf2}{element} () const 
\begin{DoxyCompactList}\small\item\em Convert to an \hyperlink{classElemSet}{ElemSet}. \item\end{DoxyCompactList}\item 
\hypertarget{classPolicyTags_ae3baff55d78c5b687d9c1423c18e1abb}{
\hyperlink{classElement}{Element} $\ast$ {\bfseries element\_\-tag} () const }
\label{classPolicyTags_ae3baff55d78c5b687d9c1423c18e1abb}

\item 
\hypertarget{classPolicyTags_ad900b7a83f1d0d3b944b6b27000b353a}{
void {\bfseries set\_\-tag} (const \hyperlink{classElement}{Element} \&e)}
\label{classPolicyTags_ad900b7a83f1d0d3b944b6b27000b353a}

\item 
\hypertarget{classPolicyTags_afe6ebe67fd2f1b4e1786510084a0d7b2}{
void {\bfseries set\_\-ptags} (const \hyperlink{classElement}{Element} \&e)}
\label{classPolicyTags_afe6ebe67fd2f1b4e1786510084a0d7b2}

\item 
\hyperlink{classXrlAtomList}{XrlAtomList} \hyperlink{classPolicyTags_aba43ea7b35d367052148a9a69b3d9016}{xrl\_\-atomlist} () const 
\begin{DoxyCompactList}\small\item\em Convert to \hyperlink{classXrlAtomList}{XrlAtomList} of xrlatom\_\-uint32's. \item\end{DoxyCompactList}\item 
void \hyperlink{classPolicyTags_af404a961ee1b606aeac6049d2fb3fe11}{insert} (const \hyperlink{classPolicyTags}{PolicyTags} \&pt)
\begin{DoxyCompactList}\small\item\em Insert policy tags from another \hyperlink{classPolicyTags}{PolicyTags}. \item\end{DoxyCompactList}\item 
\hypertarget{classPolicyTags_a552542fd8391f1f7b9737d0585a6e011}{
void {\bfseries insert} (uint32\_\-t tag)}
\label{classPolicyTags_a552542fd8391f1f7b9737d0585a6e011}

\item 
bool \hyperlink{classPolicyTags_a5bb5012c948d4539b8586f05ea657150}{contains\_\-atleast\_\-one} (const \hyperlink{classPolicyTags}{PolicyTags} \&tags) const 
\begin{DoxyCompactList}\small\item\em Check if intersection is not empty. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Types}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classPolicyTags_adcd872be9d0071c48bafee7d4b82c5df}{
typedef set$<$ uint32\_\-t $>$ {\bfseries Set}}
\label{classPolicyTags_adcd872be9d0071c48bafee7d4b82c5df}

\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classPolicyTags_a7456cbdd6bfcc0dfb887904221b4e773}{
Set {\bfseries \_\-tags}}
\label{classPolicyTags_a7456cbdd6bfcc0dfb887904221b4e773}

\item 
\hypertarget{classPolicyTags_a0057eb52c004d29a4f56a298c9d8967e}{
uint32\_\-t {\bfseries \_\-tag}}
\label{classPolicyTags_a0057eb52c004d29a4f56a298c9d8967e}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
A set of policy tags. A policytag is a marker for a route.

A policytag marks a route. This is needed to match \hyperlink{protocolthe-p}{the} source part of an export policy. Export filters are in \hyperlink{protocolthe-p}{the} destination protocol, so no information about \hyperlink{protocolthe-p}{the} origin of \hyperlink{protocolthe-p}{the} route is available then. Thus, routes need to be tagged in \hyperlink{protocolthe-p}{the} source protocol, so \hyperlink{protocolthe-p}{the} export filter may match against tags. 

\subsection{Constructor \& Destructor Documentation}
\hypertarget{classPolicyTags_ae8e5828e01497e962121d321b7077ebc}{
\index{PolicyTags@{PolicyTags}!PolicyTags@{PolicyTags}}
\index{PolicyTags@{PolicyTags}!PolicyTags@{PolicyTags}}
\subsubsection[{PolicyTags}]{\setlength{\rightskip}{0pt plus 5cm}PolicyTags::PolicyTags (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{classPolicyTags_ae8e5828e01497e962121d321b7077ebc}


Empty policytags may be safely created. 

No exception thrown \hypertarget{classPolicyTags_a327f62ba0e270cb94071b3b5083bd560}{
\index{PolicyTags@{PolicyTags}!PolicyTags@{PolicyTags}}
\index{PolicyTags@{PolicyTags}!PolicyTags@{PolicyTags}}
\subsubsection[{PolicyTags}]{\setlength{\rightskip}{0pt plus 5cm}PolicyTags::PolicyTags (
\begin{DoxyParamCaption}
\item[{const {\bf XrlAtomList} \&}]{xrlatoms}
\end{DoxyParamCaption}
)}}
\label{classPolicyTags_a327f62ba0e270cb94071b3b5083bd560}


Attempt to create policy tags from an \hyperlink{classXrlAtomList}{XrlAtomList}. 

It must contain unsigned 32bit integer atoms.


\begin{DoxyParams}{Parameters}
{\em xrlatoms} & list of xrlatom\_\-uint32 atoms to initialize from. \\
\hline
\end{DoxyParams}


\subsection{Member Function Documentation}
\hypertarget{classPolicyTags_a5bb5012c948d4539b8586f05ea657150}{
\index{PolicyTags@{PolicyTags}!contains\_\-atleast\_\-one@{contains\_\-atleast\_\-one}}
\index{contains\_\-atleast\_\-one@{contains\_\-atleast\_\-one}!PolicyTags@{PolicyTags}}
\subsubsection[{contains\_\-atleast\_\-one}]{\setlength{\rightskip}{0pt plus 5cm}bool PolicyTags::contains\_\-atleast\_\-one (
\begin{DoxyParamCaption}
\item[{const {\bf PolicyTags} \&}]{tags}
\end{DoxyParamCaption}
) const}}
\label{classPolicyTags_a5bb5012c948d4539b8586f05ea657150}


Check if intersection is not empty. 

\begin{DoxyReturn}{Returns}
true if atleast one tag is contained in \hyperlink{protocolthe-p}{the} other tags. 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em tags} & tags to check with. \\
\hline
\end{DoxyParams}
\hypertarget{classPolicyTags_a7e52d817e9c82107166da8a5e1549cf2}{
\index{PolicyTags@{PolicyTags}!element@{element}}
\index{element@{element}!PolicyTags@{PolicyTags}}
\subsubsection[{element}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Element} $\ast$ PolicyTags::element (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const}}
\label{classPolicyTags_a7e52d817e9c82107166da8a5e1549cf2}


Convert to an \hyperlink{classElemSet}{ElemSet}. 

\begin{DoxyReturn}{Returns}
\hyperlink{classElemSet}{ElemSet} representation. Caller is responsible for delete. 
\end{DoxyReturn}
\hypertarget{classPolicyTags_af404a961ee1b606aeac6049d2fb3fe11}{
\index{PolicyTags@{PolicyTags}!insert@{insert}}
\index{insert@{insert}!PolicyTags@{PolicyTags}}
\subsubsection[{insert}]{\setlength{\rightskip}{0pt plus 5cm}void PolicyTags::insert (
\begin{DoxyParamCaption}
\item[{const {\bf PolicyTags} \&}]{pt}
\end{DoxyParamCaption}
)}}
\label{classPolicyTags_af404a961ee1b606aeac6049d2fb3fe11}


Insert policy tags from another \hyperlink{classPolicyTags}{PolicyTags}. 


\begin{DoxyParams}{Parameters}
{\em pt} & \hyperlink{classPolicyTags}{PolicyTags} to insert. \\
\hline
\end{DoxyParams}
\hypertarget{classPolicyTags_ae4d89adeebdd7f49436a077fe48cd982}{
\index{PolicyTags@{PolicyTags}!operator==@{operator==}}
\index{operator==@{operator==}!PolicyTags@{PolicyTags}}
\subsubsection[{operator==}]{\setlength{\rightskip}{0pt plus 5cm}bool PolicyTags::operator== (
\begin{DoxyParamCaption}
\item[{const {\bf PolicyTags} \&}]{rhs}
\end{DoxyParamCaption}
) const}}
\label{classPolicyTags_ae4d89adeebdd7f49436a077fe48cd982}
\begin{DoxyReturn}{Returns}
true if set is equal. 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em rhs} & \hyperlink{classPolicyTags}{PolicyTags} to compare with. \\
\hline
\end{DoxyParams}
\hypertarget{classPolicyTags_afe7e4b139945e62fe5d972b31b6e1a65}{
\index{PolicyTags@{PolicyTags}!str@{str}}
\index{str@{str}!PolicyTags@{PolicyTags}}
\subsubsection[{str}]{\setlength{\rightskip}{0pt plus 5cm}string PolicyTags::str (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const}}
\label{classPolicyTags_afe7e4b139945e62fe5d972b31b6e1a65}
\begin{DoxyReturn}{Returns}
string representation of policytags. 
\end{DoxyReturn}
\hypertarget{classPolicyTags_aba43ea7b35d367052148a9a69b3d9016}{
\index{PolicyTags@{PolicyTags}!xrl\_\-atomlist@{xrl\_\-atomlist}}
\index{xrl\_\-atomlist@{xrl\_\-atomlist}!PolicyTags@{PolicyTags}}
\subsubsection[{xrl\_\-atomlist}]{\setlength{\rightskip}{0pt plus 5cm}{\bf XrlAtomList} PolicyTags::xrl\_\-atomlist (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const}}
\label{classPolicyTags_aba43ea7b35d367052148a9a69b3d9016}


Convert to \hyperlink{classXrlAtomList}{XrlAtomList} of xrlatom\_\-uint32's. 

\begin{DoxyReturn}{Returns}
\hyperlink{classXrlAtomList}{XrlAtomList} representation. 
\end{DoxyReturn}


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