diff options
author | lordjaxom <lordjaxom> | 2004-06-07 19:09:34 +0000 |
---|---|---|
committer | lordjaxom <lordjaxom> | 2004-06-07 19:09:34 +0000 |
commit | e0de96fc7168daeaf414fb6196e08969468427d2 (patch) | |
tree | de7f2dfb83796a7c77e5600a23b8b6b26f284796 /cache.h | |
parent | 6094765d94e4caaf0813039dff826b731f277753 (diff) | |
download | vdr-plugin-text2skin-0.0.2.tar.gz vdr-plugin-text2skin-0.0.2.tar.bz2 |
- fixed Timebar which sometimes displayed something beyond 100%v0.0.2
- fixed scrolling in EPG detail display
- added "MenuEventEndTime", "MenuEventVPSTime" and "MenuEventDate"
- added "DateTimeF" and "MenuEventDateTimeF" for free formattable dates
- added parameter format that holds the format string for the above items
- implemented setup menu to flush image cache
Diffstat (limited to 'cache.h')
-rw-r--r-- | cache.h | 18 |
1 files changed, 16 insertions, 2 deletions
@@ -1,5 +1,5 @@ /* - * $Id: cache.h,v 1.1 2004/06/05 01:40:13 lordjaxom Exp $ + * $Id: cache.h,v 1.2 2004/06/07 18:23:11 lordjaxom Exp $ */ #ifndef VDR_TEXT2SKIN_CACHE_HPP @@ -29,7 +29,7 @@ private: int _maxItems; Item *_first; Item *_last; - + void Unlink(Item *item); void Update(Item *item); void Delete(Item *item); @@ -39,6 +39,7 @@ public: cText2SkinCache(int maxItems); ~cText2SkinCache(); + void Flush(void); bool Contains(const K &key); D &operator[](const K &key); }; @@ -105,6 +106,19 @@ cText2SkinCache<K,D>::cText2SkinCache(int maxItems) { template<class K,class D> cText2SkinCache<K,D>::~cText2SkinCache() { + Flush(); +} + +template<class K,class D> +void cText2SkinCache<K,D>::Flush(void) { + Item *cur = _first; + while (cur) { + Item *tmp = cur->_next; + _items.erase(cur->_key); + Unlink(cur); + Delete(cur); + cur = tmp; + } } template<class K,class D> |