Annotation of parser3/src/main/pa_cache_managers.C, revision 1.7

1.1       paf         1: /** @file
                      2:        Parser: status press center implementation.
                      3: 
1.7     ! paf         4:        Copyright (c) 2001, 2003 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.7     ! paf         8: static const char* IDENT_CACHE_MANAGERS_C="$Date: 2002/08/01 11:41:18 $";
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: