\section{TPProto::Category\-Cache Class Reference}
\label{classTPProto_1_1CategoryCache}\index{TPProto::CategoryCache@{TPProto::CategoryCache}}
A \doxyref{Cache}{p.}{classTPProto_1_1Cache} that caches Categories.  


{\tt \#include $<$categorycache.h$>$}

Inheritance diagram for TPProto::Category\-Cache::\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2cm]{classTPProto_1_1CategoryCache}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf Category\-Cache} ()\label{classTPProto_1_1CategoryCache_b77c677f9d69e3d8d32a471f6ad92837}

\begin{CompactList}\small\item\em Default Constructor. \item\end{CompactList}\item 
virtual {\bf $\sim$Category\-Cache} ()\label{classTPProto_1_1CategoryCache_361f74a8c7d625115f4f4905223293c2}

\begin{CompactList}\small\item\em Destructor. \item\end{CompactList}\item 
void \textbf{request\-Category} (uint32\_\-t catid, const Category\-Callback \&cb)\label{classTPProto_1_1CategoryCache_22c897569056ab9dbe0fe4148d652e42}

\item 
boost::signals::connection \textbf{watch\-Category} (uint32\_\-t catid, const Category\-Callback \&cb)\label{classTPProto_1_1CategoryCache_af1c8610ef841650a60fb3bb4b4338c0}

\item 
void {\bf add\-Category} ({\bf Category} $\ast$cat)
\begin{CompactList}\small\item\em Adds a \doxyref{Category}{p.}{classTPProto_1_1Category} to the server. \item\end{CompactList}\item 
void {\bf remove\-Category} (uint32\_\-t catid)
\begin{CompactList}\small\item\em Removes a category from the server. \item\end{CompactList}\item 
void {\bf invalidate\-Category} (uint32\_\-t catid)
\begin{CompactList}\small\item\em Set an \doxyref{Category}{p.}{classTPProto_1_1Category} Id as invalid and mark to be refetched. \item\end{CompactList}\item 
void \textbf{request\-Category\-Ids} (const Id\-Set\-Callback \&cb)\label{classTPProto_1_1CategoryCache_e02239424ef123626c2062e09fd72677}

\item 
boost::signals::connection \textbf{watch\-Category\-Ids} (const Id\-Set\-Callback \&cb)\label{classTPProto_1_1CategoryCache_5c46c2153f49aa18cb2765586e10f3b3}

\item 
virtual {\bf Get\-Id\-Sequence} $\ast$ {\bf create\-Get\-Id\-Sequence\-Frame} ()\label{classTPProto_1_1CategoryCache_8287acd0e4d3a8e602b42db650882ae0}

\begin{CompactList}\small\item\em Create a Get\-Ids\-Sequence subclass frame for the \doxyref{Cache\-Method}{p.}{classTPProto_1_1CacheMethod} to use. Must return the correct type of frame for this \doxyref{Cache}{p.}{classTPProto_1_1Cache}. \item\end{CompactList}\item 
virtual {\bf Get\-By\-Id} $\ast$ {\bf create\-Get\-By\-Id\-Frame} ()\label{classTPProto_1_1CategoryCache_3e8ac50595ba2733683d1b1ae5ce77f6}

