Annotation of parser3/src/types/pa_vjunction.h, revision 1.9

1.3       paf         1: /**    @file
1.4       paf         2:        Parser: @b junction class decl.
1.3       paf         3: 
1.1       paf         4:        Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com)
1.2       paf         5:        Author: Alexander Petrosyan <paf@design.ru> (http://design.ru/paf)
1.1       paf         6: 
1.9     ! parser      7:        $Id: pa_vjunction.h,v 1.8 2001/10/09 08:13:04 parser Exp $
1.1       paf         8: */
                      9: 
                     10: #ifndef PA_VJUNCTION_H
                     11: #define PA_VJUNCTION_H
                     12: 
                     13: #include "pa_value.h"
1.8       parser     14: #include "pa_vbool.h"
1.1       paf        15: 
1.4       paf        16: /// junction is method+self+context, implemented with Junction
1.1       paf        17: class VJunction : public Value {
                     18: public: // VJunction
                     19: 
                     20:        const char *type() const { return "junction"; }
1.8       parser     21: 
                     22:        /// VJunction: true
                     23:        bool as_bool() const { return true; }
                     24: 
                     25:        /// VJunction: true
1.9     ! parser     26:        Value *as_expr_result(bool) { return NEW VBool(pool(), as_bool()); }
1.1       paf        27: 
1.5       paf        28:        /// VJunction: method, root,self,rcontext, code
1.1       paf        29:        Junction *get_junction() { return &fjunction; }
                     30: 
                     31: public: // usage
                     32: 
                     33:        VJunction(Junction& ajunction) : Value(ajunction.pool()),
                     34:                fjunction(ajunction) {
                     35:        }
                     36: 
                     37: private:
                     38: 
                     39:        Junction& fjunction;
                     40: };
                     41: 
                     42: 
                     43: #endif

E-mail: