--- parser3/src/include/pa_pool.h 2001/03/24 19:12:18 1.44 +++ parser3/src/include/pa_pool.h 2001/03/29 08:28:03 1.46 @@ -5,7 +5,7 @@ Author: Alexander Petrosyan (http://design.ru/paf) - $Id: pa_pool.h,v 1.44 2001/03/24 19:12:18 paf Exp $ + $Id: pa_pool.h,v 1.46 2001/03/29 08:28:03 paf Exp $ */ #ifndef PA_POOL_H @@ -15,6 +15,7 @@ class Exception; class Temp_exception; +class Request; /** Pool mechanizm allows users not to free up allocated memory, @@ -25,18 +26,17 @@ class Temp_exception; @see Pooled */ - class Pool { friend Temp_exception; public: - Pool(void *astorage) : fstorage(astorage), fcontext(0), ftag(0), fexception(0) {} + Pool(void *astorage) : fstorage(astorage), fcontext(0), frequest(0), fexception(0) {} void set_context(void *acontext) { fcontext=acontext; } void *context() { return fcontext; } - void set_tag(void *atag) { ftag=atag; } - void *tag() { return ftag; } + void set_request(Request *arequest) { frequest=arequest; } + Request *request() { return frequest; } /// current exception object of the pool Exception& exception() const { return *fexception; } @@ -54,7 +54,7 @@ private: void *fstorage; void *fcontext; - void *ftag; + Request *frequest; private: // implementation defined @@ -78,7 +78,7 @@ private: private: // exception handling - // exception replacement mechanism is 'protected' from direct usage + // exception replacement mechanism is 'private'zed from direct usage // Temp_exception object enforces paired set/restore Exception *set_exception(Exception *e){ Exception *r=fexception;