Annotation of parser3/src/main/pa_cache_managers.C, revision 1.2
1.1 paf 1: /** @file
2: Parser: status press center implementation.
3:
4: Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com)
5: Author: Alexander Petrosyan <paf@design.ru> (http://paf.design.ru)
6:
1.2 ! paf 7: $Id: pa_cache_managers.C,v 1.1 2001/11/08 11:04:12 paf Exp $
1.1 paf 8: */
9:
10: #include "pa_cache_managers.h"
11:
12: // globals
13:
14: Cache_managers *cache_managers;
15:
16: // methods
1.2 ! paf 17:
! 18: static void destroy_one(const Hash::Key& akey, Hash::Val *avalue,
! 19: void *) {
! 20: static_cast<Cache_manager *>(avalue)->~Cache_manager();
! 21: }
! 22: Cache_managers::~Cache_managers() {
! 23: for_each(destroy_one);
! 24: }
1.1 paf 25:
26: static void maybe_expire_one(const Hash::Key& akey, Hash::Val *avalue,
27: void *) {
28: static_cast<Cache_manager *>(avalue)->maybe_expire_cache();
29: }
30: void Cache_managers::maybe_expire() {
31: for_each(maybe_expire_one);
32: }
E-mail: