--- parser3/src/include/pa_string.h 2001/01/29 22:34:57 1.14 +++ parser3/src/include/pa_string.h 2001/02/11 11:27:24 1.15 @@ -1,5 +1,5 @@ /* - $Id: pa_string.h,v 1.14 2001/01/29 22:34:57 paf Exp $ + $Id: pa_string.h,v 1.15 2001/02/11 11:27:24 paf Exp $ */ /* @@ -24,10 +24,9 @@ #include +#include "pa_pool.h" #include "pa_types.h" -class Pool; - #ifndef NO_STRING_ORIGIN # define STRING_APPEND_PARAMS const char *src, char *file, uint line # define APPEND(src, file, line) real_append(src, file, line) @@ -36,8 +35,7 @@ class Pool; # define APPEND(src, file, line) real_append(src) #endif - -class String { +class String : public Pooled { public: enum { CR_PREALLOCATED_COUNT=5, @@ -46,7 +44,6 @@ public: public: - void *operator new(size_t size, Pool& apool); String(Pool& apool); String(const String& src); size_t size() const { return fsize; } @@ -59,11 +56,6 @@ public: const Origin& origin() const { return head.rows[0].item.origin; } -protected: - - // the pool I'm allocated on - Pool& pool; - private: struct Chunk { @@ -113,4 +105,5 @@ private: //disabled }; + #endif