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


Template version of cache based on static array.  




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

\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{class_ogre_1_1_static_cache_a3e71993f421220f6d20a42c6c7401302}{Static\+Cache}} ()
\begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\item 
size\+\_\+t \mbox{\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 \mbox{\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 \mbox{\hyperlink{class_ogre_1_1_static_cache_abf9d854f82e9e25fb410be84941890ee}{clear}} ()
\begin{DoxyCompactList}\small\item\em Clear the cache. \end{DoxyCompactList}\item 
bool \mbox{\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 \mbox{\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 \mbox{\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}


\doxysubsection{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. 

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



Constructor. 



\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{class_ogre_1_1_static_cache_a5b61f6d3a1c376811aedbd7718890d99}\label{class_ogre_1_1_static_cache_a5b61f6d3a1c376811aedbd7718890d99}} 
\index{Ogre::StaticCache$<$ cacheSize $>$@{Ogre::StaticCache$<$ cacheSize $>$}!cacheData@{cacheData}}
\index{cacheData@{cacheData}!Ogre::StaticCache$<$ cacheSize $>$@{Ogre::StaticCache$<$ cacheSize $>$}}
\doxysubsubsection{\texorpdfstring{cacheData()}{cacheData()}}
{\footnotesize\ttfamily template$<$size\+\_\+t cache\+Size$>$ \\
size\+\_\+t \mbox{\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::StaticCache$<$ cacheSize $>$@{Ogre::StaticCache$<$ cacheSize $>$}!read@{read}}
\index{read@{read}!Ogre::StaticCache$<$ cacheSize $>$@{Ogre::StaticCache$<$ cacheSize $>$}}
\doxysubsubsection{\texorpdfstring{read()}{read()}}
{\footnotesize\ttfamily template$<$size\+\_\+t cache\+Size$>$ \\
size\+\_\+t \mbox{\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. \mbox{\Hypertarget{class_ogre_1_1_static_cache_a391ccc42df8e159a6b5dd7da49ac1679}\label{class_ogre_1_1_static_cache_a391ccc42df8e159a6b5dd7da49ac1679}} 
\index{Ogre::StaticCache$<$ cacheSize $>$@{Ogre::StaticCache$<$ cacheSize $>$}!rewind@{rewind}}
\index{rewind@{rewind}!Ogre::StaticCache$<$ cacheSize $>$@{Ogre::StaticCache$<$ cacheSize $>$}}
\doxysubsubsection{\texorpdfstring{rewind()}{rewind()}}
{\footnotesize\ttfamily template$<$size\+\_\+t cache\+Size$>$ \\
bool \mbox{\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::StaticCache$<$ cacheSize $>$@{Ogre::StaticCache$<$ cacheSize $>$}!ff@{ff}}
\index{ff@{ff}!Ogre::StaticCache$<$ cacheSize $>$@{Ogre::StaticCache$<$ cacheSize $>$}}
\doxysubsubsection{\texorpdfstring{ff()}{ff()}}
{\footnotesize\ttfamily template$<$size\+\_\+t cache\+Size$>$ \\
bool \mbox{\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::StaticCache$<$ cacheSize $>$@{Ogre::StaticCache$<$ cacheSize $>$}!avail@{avail}}
\index{avail@{avail}!Ogre::StaticCache$<$ cacheSize $>$@{Ogre::StaticCache$<$ cacheSize $>$}}
\doxysubsubsection{\texorpdfstring{avail()}{avail()}}
{\footnotesize\ttfamily template$<$size\+\_\+t cache\+Size$>$ \\
size\+\_\+t \mbox{\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::StaticCache$<$ cacheSize $>$@{Ogre::StaticCache$<$ cacheSize $>$}!clear@{clear}}
\index{clear@{clear}!Ogre::StaticCache$<$ cacheSize $>$@{Ogre::StaticCache$<$ cacheSize $>$}}
\doxysubsubsection{\texorpdfstring{clear()}{clear()}}
{\footnotesize\ttfamily template$<$size\+\_\+t cache\+Size$>$ \\
void \mbox{\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 
\mbox{\hyperlink{_ogre_data_stream_8h}{Ogre\+Data\+Stream.\+h}}\end{DoxyCompactItemize}
