Files
Work/as68hc11/CACHE.HPP
2024-08-07 09:12:07 -04:00

45 lines
720 B
C++

#ifndef _AS68HC11_CACHE_HPP_
#define _AS68HC11_CACHE_HPP_
#ifndef _AS68HC11_CACHEITEM_HPP_
#include <as68hc11/cacheitm.hpp>
#endif
template <class T,class U>
class MRUCache
{
public:
enum{CacheLength=10};
MRUCache(void);
virtual ~MRUCache();
WORD isInCache(CacheItem<T,U> &cacheItem);
void insert(CacheItem<T,U> &cacheItem);
void clear(void);
private:
void pullCache(void);
Block<CacheItem<T,U> > mCacheBlock;
};
template <class T,class U>
inline
MRUCache<T,U>::MRUCache(void)
{
}
template <class T,class U>
inline
MRUCache<T,U>::~MRUCache()
{
}
template <class T,class U>
inline
void MRUCache<T,U>::clear(void)
{
mCacheBlock.remove();
}
#if defined(_MSC_VER)
#include <apiparse/cache.tpp>
#endif
#endif