00001 /******************************************************************************** 00002 * * 00003 * Q I n t C a c h e T h u n k * 00004 * * 00005 ********************************************************************************* 00006 * Copyright (C) 2003 by Niall Douglas. All Rights Reserved. * 00007 * NOTE THAT I DO NOT PERMIT ANY OF MY CODE TO BE PROMOTED TO THE GPL * 00008 ********************************************************************************* 00009 * This code is free software; you can redistribute it and/or modify it under * 00010 * the terms of the GNU Library General Public License v2.1 as published by the * 00011 * Free Software Foundation EXCEPT that clause 3 does not apply ie; you may not * 00012 * "upgrade" this code to the GPL without my prior written permission. * 00013 * Please consult the file "License_Addendum2.txt" accompanying this file. * 00014 * * 00015 * This code is distributed in the hope that it will be useful, * 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * 00018 ********************************************************************************* 00019 * $Id: * 00020 ********************************************************************************/ 00021 00022 #ifndef QINTCACHE_H 00023 #define QINTCACHE_H 00024 00025 #include "FXLRUCache.h" 00026 #include "qintdict.h" 00027 00028 namespace FX { 00029 00039 template<class type> class QIntCache : public FXLRUCache< QIntDict<type> > 00040 { 00041 typedef FXLRUCache< QIntDict<type> > Base; 00042 public: 00044 QIntCache(FXuint maxCost=100, FXuint size=13, bool autodel=false) 00045 : Base(maxCost, size, autodel) { } 00046 }; 00047 00052 template<class type> class QIntCacheIterator : public FXLRUCacheIterator< FXLRUCache< QIntDict<type> > > 00053 { 00054 public: 00055 QIntCacheIterator(const QIntCache<type> &d) : FXLRUCacheIterator< FXLRUCache< QIntDict<type> > >(d) { } 00056 }; 00057 00058 } // namespace 00059 00060 #endif