< GENERATING_DOXYGEN_OUTPUT More...
#include <mi32/micachearray.h>

Public Member Functions | |
| MICACHEARRAY (MICACHEARRAYIO< _CT > &ioref) | |
| virtual | ~MICACHEARRAY () |
| ERRVALUE | Create (INT32 NumBuckets, INT32 BucketSize=32768, bool bSynchronizeAccess=false, INT32 ItemSize=sizeof(_CT)) |
| ERRVALUE | Flush () |
| void | Free () |
| ERRVALUE | Read (INT32 ItemIdx, _CT &item, void *UserDataPtr=0) |
| ERRVALUE | Write (INT32 ItemIdx, const _CT &item, void *UserDataPtr=0) |
< GENERATING_DOXYGEN_OUTPUT
| MICACHEARRAY< _CT >::MICACHEARRAY | ( | MICACHEARRAYIO< _CT > & | ioref | ) | [inline, explicit] |
Default constructor.
This performs initialization only. Use the appropriate Create() method to actually create the cache.
| virtual MICACHEARRAY< _CT >::~MICACHEARRAY | ( | ) | [inline, virtual] |
Destructor.
| ERRVALUE MICACHEARRAY< _CT >::Create | ( | INT32 | NumBuckets, | |
| INT32 | BucketSize = 32768, |
|||
| bool | bSynchronizeAccess = false, |
|||
| INT32 | ItemSize = sizeof(_CT) | |||
| ) | [inline] |
Create cache with equal-sized entries.
Allocation will be handled by the MICACHE class. If items are only to be read and not modified then the CACHEIO.CacheSave() method does not need to do anything but return 0. 'NumCache' needs to be at least as much as the number of threads that will use the cache, otherwise an ECacheItemsExhausted error may result.
| NumBuckets | Number of cache buckets to use. | |
| BucketSize | Initial size of the bucket in bytes | |
| bSynchronizeAccess | Set to 'true' if multiple threads will use this cache | |
| ItemSize | Size of each array item in bytes |
| ERRVALUE MICACHEARRAY< _CT >::Flush | ( | ) | [inline] |
Flush all modified entries to external storage.
This may cause the WriteFunc callback to be invoked.
| void MICACHEARRAY< _CT >::Free | ( | ) | [inline] |
Free the cache.
| ERRVALUE MICACHEARRAY< _CT >::Read | ( | INT32 | ItemIdx, | |
| _CT & | item, | |||
| void * | UserDataPtr = 0 | |||
| ) | [inline] |
Read data from cache item.
An EInvalidCacheResize error will be returned if this method is called while another thread is calling Resize().
| ItemIdx | Item number to read | |
| item | Item to read into | |
| UserDataPtr | User data pointer to attach to the cache item before reading |
| ERRVALUE MICACHEARRAY< _CT >::Write | ( | INT32 | ItemIdx, | |
| const _CT & | item, | |||
| void * | UserDataPtr = 0 | |||
| ) | [inline] |
Write data to cache item.
An EInvalidCacheResize error will be returned if this method is called while another thread is calling Resize().
| ItemIdx | Item number to write | |
| item | Item to write from | |
| UserDataPtr | User data pointer to attach to the cache item before writing |
1.6.1