--- parser3/src/include/pa_pool.h 2001/12/15 21:28:19 1.73 +++ parser3/src/include/pa_pool.h 2002/04/17 14:26:12 1.79 @@ -1,11 +1,11 @@ /** @file Parser: pool class decl. - Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) + Copyright (c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com) - Author: Alexander Petrosyan (http://paf.design.ru) + Author: Alexandr Petrosian (http://paf.design.ru) - $Id: pa_pool.h,v 1.73 2001/12/15 21:28:19 paf Exp $ + $Id: pa_pool.h,v 1.79 2002/04/17 14:26:12 paf Exp $ */ #ifndef PA_POOL_H @@ -14,9 +14,9 @@ #include "pa_config_includes.h" #ifdef XML -#include -#include -#include +# include "gdome.h" +// for xmlChar +# include "libxml/tree.h" #endif // forwards @@ -24,6 +24,7 @@ class Exception; class String; class Charset; +class GdomeDOMString_auto_ptr; /** Pool mechanizm allows users not to free up allocated memory, @@ -37,10 +38,10 @@ public: Pool(void *astorage); - ///{@ statistics + //{@ statistics size_t total_allocated() { return ftotal_allocated; } unsigned int total_times() { return ftotal_times; } - ///}@ + //}@ void set_context(void *acontext) { fcontext=acontext; } void *get_context() { return fcontext; } @@ -60,21 +61,29 @@ public: fail_register_cleanup(); } - ///{@ source charset + //{@ source charset void set_source_charset(Charset& acharset); Charset& get_source_charset(); - ///}@ + //}@ - ///{@ client charset + //{@ client charset void set_client_charset(Charset& charset); Charset& get_client_charset(); - ///}@ + //}@ #ifdef XML - const char *transcode_cstr(const XalanDOMString& s); - String& transcode(const XalanDOMString& s); + + /// @see Charset::transcode_cstr(xmlChar *s); + const char *transcode_cstr(xmlChar *s); + /// @see Charset::transcode(xmlChar *s); + String& transcode(xmlChar *s); + /// @see Charset::transcode_cstr(GdomeDOMString *s); + const char *transcode_cstr(GdomeDOMString *s); + /// @see Charset::transcode(GdomeDOMString *s); + String& transcode(GdomeDOMString *s); /// @see Charset::transcode(const String& s) - std::auto_ptr transcode(const String& s); + GdomeDOMString_auto_ptr transcode(const String& s); + #endif private: @@ -159,8 +168,10 @@ public: void *calloc(size_t size) const { return fpool->calloc(size); } void register_cleanup(void (*cleanup) (void *), void *data) { fpool->register_cleanup(cleanup, data); } #ifdef XML - const char *transcode_cstr(const XalanDOMString& s) { return fpool->transcode_cstr(s); } - String& transcode(const XalanDOMString& s) { return fpool->transcode(s); } + + const char *transcode_cstr(GdomeDOMString *s) { return fpool->transcode_cstr(s); } + String& transcode(GdomeDOMString *s) { return fpool->transcode(s); } + #endif //} };