--- parser3/src/include/Attic/pa_wcontext.h 2001/02/24 11:46:03 1.15 +++ parser3/src/include/Attic/pa_wcontext.h 2001/02/25 14:47:12 1.18 @@ -1,5 +1,5 @@ /* - $Id: pa_wcontext.h,v 1.15 2001/02/24 11:46:03 paf Exp $ + $Id: pa_wcontext.h,v 1.18 2001/02/25 14:47:12 paf Exp $ */ #ifndef PA_WCONTEXT_H @@ -15,7 +15,10 @@ public: // Value // all: for error reporting after fail(), etc const char *type() const { return "WContext"; } // WContext: accumulated string - String *get_string() { return string; }; + String *get_string() { return &string; }; + + // WContext: none yet | transparent + VClass *get_class() { return fvalue?fvalue->get_class():0; } public: // WContext @@ -28,11 +31,14 @@ public: // WContext public: // usage - WContext(Pool& apool, Value *avalue) : Value(apool), + WContext(Pool& apool, Value *avalue, bool aconstructing) : Value(apool), fvalue(avalue), - string(new(apool) String(apool)) { + fconstructing(aconstructing), + string(*new(apool) String(apool)) { } + bool constructing() { return fconstructing; } + // retrives the resulting value Value *object() const { return fvalue; @@ -46,7 +52,8 @@ public: // usage protected: Value *fvalue; private: - String *string; + bool fconstructing; + String& string; }; #endif