Annotation of parser3/src/main/pa_cache_managers.C, revision 1.5
1.1 paf 1: /** @file
2: Parser: status press center implementation.
3:
1.3 paf 4: Copyright (c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com)
1.4 paf 5: Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru)
1.5 ! paf 6: */
1.1 paf 7:
1.5 ! paf 8: static const char* IDENT_CACHE_MANAGERS_C="$Id: zzz $";
1.1 paf 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: