|
|
| version 1.3, 2001/10/02 17:12:53 | version 1.4, 2001/11/05 10:21:27 |
|---|---|
| Line 13 | Line 13 |
| #include "pa_exception.h" | #include "pa_exception.h" |
| #include "pa_common.h" | #include "pa_common.h" |
| #include "pa_threads.h" | #include "pa_threads.h" |
| #include "pa_vhash.h" | |
| // globals | // globals |
| Line 23 Charset_manager *charset_manager; | Line 24 Charset_manager *charset_manager; |
| // Charset_manager | // Charset_manager |
| Charset_manager::Charset_manager(Pool& apool) : Pooled(apool), | |
| cache(apool) { | |
| status_providers->put(*NEW String(pool(), "charset"), this); | |
| } | |
| Charset_connection& Charset_manager::get_connection(const String& request_name, const String& request_file_spec) { | Charset_connection& Charset_manager::get_connection(const String& request_name, const String& request_file_spec) { |
| Pool& pool=request_name.pool(); // request pool | Pool& pool=request_name.pool(); // request pool |
| Line 69 void Charset_manager::put_connection_to_ | Line 77 void Charset_manager::put_connection_to_ |
| cache.put(file_spec, &connection); | cache.put(file_spec, &connection); |
| } | } |
| Value& Charset_manager::get_status(Pool& pool, const String *source) { | |
| VHash& result=*new(pool) VHash(pool); | |
| /* | |
| // cache | |
| { | |
| Array& columns=*new(pool) Array(pool, 3); | |
| columns+=new(pool) String(pool, "protocol"); | |
| columns+=new(pool) String(pool, "time"); | |
| columns+=new(pool) String(pool, "times"); | |
| Table& table=*new(pool) Table(pool, 0, &columns, connection_cache.size()); | |
| connection_cache.for_each(add_connections_to_status_cache_table, &table); | |
| result.hash(source).put(*new(pool) String(pool, "cache"), new(pool) VTable(pool, &table)); | |
| } | |
| */ | |
| return result; | |
| } |