--- parser3/src/include/Attic/pa_wcontext.h 2001/03/08 12:19:20 1.22 +++ parser3/src/include/Attic/pa_wcontext.h 2001/03/10 16:34:37 1.28 @@ -1,5 +1,9 @@ /* - $Id: pa_wcontext.h,v 1.22 2001/03/08 12:19:20 paf Exp $ + Parser + Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) + Author: Alexander Petrosyan + + $Id: pa_wcontext.h,v 1.28 2001/03/10 16:34:37 paf Exp $ */ #ifndef PA_WCONTEXT_H @@ -9,13 +13,16 @@ #include "pa_vstring.h" #include "pa_vhash.h" +class Request; + class WContext : public Value { + friend Request; public: // Value // all: for error reporting after fail(), etc const char *type() const { return "wcontext"; } // WContext: accumulated fstring - String *get_string() { return &fstring; }; + const String *get_string() { return &fstring; }; // WContext: none yet | transparent VClass *get_class() { return fvalue?fvalue->get_class():0; } @@ -25,11 +32,11 @@ public: // Value public: // WContext // appends a fstring to result - virtual void write(String *astring); + virtual void write(const String& astring, String::Untaint_lang lang); // if value is VString writes fstring, // else writes Value; raises an error if already - virtual void write(Value *avalue); + virtual void write(Value& avalue, String::Untaint_lang lang); public: // usage @@ -42,10 +49,6 @@ public: // usage bool constructing() { return fconstructing; } // retrives the resulting value - Value *object() const { - return fvalue; - } - // retrives the resulting value // that can be VString if value==0 or the Value object Value *result() const { return fvalue?fvalue:NEW VString(fstring);