Annotation of parser3/src/types/pa_vcframe.h, revision 1.2

1.1       paf         1: /*
                      2:        Parser
                      3:        Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com)
1.2     ! paf         4:        Author: Alexander Petrosyan <paf@design.ru> (http://design.ru/paf)
1.1       paf         5: 
1.2     ! paf         6:        $Id: pa_vcframe.h,v 1.1 2001/03/11 07:52:45 paf Exp $
1.1       paf         7: */
                      8: 
                      9: #ifndef PA_VCFRAME_H
                     10: #define PA_VCFRAME_H
                     11: 
                     12: #include "pa_wwrapper.h"
                     13: #include "pa_vunknown.h"
                     14: 
                     15: class VCodeFrame : public WWrapper {
                     16: public: // Value
                     17: 
                     18:        // all: for error reporting after fail(), etc
                     19:        const char *type() const { return "code_frame"; }
                     20: 
                     21:        // codeframe: accumulated string
                     22:        const String *get_string() { return &string; };
                     23: 
                     24: public: // WContext
                     25: 
                     26:        // codeframe: intercepting string writes 
                     27:        void write(const String& astring, String::Untaint_lang lang) {
                     28:                string.append(astring, lang);
                     29:        }
                     30: 
                     31: public: // usage
                     32: 
                     33:        VCodeFrame(Pool& apool, WContext& awcontext) : 
                     34:                WWrapper(apool, &awcontext, awcontext.constructing()),
                     35: 
                     36:                string(apool) {
                     37:        }
                     38: 
                     39: private:
                     40:        
                     41:        String string;
                     42: 
                     43: };
                     44: 
                     45: #endif

E-mail: