--- parser3/src/include/pa_stylesheet_manager.h 2003/03/06 15:32:37 1.15.2.4 +++ parser3/src/include/pa_stylesheet_manager.h 2009/05/14 11:27:23 1.23 @@ -1,7 +1,7 @@ /** @file Parser: Stylesheet manager decl. - Copyright (c) 2001-2003 ArtLebedev Group (http://www.artlebedev.com) + Copyright (c) 2001-2009 ArtLebedev Group (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) global sql driver manager, must be thread-safe @@ -10,18 +10,14 @@ #ifndef PA_STYLESHEET_MANAGER_H #define PA_STYLESHEET_MANAGER_H -static const char* IDENT_STYLESHEET_MANAGER_H="$Date: 2003/03/06 15:32:37 $"; +static const char * const IDENT_STYLESHEET_MANAGER_H="$Date: 2009/05/14 11:27:23 $"; + -#include "pa_pool.h" #include "pa_hash.h" #include "pa_table.h" #include "pa_cache_managers.h" #include "pa_stack.h" - -// forwards - -class Stylesheet_connection; -DECLARE_OBJECT_PTR(Stylesheet_connection); +#include "pa_stylesheet_connection.h" /** XSLT stylesheet driver manager maintains @@ -37,33 +33,34 @@ public: check for disk update of "{file_spec}" or "{file_spec}.stamp", if not updated return cached version[if any] otherwise load/compile/return */ - Stylesheet_connectionPtr get_connection(StringPtr file_spec); + Stylesheet_connection_ptr get_connection(String::Body file_spec); private: // cache - Stylesheet_connectionPtr get_connection_from_cache(StringPtr file_spec); - void put_connection_to_cache(StringPtr file_spec, Stylesheet_connectionPtr connection); + Stylesheet_connection* get_connection_from_cache(String::Body file_spec); + void put_connection_to_cache(String::Body file_spec, Stylesheet_connection& connection); private: time_t prev_expiration_pass_time; private: // for stylesheet /// caches connection - void close_connection(StringPtr file_spec, Stylesheet_connection& connection); + void close_connection(String::Body file_spec, Stylesheet_connection& connection); +public: + typedef Stack connection_cache_value_type; + typedef HashString connection_cache_type; private: - - typedef Hash > > connection_cache_type; connection_cache_type connection_cache; public: // Cache_manager - override ValuePtr get_status(Pool& pool, StringPtr source); + override Value* get_status(); override void maybe_expire_cache(); }; /// global -extern Stylesheet_manager stylesheet_manager; +extern Stylesheet_manager* stylesheet_manager; #endif