\begin{CompactList}\small\item\em Create a \doxyref{Get\-By\-Id}{p.}{classTPProto_1_1GetById} subclass frame for the \doxyref{Cache\-Method}{p.}{classTPProto_1_1CacheMethod} to use. Must return the correct type of frame for this \doxyref{Cache}{p.}{classTPProto_1_1Cache}. \item\end{CompactList}\item 
virtual uint32\_\-t {\bf get\-Id\-From\-Frame} ({\bf Frame} $\ast$frame)
\begin{CompactList}\small\item\em Get the Id from the \doxyref{Frame}{p.}{classTPProto_1_1Frame} provided. The \doxyref{Frame}{p.}{classTPProto_1_1Frame} is of the correct type. For example, for the \doxyref{Object}{p.}{classTPProto_1_1Object} cache, the \doxyref{Frame}{p.}{classTPProto_1_1Frame} will be an \doxyref{Object}{p.}{classTPProto_1_1Object}. \item\end{CompactList}\item 
virtual uint64\_\-t {\bf get\-Mod\-Time\-From\-Frame} ({\bf Frame} $\ast$frame)
\begin{CompactList}\small\item\em Get the Modification time from the \doxyref{Frame}{p.}{classTPProto_1_1Frame} provided. The \doxyref{Frame}{p.}{classTPProto_1_1Frame} is of the correct type. For example, for the \doxyref{Object}{p.}{classTPProto_1_1Object} cache, the \doxyref{Frame}{p.}{classTPProto_1_1Frame} will be an \doxyref{Object}{p.}{classTPProto_1_1Object}. \item\end{CompactList}\item 
virtual void {\bf new\-Item} (boost::shared\_\-ptr$<$ {\bf Frame} $>$ item)
\begin{CompactList}\small\item\em Receive a new or updated version of an item from the \doxyref{Cache\-Method}{p.}{classTPProto_1_1CacheMethod}. \item\end{CompactList}\item 
virtual void {\bf existing\-Item} (boost::shared\_\-ptr$<$ {\bf Frame} $>$ item)
\begin{CompactList}\small\item\em Receive an existing item from the \doxyref{Cache\-Method}{p.}{classTPProto_1_1CacheMethod}. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
A \doxyref{Cache}{p.}{classTPProto_1_1Cache} that caches Categories. 



\subsection{Member Function Documentation}
\index{TPProto::CategoryCache@{TPProto::Category\-Cache}!addCategory@{addCategory}}
\index{addCategory@{addCategory}!TPProto::CategoryCache@{TPProto::Category\-Cache}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TPProto::Category\-Cache::add\-Category ({\bf Category} $\ast$ {\em cat})}\label{classTPProto_1_1CategoryCache_59fcd2a8005a6c56c96cd1f4a0cb3af9}


Adds a \doxyref{Category}{p.}{classTPProto_1_1Category} to the server. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cat}]The \doxyref{Category}{p.}{classTPProto_1_1Category} to add. \end{description}
\end{Desc}
\index{TPProto::CategoryCache@{TPProto::Category\-Cache}!removeCategory@{removeCategory}}
\index{removeCategory@{removeCategory}!TPProto::CategoryCache@{TPProto::Category\-Cache}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TPProto::Category\-Cache::remove\-Category (uint32\_\-t {\em catid})}\label{classTPProto_1_1CategoryCache_a3aac29040b63db6f007b4fd9ef36675}


Removes a category from the server. 

Sends the \doxyref{Remove\-Category}{p.}{classTPProto_1_1RemoveCategory} frame and receives the reply. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em catid}]The \doxyref{Category}{p.}{classTPProto_1_1Category} Id to remove. \end{description}
\end{Desc}
\index{TPProto::CategoryCache@{TPProto::Category\-Cache}!invalidateCategory@{invalidateCategory}}
\index{invalidateCategory@{invalidateCategory}!TPProto::CategoryCache@{TPProto::Category\-Cache}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TPProto::Category\-Cache::invalidate\-Category (uint32\_\-t {\em catid})}\label{classTPProto_1_1CategoryCache_51a171cfcd56c5f772956346241839f5}


Set an \doxyref{Category}{p.}{classTPProto_1_1Category} Id as invalid and mark to be refetched. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em catid}]The id of the \doxyref{Category}{p.}{classTPProto_1_1Category} to invalidate. \end{description}
\end{Desc}
\index{TPProto::CategoryCache@{TPProto::Category\-Cache}!getIdFromFrame@{getIdFromFrame}}
\index{getIdFromFrame@{getIdFromFrame}!TPProto::CategoryCache@{TPProto::Category\-Cache}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}uint32\_\-t TPProto::Category\-Cache::get\-Id\-From\-Frame ({\bf Frame} $\ast$ {\em frame})\hspace{0.3cm}{\tt  [virtual]}}\label{classTPProto_1_1CategoryCache_a14af12e5ec3e794f951970a770a1fa8}


