\section{TPProto::Cache Class Reference}
\label{classTPProto_1_1Cache}\index{TPProto::Cache@{TPProto::Cache}}
Interface to a cache. Most of the work is done by \doxyref{Cache\-Method}{p.}{classTPProto_1_1CacheMethod}, so this class is mostly just an interface, with subclasses working to cast things and get ids, etc from the frames.  


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

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

\begin{CompactList}\small\item\em Constructor that sets up defaults. Default is for \doxyref{Cache\-None\-Method}{p.}{classTPProto_1_1CacheNoneMethod} \doxyref{Cache\-Method}{p.}{classTPProto_1_1CacheMethod}. \item\end{CompactList}\item 
virtual {\bf $\sim$Cache} ()\label{classTPProto_1_1Cache_200955939550feca271da5fc2ea6693f}

\begin{CompactList}\small\item\em Destructor. \item\end{CompactList}\item 
virtual void {\bf update} ()\label{classTPProto_1_1Cache_0628b5f6a309f32c7dd84deea3228cb6}

\begin{CompactList}\small\item\em Call when you want to update the cache. Good times to do this are when we first log in, and when we notice an EOT has finished. \item\end{CompactList}\item 
void {\bf set\-Cache\-Method} ({\bf Cache\-Method} $\ast$cm)
\begin{CompactList}\small\item\em Sets the \doxyref{Cache\-Method}{p.}{classTPProto_1_1CacheMethod} this \doxyref{Cache}{p.}{classTPProto_1_1Cache} will use. \item\end{CompactList}\item 
void {\bf set\-Protocol\-Layer} ({\bf Protocol\-Layer} $\ast$pl)
\begin{CompactList}\small\item\em Sets the \doxyref{Protocol\-Layer}{p.}{classTPProto_1_1ProtocolLayer} this \doxyref{Cache}{p.}{classTPProto_1_1Cache} will use. \item\end{CompactList}\item 
virtual void {\bf new\-Item} (boost::shared\_\-ptr$<$ {\bf Frame} $>$ item)=0
\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)=0
\begin{CompactList}\small\item\em Receive an existing item from the \doxyref{Cache\-Method}{p.}{classTPProto_1_1CacheMethod}. \item\end{CompactList}\item 
virtual {\bf Get\-Id\-Sequence} $\ast$ {\bf create\-Get\-Id\-Sequence\-Frame} ()=0\label{classTPProto_1_1Cache_0ff2144fa5961ec02f79d5a6013a4e91}

\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} ()=0\label{classTPProto_1_1Cache_c7df6f07217e6b612f020c66b9a722a7}

\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)=0
\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)=0
\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}\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
{\bf Cache\-Method} $\ast$ {\bf cache}\label{classTPProto_1_1Cache_25a97b27d1b201e951b21a8558137876}

\begin{CompactList}\small\item\em The \doxyref{Cache\-Method}{p.}{classTPProto_1_1CacheMethod} this \doxyref{Cache}{p.}{classTPProto_1_1Cache} will use. \item\end{CompactList}\item 
{\bf Protocol\-Layer} $\ast$ {\bf protocol}\label{classTPProto_1_1Cache_9f8fbd116a472eb3e2fe9fe7490d7d4f}

\begin{CompactList}\small\item\em The \doxyref{Protocol\-Layer}{p.}{classTPProto_1_1ProtocolLayer} that will be used. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Interface to a cache. Most of the work is done by \doxyref{Cache\-Method}{p.}{classTPProto_1_1CacheMethod}, so this class is mostly just an interface, with subclasses working to cast things and get ids, etc from the frames. 



\subsection{Member Function Documentation}
\index{TPProto::Cache@{TPProto::Cache}!setCacheMethod@{setCacheMethod}}
\index{setCacheMethod@{setCacheMethod}!TPProto::Cache@{TPProto::Cache}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TPProto::Cache::set\-Cache\-Method ({\bf Cache\-Method} $\ast$ {\em cm})}\label{classTPProto_1_1Cache_66baf5721ef73b3bee2b33e3e42a9e96}


Sets the \doxyref{Cache\-Method}{p.}{classTPProto_1_1CacheMethod} this \doxyref{Cache}{p.}{classTPProto_1_1Cache} will use. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cm}]The \doxyref{Cache\-Method}{p.}{classTPProto_1_1CacheMethod} to use. \end{description}
\end{Desc}
\index{TPProto::Cache@{TPProto::Cache}!setProtocolLayer@{setProtocolLayer}}
\index{setProtocolLayer@{setProtocolLayer}!TPProto::Cache@{TPProto::Cache}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TPProto::Cache::set\-Protocol\-Layer ({\bf Protocol\-Layer} $\ast$ {\em pl})}\label{classTPProto_1_1Cache_612cdcf14dd983b20e7576407f9eefd5}


