\section{TPProto::Design\-Cache Class Reference}
\label{classTPProto_1_1DesignCache}\index{TPProto::DesignCache@{TPProto::DesignCache}}
A \doxyref{Cache}{p.}{classTPProto_1_1Cache} that caches Designs.  


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

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

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

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

\item 
boost::signals::connection \textbf{watch\-Design} (uint32\_\-t designid, const Design\-Callback \&cb)\label{classTPProto_1_1DesignCache_f520f56b74929ea616efc6f8a2245149}

\item 
void {\bf add\-Design} ({\bf Design} $\ast$design)
\begin{CompactList}\small\item\em Adds a \doxyref{Design}{p.}{classTPProto_1_1Design} to the server. \item\end{CompactList}\item 
void {\bf modify\-Design} ({\bf Design} $\ast$design)
\begin{CompactList}\small\item\em Modifies a \doxyref{Design}{p.}{classTPProto_1_1Design} on the server. \item\end{CompactList}\item 
void {\bf remove\-Design} (uint32\_\-t designid)
\begin{CompactList}\small\item\em Removes a design from the server. \item\end{CompactList}\item 
void {\bf invalidate\-Design} (uint32\_\-t designid)
\begin{CompactList}\small\item\em Set an \doxyref{Design}{p.}{classTPProto_1_1Design} Id as invalid and mark to be refetched. \item\end{CompactList}\item 
void \textbf{request\-Design\-Ids} (const Id\-Set\-Callback \&cb)\label{classTPProto_1_1DesignCache_ba6ff19b60eb72959a25df5dc53a5bae}

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

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

\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_1DesignCache_91c1cefb94985e9df1f34437f97fd40b}

\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 Designs. 



\subsection{Member Function Documentation}
\index{TPProto::DesignCache@{TPProto::Design\-Cache}!addDesign@{addDesign}}
\index{addDesign@{addDesign}!TPProto::DesignCache@{TPProto::Design\-Cache}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TPProto::Design\-Cache::add\-Design ({\bf Design} $\ast$ {\em design})}\label{classTPProto_1_1DesignCache_09b4dc5c0d9b104765b521a232b7a366}


Adds a \doxyref{Design}{p.}{classTPProto_1_1Design} to the server. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em design}]The \doxyref{Design}{p.}{classTPProto_1_1Design} to add. \end{description}
\end{Desc}
\index{TPProto::DesignCache@{TPProto::Design\-Cache}!modifyDesign@{modifyDesign}}
\index{modifyDesign@{modifyDesign}!TPProto::DesignCache@{TPProto::Design\-Cache}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TPProto::Design\-Cache::modify\-Design ({\bf Design} $\ast$ {\em design})}\label{classTPProto_1_1DesignCache_244f74f0fac30579c75e98d445c5cdf0}


Modifies a \doxyref{Design}{p.}{classTPProto_1_1Design} on the server. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em design}]The \doxyref{Design}{p.}{classTPProto_1_1Design} to modify. \end{description}
\end{Desc}
\index{TPProto::DesignCache@{TPProto::Design\-Cache}!removeDesign@{removeDesign}}
\index{removeDesign@{removeDesign}!TPProto::DesignCache@{TPProto::Design\-Cache}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TPProto::Design\-Cache::remove\-Design (uint32\_\-t {\em designid})}\label{classTPProto_1_1DesignCache_19753dcf0ec347475f8124a86a91b4d1}


Removes a design from the server. 

Sends the \doxyref{Remove\-Design}{p.}{classTPProto_1_1RemoveDesign} frame and receives the reply. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em designid}]The \doxyref{Design}{p.}{classTPProto_1_1Design} Id to remove. \end{description}
\end{Desc}
\index{TPProto::DesignCache@{TPProto::Design\-Cache}!invalidateDesign@{invalidateDesign}}
\index{invalidateDesign@{invalidateDesign}!TPProto::DesignCache@{TPProto::Design\-Cache}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TPProto::Design\-Cache::invalidate\-Design (uint32\_\-t {\em designid})}\label{classTPProto_1_1DesignCache_55370d03d6d875a1c04202048cc9ef23}


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

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


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::DesignCache@{TPProto::Design\-Cache}!getModTimeFromFrame@{getModTimeFromFrame}}
\index{getModTimeFromFrame@{getModTimeFromFrame}!TPProto::DesignCache@{TPProto::Design\-Cache}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}uint64\_\-t TPProto::Design\-Cache::get\-Mod\-Time\-From\-Frame ({\bf Frame} $\ast$ {\em frame})\hspace{0.3cm}{\tt  [virtual]}}\label{classTPProto_1_1DesignCache_803d6022cd3846fa0bfc70b6d747703b}


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::DesignCache@{TPProto::Design\-Cache}!newItem@{newItem}}
\index{newItem@{newItem}!TPProto::DesignCache@{TPProto::Design\-Cache}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TPProto::Design\-Cache::new\-Item (boost::shared\_\-ptr$<$ {\bf Frame} $>$ {\em item})\hspace{0.3cm}{\tt  [virtual]}}\label{classTPProto_1_1DesignCache_619fb8e1ccb8c6250e3684f5c7f09723}


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::DesignCache@{TPProto::Design\-Cache}!existingItem@{existingItem}}
\index{existingItem@{existingItem}!TPProto::DesignCache@{TPProto::Design\-Cache}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TPProto::Design\-Cache::existing\-Item (boost::shared\_\-ptr$<$ {\bf Frame} $>$ {\em item})\hspace{0.3cm}{\tt  [virtual]}}\label{classTPProto_1_1DesignCache_e9970de872b93225439ab6b0579c8715}


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 designcache.h}\item 
tpproto/designcache.cpp\end{CompactItemize}
