Annotation of parser3/src/types/pa_wcontext.C, revision 1.29

1.6       paf         1: /**    @file
                      2:        Parser: write context class.
                      3: 
1.28      paf         4:        Copyright (c) 2001-2004 ArtLebedev Group (http://www.artlebedev.com)
1.15      paf         5:        Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru)
1.20      paf         6: */
1.6       paf         7: 
1.29    ! paf         8: static const char * const IDENT_WCONTEXT_C="$Date: 2004/02/11 15:33:19 $";
1.1       paf         9: 
                     10: #include "pa_wcontext.h"
                     11: 
                     12: // appends a fstring to result
1.25      paf        13: void WContext::write(Value& avalue) {
1.18      paf        14:        if(fvalue) { // already have value?
                     15:                // must not construct twice
1.25      paf        16:                throw Exception("parser.runtime",
                     17:                        fvalue->get_class()?&fvalue->get_class()->name():0,
1.29    ! paf        18:                        "%s may not be overwritten with %s, store it to variable instead",
        !            19:                                fvalue->type(), 
        !            20:                                avalue.type());
1.5       paf        21:        } else 
1.4       paf        22:                fvalue=&avalue;
1.23      paf        23: }
                     24: 
                     25: 
                     26: void WContext::detach_junctions() {
1.25      paf        27:        Array_iterator<Junction*> i(junctions);
1.23      paf        28:        while(i.has_next())
1.25      paf        29:                i.next()->reattach(fparent);
1.23      paf        30:        // someday free junctions
1.25      paf        31:        // the day has come?
1.23      paf        32: }

E-mail: