|
|
| version 1.2, 2001/02/25 14:23:31 | version 1.7, 2001/03/10 16:34:36 |
|---|---|
| Line 1 | Line 1 |
| /* | /* |
| $Id$ | Parser |
| Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) | |
| Author: Alexander Petrosyan <paf@design.ru> | |
| $Id$ | |
| */ | */ |
| #ifndef PA_VCFRAME_H | #ifndef PA_VCFRAME_H |
| Line 12 class VCodeFrame : public WWrapper { | Line 16 class VCodeFrame : public WWrapper { |
| public: // Value | public: // Value |
| // all: for error reporting after fail(), etc | // all: for error reporting after fail(), etc |
| const char *type() const { return "CodeFrame"; } | const char *type() const { return "code_frame"; } |
| // codeframe: accumulated string | // codeframe: accumulated string |
| String *get_string() { return string_wcontext.get_string(); }; | const String *get_string() { return &string; }; |
| public: // WContext | public: // WContext |
| // codeframe: intercepting string writes | // codeframe: intercepting string writes |
| void write(String *astring); | void write(const String& astring, String::Untaint_lang lang); |
| public: // usage | public: // usage |
| VCodeFrame(Pool& apool, WContext& awcontext) : | VCodeFrame(Pool& apool, WContext& awcontext) : |
| WWrapper(apool, &awcontext, awcontext.constructing()), | WWrapper(apool, &awcontext, awcontext.constructing()), |
| string_wcontext(apool, | string(apool) { |
| 0 /* value not used, only write(string) */, | |
| false /* value not used, only write(string) */) { | |
| } | } |
| public: | private: |
| WContext string_wcontext; | String string; |
| }; | }; |