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

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: 
1.3     ! paf         7:        $Id: pa_charset_manager.h,v 1.2 2001/10/29 08:23:49 paf Exp $
1.1       parser      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"
1.3     ! paf        19: #include "pa_status_provider.h"
1.1       parser     20: 
                     21: // defines
                     22: 
                     23: // forwards
                     24: 
                     25: class Charset_connection;
                     26: 
                     27: /** Charset manager
                     28:                maintains 
                     29:                charset cache
                     30: */
1.3     ! paf        31: class Charset_manager : public Pooled, public Status_provider {
1.2       paf        32:        friend class Charset_connection;
1.1       parser     33: public:
                     34: 
1.3     ! paf        35:        Charset_manager(Pool& apool);
1.1       parser     36: 
                     37:        /** 
                     38:                check for disk update of {file_spec}
                     39:                if not updated return cached version[if any] otherwise load/compile/return
                     40:        */
                     41:        Charset_connection& get_connection(
                     42:                const String& request_name, 
                     43:                const String& request_file_spec);
                     44: 
                     45: private: // cache
                     46: 
                     47:        Charset_connection *get_connection_from_cache(const String& file_spec);
                     48:        void put_connection_to_cache(const String& file_spec, Charset_connection& connection);
                     49: 
                     50: private:
                     51: 
                     52:        Hash cache;
1.3     ! paf        53: 
        !            54: public: // Status_provider
        !            55: 
        !            56:        virtual Value& get_status(Pool& pool, const String *source);
        !            57: 
1.1       parser     58: };
                     59: 
                     60: /// global
                     61: extern Charset_manager *charset_manager;
                     62: 
                     63: #endif

E-mail: