|  | OGRE
    1.11.6
    Object-Oriented Graphics Rendering Engine | 
Template version of cache based on static array. More...
#include <OgreDataStream.h>
| Public Member Functions | |
| StaticCache () | |
| Constructor.  More... | |
| size_t | avail () const | 
| Returns number of bytes available for reading in cache after rewinding.  More... | |
| size_t | cacheData (const void *buf, size_t count) | 
| Cache data pointed by 'buf'.  More... | |
| void | clear () | 
| Clear the cache.  More... | |
| bool | ff (size_t count) | 
| Step forward in cached stream by 'count' bytes.  More... | |
| size_t | read (void *buf, size_t count) | 
| Read data from cache to 'buf' (maximum 'count' bytes).  More... | |
| bool | rewind (size_t count) | 
| Step back in cached stream by 'count' bytes.  More... | |
Template version of cache based on static array.
'cacheSize' defines size of cache in bytes.
| 
 | inline | 
Constructor.
| 
 | inline | 
Cache data pointed by 'buf'.
If 'count' is greater than cache size, we cache only last bytes. Returns number of bytes written to cache.
| 
 | inline | 
Read data from cache to 'buf' (maximum 'count' bytes).
Returns number of bytes read from cache.
Referenced by Ogre::MemoryDataStream::getCurrentPtr(), and Ogre::DataStream::~DataStream().
| 
 | inline | 
Step back in cached stream by 'count' bytes.
Returns 'true' if cache contains resulting position.
| 
 | inline | 
Step forward in cached stream by 'count' bytes.
Returns 'true' if cache contains resulting position.
| 
 | inline | 
Returns number of bytes available for reading in cache after rewinding.
Referenced by Ogre::StaticCache< 16 *OGRE_STREAM_TEMP_SIZE >::cacheData(), Ogre::StaticCache< 16 *OGRE_STREAM_TEMP_SIZE >::ff(), and Ogre::StaticCache< 16 *OGRE_STREAM_TEMP_SIZE >::read().
| 
 | inline | 
Clear the cache.
Referenced by Ogre::StaticCache< 16 *OGRE_STREAM_TEMP_SIZE >::ff(), and Ogre::StaticCache< 16 *OGRE_STREAM_TEMP_SIZE >::rewind().