Get the Id from the \doxyref{Frame}{p.}{classTPProto_1_1Frame} provided. The \doxyref{Frame}{p.}{classTPProto_1_1Frame} is of the correct type. For example, for the \doxyref{Object}{p.}{classTPProto_1_1Object} cache, the \doxyref{Frame}{p.}{classTPProto_1_1Frame} will be an \doxyref{Object}{p.}{classTPProto_1_1Object}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em frame}]The \doxyref{Frame}{p.}{classTPProto_1_1Frame} to get the Id from. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The id of the frame. \end{Desc}


Implements {\bf TPProto::Cache} \doxyref{}{p.}{classTPProto_1_1Cache_75a6f039db7cb69b6019c928776c574f}.\index{TPProto::CategoryCache@{TPProto::Category\-Cache}!getModTimeFromFrame@{getModTimeFromFrame}}
\index{getModTimeFromFrame@{getModTimeFromFrame}!TPProto::CategoryCache@{TPProto::Category\-Cache}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}uint64\_\-t TPProto::Category\-Cache::get\-Mod\-Time\-From\-Frame ({\bf Frame} $\ast$ {\em frame})\hspace{0.3cm}{\tt  [virtual]}}\label{classTPProto_1_1CategoryCache_2e6b06b65a1e3c6c12d28c9b7fa90119}


Get the Modification time from the \doxyref{Frame}{p.}{classTPProto_1_1Frame} provided. The \doxyref{Frame}{p.}{classTPProto_1_1Frame} is of the correct type. For example, for the \doxyref{Object}{p.}{classTPProto_1_1Object} cache, the \doxyref{Frame}{p.}{classTPProto_1_1Frame} will be an \doxyref{Object}{p.}{classTPProto_1_1Object}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em frame}]The \doxyref{Frame}{p.}{classTPProto_1_1Frame} to get the Modtime from. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The modtime of the frame. \end{Desc}


Implements {\bf TPProto::Cache} \doxyref{}{p.}{classTPProto_1_1Cache_019bddc598295778f9b0f8f05ad23c2f}.\index{TPProto::CategoryCache@{TPProto::Category\-Cache}!newItem@{newItem}}
\index{newItem@{newItem}!TPProto::CategoryCache@{TPProto::Category\-Cache}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TPProto::Category\-Cache::new\-Item (boost::shared\_\-ptr$<$ {\bf Frame} $>$ {\em item})\hspace{0.3cm}{\tt  [virtual]}}\label{classTPProto_1_1CategoryCache_6103c6b366b6b8bf15eeea10428b8e25}


Receive a new or updated version of an item from the \doxyref{Cache\-Method}{p.}{classTPProto_1_1CacheMethod}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em item}]The existing item in a \doxyref{Frame}{p.}{classTPProto_1_1Frame} \end{description}
\end{Desc}


Implements {\bf TPProto::Cache} \doxyref{}{p.}{classTPProto_1_1Cache_202281d5db63116a41517d794f98c7df}.\index{TPProto::CategoryCache@{TPProto::Category\-Cache}!existingItem@{existingItem}}
\index{existingItem@{existingItem}!TPProto::CategoryCache@{TPProto::Category\-Cache}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TPProto::Category\-Cache::existing\-Item (boost::shared\_\-ptr$<$ {\bf Frame} $>$ {\em item})\hspace{0.3cm}{\tt  [virtual]}}\label{classTPProto_1_1CategoryCache_88475ed6e1b3cd18ebb91d6ab0bee0f4}


Receive an existing item from the \doxyref{Cache\-Method}{p.}{classTPProto_1_1CacheMethod}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em item}]The existing item in a \doxyref{Frame}{p.}{classTPProto_1_1Frame} \end{description}
\end{Desc}


Implements {\bf TPProto::Cache} \doxyref{}{p.}{classTPProto_1_1Cache_4047c19364373975e47acaaea50665da}.

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
tpproto/{\bf categorycache.h}\item 
tpproto/categorycache.cpp\end{CompactItemize}