Sets the \doxyref{Protocol\-Layer}{p.}{classTPProto_1_1ProtocolLayer} this \doxyref{Cache}{p.}{classTPProto_1_1Cache} will use. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em pl}]The \doxyref{Protocol\-Layer}{p.}{classTPProto_1_1ProtocolLayer} to use. \end{description}
\end{Desc}
\index{TPProto::Cache@{TPProto::Cache}!newItem@{newItem}}
\index{newItem@{newItem}!TPProto::Cache@{TPProto::Cache}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void TPProto::Cache::new\-Item (boost::shared\_\-ptr$<$ {\bf Frame} $>$ {\em item})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classTPProto_1_1Cache_202281d5db63116a41517d794f98c7df}


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}


Implemented in {\bf TPProto::Board\-Cache} \doxyref{}{p.}{classTPProto_1_1BoardCache_51374f0d1f28c675cf05e3818c3c9642}, {\bf TPProto::Category\-Cache} \doxyref{}{p.}{classTPProto_1_1CategoryCache_6103c6b366b6b8bf15eeea10428b8e25}, {\bf TPProto::Command\-Desc\-Cache} \doxyref{}{p.}{classTPProto_1_1CommandDescCache_97b214e7a4d07a369e8aba6fe31366a5}, {\bf TPProto::Component\-Cache} \doxyref{}{p.}{classTPProto_1_1ComponentCache_f01fc6559e6d288fe382523d129da0d7}, {\bf TPProto::Design\-Cache} \doxyref{}{p.}{classTPProto_1_1DesignCache_619fb8e1ccb8c6250e3684f5c7f09723}, {\bf TPProto::Object\-Cache} \doxyref{}{p.}{classTPProto_1_1ObjectCache_d910ad82208224ec15a190ed6e7a47b7}, {\bf TPProto::Object\-Desc\-Cache} \doxyref{}{p.}{classTPProto_1_1ObjectDescCache_3055f53ba9dcd3af36a537c913443e73}, {\bf TPProto::Order\-Desc\-Cache} \doxyref{}{p.}{classTPProto_1_1OrderDescCache_0fdc3a243233e73ba172327eca5b12db}, {\bf TPProto::Player\-Cache} \doxyref{}{p.}{classTPProto_1_1PlayerCache_d1e61bf08699e1c4a47dbd1ae5a613a7}, {\bf TPProto::Property\-Cache} \doxyref{}{p.}{classTPProto_1_1PropertyCache_504cb8080dd72500bcab686d453e6ac6}, and {\bf TPProto::Resource\-Cache} \doxyref{}{p.}{classTPProto_1_1ResourceCache_60b7cb30eba7ae322e86815a4b81c12f}.\index{TPProto::Cache@{TPProto::Cache}!existingItem@{existingItem}}
\index{existingItem@{existingItem}!TPProto::Cache@{TPProto::Cache}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void TPProto::Cache::existing\-Item (boost::shared\_\-ptr$<$ {\bf Frame} $>$ {\em item})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classTPProto_1_1Cache_4047c19364373975e47acaaea50665da}


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}


Implemented in {\bf TPProto::Board\-Cache} \doxyref{}{p.}{classTPProto_1_1BoardCache_50e70cb0c6766907b5cda3370dec680c}, {\bf TPProto::Category\-Cache} \doxyref{}{p.}{classTPProto_1_1CategoryCache_88475ed6e1b3cd18ebb91d6ab0bee0f4}, {\bf TPProto::Command\-Desc\-Cache} \doxyref{}{p.}{classTPProto_1_1CommandDescCache_b2120a73db66abda139a9cdcf89c203d}, {\bf TPProto::Component\-Cache} \doxyref{}{p.}{classTPProto_1_1ComponentCache_ec3444ec77cc228d62916777f6e70247}, {\bf TPProto::Design\-Cache} \doxyref{}{p.}{classTPProto_1_1DesignCache_e9970de872b93225439ab6b0579c8715}, {\bf TPProto::Object\-Cache} \doxyref{}{p.}{classTPProto_1_1ObjectCache_1aa75e653a810d33c3d948127618bd8e}, {\bf TPProto::Object\-Desc\-Cache} \doxyref{}{p.}{classTPProto_1_1ObjectDescCache_a5fd564a69c80be6e8cf20eef3876ced}, {\bf TPProto::Order\-Desc\-Cache} \doxyref{}{p.}{classTPProto_1_1OrderDescCache_72c625c24ff2cbe804b9f20321083dcd}, {\bf TPProto::Player\-Cache} \doxyref{}{p.}{classTPProto_1_1PlayerCache_fcde493fe38af65aeb1ccb4e370c1758}, {\bf TPProto::Property\-Cache} \doxyref{}{p.}{classTPProto_1_1PropertyCache_b418d851789696ed770e570446cedea6}, and {\bf TPProto::Resource\-Cache} \doxyref{}{p.}{classTPProto_1_1ResourceCache_f9548ba8ec546ac6ba94acf3cdd91552}.\index{TPProto::Cache@{TPProto::Cache}!getIdFromFrame@{getIdFromFrame}}
\index{getIdFromFrame@{getIdFromFrame}!TPProto::Cache@{TPProto::Cache}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual uint32\_\-t TPProto::Cache::get\-Id\-From\-Frame ({\bf Frame} $\ast$ {\em frame})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classTPProto_1_1Cache_75a6f039db7cb69b6019c928776c574f}


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}


Implemented in {\bf TPProto::Board\-Cache} \doxyref{}{p.}{classTPProto_1_1BoardCache_eb0631a79bf41a7c9854e2235d30a15a}, {\bf TPProto::Category\-Cache} \doxyref{}{p.}{classTPProto_1_1CategoryCache_a14af12e5ec3e794f951970a770a1fa8}, {\bf TPProto::Command\-Desc\-Cache} \doxyref{}{p.}{classTPProto_1_1CommandDescCache_22d6c5ce70e25f19c5d716679189c41d}, {\bf TPProto::Component\-Cache} \doxyref{}{p.}{classTPProto_1_1ComponentCache_8d54929a06ec8e4bcceaa666237bb365}, {\bf TPProto::Design\-Cache} \doxyref{}{p.}{classTPProto_1_1DesignCache_e7eb8e384899f862770f76e02757a187}, {\bf TPProto::Object\-Cache} \doxyref{}{p.}{classTPProto_1_1ObjectCache_44118504f940896433ba31a3875ebf83}, {\bf TPProto::Object\-Desc\-Cache} \doxyref{}{p.}{classTPProto_1_1ObjectDescCache_8c314e8ab3c7ea7b3d09019a02004996}, {\bf TPProto::Order\-Desc\-Cache} \doxyref{}{p.}{classTPProto_1_1OrderDescCache_0476370c528ffb52fa94b8518a07d9a1}, {\bf TPProto::Player\-Cache} \doxyref{}{p.}{classTPProto_1_1PlayerCache_c03a67a8d5706e53315c32027cda47d1}, {\bf TPProto::Property\-Cache} \doxyref{}{p.}{classTPProto_1_1PropertyCache_de185f9b563bc94a45d640976c84483f}, and {\bf TPProto::Resource\-Cache} \doxyref{}{p.}{classTPProto_1_1ResourceCache_a2df36b5256b2287ffd85ab2bf3ad895}.\index{TPProto::Cache@{TPProto::Cache}!getModTimeFromFrame@{getModTimeFromFrame}}
\index{getModTimeFromFrame@{getModTimeFromFrame}!TPProto::Cache@{TPProto::Cache}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual uint64\_\-t TPProto::Cache::get\-Mod\-Time\-From\-Frame ({\bf Frame} $\ast$ {\em frame})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classTPProto_1_1Cache_019bddc598295778f9b0f8f05ad23c2f}


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}


Implemented in {\bf TPProto::Board\-Cache} \doxyref{}{p.}{classTPProto_1_1BoardCache_6b2c55f73063a888e92a01123abcb778}, {\bf TPProto::Category\-Cache} \doxyref{}{p.}{classTPProto_1_1CategoryCache_2e6b06b65a1e3c6c12d28c9b7fa90119}, {\bf TPProto::Command\-Desc\-Cache} \doxyref{}{p.}{classTPProto_1_1CommandDescCache_86d61d6b0d15307e6b71d632ea5b7162}, {\bf TPProto::Component\-Cache} \doxyref{}{p.}{classTPProto_1_1ComponentCache_7760928b2db9711e772ac34528626a97}, {\bf TPProto::Design\-Cache} \doxyref{}{p.}{classTPProto_1_1DesignCache_803d6022cd3846fa0bfc70b6d747703b}, {\bf TPProto::Object\-Cache} \doxyref{}{p.}{classTPProto_1_1ObjectCache_2637a7e7d667ab013e0113bef68d1393}, {\bf TPProto::Object\-Desc\-Cache} \doxyref{}{p.}{classTPProto_1_1ObjectDescCache_2c85263698b84f3b8c5dfcd462c2ec9b}, {\bf TPProto::Order\-Desc\-Cache} \doxyref{}{p.}{classTPProto_1_1OrderDescCache_0cfd5fb74291af145f7eea6a605b8608}, {\bf TPProto::Player\-Cache} \doxyref{}{p.}{classTPProto_1_1PlayerCache_07ccd867505ad869685e1ba6945acb00}, {\bf TPProto::Property\-Cache} \doxyref{}{p.}{classTPProto_1_1PropertyCache_20372554926a226cb325f206b8ea716d}, and {\bf TPProto::Resource\-Cache} \doxyref{}{p.}{classTPProto_1_1ResourceCache_66e2fbeabf00775ddbf5da21aae59c96}.

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