\hypertarget{class_ogre_1_1_static_cache}{}\section{Ogre\+:\+:Static\+Cache$<$ cache\+Size $>$ Class Template Reference}
\label{class_ogre_1_1_static_cache}\index{Ogre\+::\+Static\+Cache$<$ cache\+Size $>$@{Ogre\+::\+Static\+Cache$<$ cache\+Size $>$}}


Template version of cache based on static array.  




{\ttfamily \#include $<$Ogre\+Data\+Stream.\+h$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_ogre_1_1_static_cache_a3e71993f421220f6d20a42c6c7401302}{Static\+Cache} ()
\begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\item 
size\+\_\+t \hyperlink{class_ogre_1_1_static_cache_af58d3151d8bbfa0a07d6fefad4df0b99}{avail} () const
\begin{DoxyCompactList}\small\item\em Returns number of bytes available for reading in cache after rewinding. \end{DoxyCompactList}\item 
size\+\_\+t \hyperlink{class_ogre_1_1_static_cache_a5b61f6d3a1c376811aedbd7718890d99}{cache\+Data} (const void $\ast$buf, size\+\_\+t count)
\begin{DoxyCompactList}\small\item\em Cache data pointed by \textquotesingle{}buf\textquotesingle{}. \end{DoxyCompactList}\item 
void \hyperlink{class_ogre_1_1_static_cache_abf9d854f82e9e25fb410be84941890ee}{clear} ()
\begin{DoxyCompactList}\small\item\em Clear the cache. \end{DoxyCompactList}\item 
bool \hyperlink{class_ogre_1_1_static_cache_a0c5c50ba8dcb899f95414093f1085789}{ff} (size\+\_\+t count)
\begin{DoxyCompactList}\small\item\em Step forward in cached stream by \textquotesingle{}count\textquotesingle{} bytes. \end{DoxyCompactList}\item 
size\+\_\+t \hyperlink{class_ogre_1_1_static_cache_a98387ba5e5f61b22c0933ed2f3dfb303}{read} (void $\ast$buf, size\+\_\+t count)
\begin{DoxyCompactList}\small\item\em Read data from cache to \textquotesingle{}buf\textquotesingle{} (maximum \textquotesingle{}count\textquotesingle{} bytes). \end{DoxyCompactList}\item 
bool \hyperlink{class_ogre_1_1_static_cache_a391ccc42df8e159a6b5dd7da49ac1679}{rewind} (size\+\_\+t count)
\begin{DoxyCompactList}\small\item\em Step back in cached stream by \textquotesingle{}count\textquotesingle{} bytes. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$size\+\_\+t cache\+Size$>$\newline
class Ogre\+::\+Static\+Cache$<$ cache\+Size $>$}

Template version of cache based on static array. 

\textquotesingle{}cache\+Size\textquotesingle{} defines size of cache in bytes. 

\subsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{class_ogre_1_1_static_cache_a3e71993f421220f6d20a42c6c7401302}\label{class_ogre_1_1_static_cache_a3e71993f421220f6d20a42c6c7401302}} 
\index{Ogre\+::\+Static\+Cache@{Ogre\+::\+Static\+Cache}!Static\+Cache@{Static\+Cache}}
\index{Static\+Cache@{Static\+Cache}!Ogre\+::\+Static\+Cache@{Ogre\+::\+Static\+Cache}}
\subsubsection{\texorpdfstring{Static\+Cache()}{StaticCache()}}
{\footnotesize\ttfamily template$<$size\+\_\+t cache\+Size$>$ \\
\hyperlink{class_ogre_1_1_static_cache}{Ogre\+::\+Static\+Cache}$<$ cache\+Size $>$\+::\hyperlink{class_ogre_1_1_static_cache}{Static\+Cache} (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Constructor. 



\subsection{Member Function Documentation}
\mbox{\Hypertarget{class_ogre_1_1_static_cache_a5b61f6d3a1c376811aedbd7718890d99}\label{class_ogre_1_1_static_cache_a5b61f6d3a1c376811aedbd7718890d99}} 
\index{Ogre\+::\+Static\+Cache@{Ogre\+::\+Static\+Cache}!cache\+Data@{cache\+Data}}
\index{cache\+Data@{cache\+Data}!Ogre\+::\+Static\+Cache@{Ogre\+::\+Static\+Cache}}
\subsubsection{\texorpdfstring{cache\+Data()}{cacheData()}}
{\footnotesize\ttfamily template$<$size\+\_\+t cache\+Size$>$ \\
size\+\_\+t \hyperlink{class_ogre_1_1_static_cache}{Ogre\+::\+Static\+Cache}$<$ cache\+Size $>$\+::cache\+Data (\begin{DoxyParamCaption}\item[{const void $\ast$}]{buf,  }\item[{size\+\_\+t}]{count }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Cache data pointed by \textquotesingle{}buf\textquotesingle{}. 

If \textquotesingle{}count\textquotesingle{} is greater than cache size, we cache only last bytes. Returns number of bytes written to cache. \mbox{\Hypertarget{class_ogre_1_1_static_cache_a98387ba5e5f61b22c0933ed2f3dfb303}\label{class_ogre_1_1_static_cache_a98387ba5e5f61b22c0933ed2f3dfb303}} 
\index{Ogre\+::\+Static\+Cache@{Ogre\+::\+Static\+Cache}!read@{read}}
\index{read@{read}!Ogre\+::\+Static\+Cache@{Ogre\+::\+Static\+Cache}}
\subsubsection{\texorpdfstring{read()}{read()}}
{\footnotesize\ttfamily template$<$size\+\_\+t cache\+Size$>$ \\
size\+\_\+t \hyperlink{class_ogre_1_1_static_cache}{Ogre\+::\+Static\+Cache}$<$ cache\+Size $>$\+::read (\begin{DoxyParamCaption}\item[{void $\ast$}]{buf,  }\item[{size\+\_\+t}]{count }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Read data from cache to \textquotesingle{}buf\textquotesingle{} (maximum \textquotesingle{}count\textquotesingle{} bytes). 

Returns number of bytes read from cache. 

Referenced by Ogre\+::\+Memory\+Data\+Stream\+::get\+Current\+Ptr(), and Ogre\+::\+Data\+Stream\+::$\sim$\+Data\+Stream().

\mbox{\Hypertarget{class_ogre_1_1_static_cache_a391ccc42df8e159a6b5dd7da49ac1679}\label{class_ogre_1_1_static_cache_a391ccc42df8e159a6b5dd7da49ac1679}} 
\index{Ogre\+::\+Static\+Cache@{Ogre\+::\+Static\+Cache}!rewind@{rewind}}
\index{rewind@{rewind}!Ogre\+::\+Static\+Cache@{Ogre\+::\+Static\+Cache}}
\subsubsection{\texorpdfstring{rewind()}{rewind()}}
{\footnotesize\ttfamily template$<$size\+\_\+t cache\+Size$>$ \\
bool \hyperlink{class_ogre_1_1_static_cache}{Ogre\+::\+Static\+Cache}$<$ cache\+Size $>$\+::rewind (\begin{DoxyParamCaption}\item[{size\+\_\+t}]{count }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Step back in cached stream by \textquotesingle{}count\textquotesingle{} bytes. 

Returns \textquotesingle{}true\textquotesingle{} if cache contains resulting position. \mbox{\Hypertarget{class_ogre_1_1_static_cache_a0c5c50ba8dcb899f95414093f1085789}\label{class_ogre_1_1_static_cache_a0c5c50ba8dcb899f95414093f1085789}} 
\index{Ogre\+::\+Static\+Cache@{Ogre\+::\+Static\+Cache}!ff@{ff}}
\index{ff@{ff}!Ogre\+::\+Static\+Cache@{Ogre\+::\+Static\+Cache}}
\subsubsection{\texorpdfstring{ff()}{ff()}}
{\footnotesize\ttfamily template$<$size\+\_\+t cache\+Size$>$ \\
bool \hyperlink{class_ogre_1_1_static_cache}{Ogre\+::\+Static\+Cache}$<$ cache\+Size $>$\+::ff (\begin{DoxyParamCaption}\item[{size\+\_\+t}]{count }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Step forward in cached stream by \textquotesingle{}count\textquotesingle{} bytes. 

Returns \textquotesingle{}true\textquotesingle{} if cache contains resulting position. \mbox{\Hypertarget{class_ogre_1_1_static_cache_af58d3151d8bbfa0a07d6fefad4df0b99}\label{class_ogre_1_1_static_cache_af58d3151d8bbfa0a07d6fefad4df0b99}} 
\index{Ogre\+::\+Static\+Cache@{Ogre\+::\+Static\+Cache}!avail@{avail}}
\index{avail@{avail}!Ogre\+::\+Static\+Cache@{Ogre\+::\+Static\+Cache}}
\subsubsection{\texorpdfstring{avail()}{avail()}}
{\footnotesize\ttfamily template$<$size\+\_\+t cache\+Size$>$ \\
size\+\_\+t \hyperlink{class_ogre_1_1_static_cache}{Ogre\+::\+Static\+Cache}$<$ cache\+Size $>$\+::avail (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Returns number of bytes available for reading in cache after rewinding. 



Referenced by Ogre\+::\+Static\+Cache$<$ 16 $\ast$\+O\+G\+R\+E\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+T\+E\+M\+P\+\_\+\+S\+I\+Z\+E $>$\+::cache\+Data(), Ogre\+::\+Static\+Cache$<$ 16 $\ast$\+O\+G\+R\+E\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+T\+E\+M\+P\+\_\+\+S\+I\+Z\+E $>$\+::ff(), and Ogre\+::\+Static\+Cache$<$ 16 $\ast$\+O\+G\+R\+E\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+T\+E\+M\+P\+\_\+\+S\+I\+Z\+E $>$\+::read().

\mbox{\Hypertarget{class_ogre_1_1_static_cache_abf9d854f82e9e25fb410be84941890ee}\label{class_ogre_1_1_static_cache_abf9d854f82e9e25fb410be84941890ee}} 
\index{Ogre\+::\+Static\+Cache@{Ogre\+::\+Static\+Cache}!clear@{clear}}
\index{clear@{clear}!Ogre\+::\+Static\+Cache@{Ogre\+::\+Static\+Cache}}
\subsubsection{\texorpdfstring{clear()}{clear()}}
{\footnotesize\ttfamily template$<$size\+\_\+t cache\+Size$>$ \\
void \hyperlink{class_ogre_1_1_static_cache}{Ogre\+::\+Static\+Cache}$<$ cache\+Size $>$\+::clear (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Clear the cache. 



Referenced by Ogre\+::\+Static\+Cache$<$ 16 $\ast$\+O\+G\+R\+E\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+T\+E\+M\+P\+\_\+\+S\+I\+Z\+E $>$\+::ff(), and Ogre\+::\+Static\+Cache$<$ 16 $\ast$\+O\+G\+R\+E\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+T\+E\+M\+P\+\_\+\+S\+I\+Z\+E $>$\+::rewind().



The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
\hyperlink{_ogre_data_stream_8h}{Ogre\+Data\+Stream.\+h}\end{DoxyCompactItemize}
