--- parser3/src/include/pa_pool.h 2001/03/23 19:25:15 1.43 +++ 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.43 2001/03/23 19:25:15 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,16 +26,18 @@ class Temp_exception; @see Pooled */ - class Pool { friend Temp_exception; public: - Pool(void *astorage) : fstorage(astorage), fcontext(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_request(Request *arequest) { frequest=arequest; } + Request *request() { return frequest; } + /// current exception object of the pool Exception& exception() const { return *fexception; } @@ -51,6 +54,7 @@ private: void *fstorage; void *fcontext; + Request *frequest; private: // implementation defined @@ -74,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;