Annotation of parser3/src/include/pa_charset_manager.h, revision 1.1

1.1     ! parser      1: /** @file
        !             2:        Parser: sql driver manager decl.
        !             3: 
        !             4:        Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com)
        !             5:        Author: Alexander Petrosyan <paf@design.ru> (http://design.ru/paf)
        !             6: 
        !             7:        $Id: pa_xslt_stylesheet_manager.h,v 1.2 2001/09/26 10:32:25 parser Exp $
        !             8: 
        !             9: 
        !            10:        global sql driver manager, must be thread-safe
        !            11: */
        !            12: 
        !            13: #ifndef PA_CHARSET_MANAGER_H
        !            14: #define PA_CHARSET_MANAGER_H
        !            15: 
        !            16: #include "pa_config_includes.h"
        !            17: #include "pa_charset_connection.h"
        !            18: #include "pa_hash.h"
        !            19: 
        !            20: // defines
        !            21: 
        !            22: 
        !            23: // forwards
        !            24: 
        !            25: class Charset_connection;
        !            26: 
        !            27: /** Charset manager
        !            28:                maintains 
        !            29:                charset cache
        !            30: */
        !            31: class Charset_manager : public Pooled {
        !            32:        friend Charset_connection;
        !            33: public:
        !            34: 
        !            35:        Charset_manager(Pool& pool) : Pooled(pool),
        !            36:                cache(pool) {
        !            37:        }
        !            38: 
        !            39:        /** 
        !            40:                check for disk update of {file_spec}
        !            41:                if not updated return cached version[if any] otherwise load/compile/return
        !            42:        */
        !            43:        Charset_connection& get_connection(
        !            44:                const String& request_name, 
        !            45:                const String& request_file_spec);
        !            46: 
        !            47: private: // cache
        !            48: 
        !            49:        Charset_connection *get_connection_from_cache(const String& file_spec);
        !            50:        void put_connection_to_cache(const String& file_spec, Charset_connection& connection);
        !            51: 
        !            52: private:
        !            53: 
        !            54:        Hash cache;
        !            55: };
        !            56: 
        !            57: /// global
        !            58: extern Charset_manager *charset_manager;
        !            59: 
        !            60: #endif

E-mail: