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

1.3       paf         1: /**    @file
1.4       paf         2:        Parser: @b junction class decl.
1.3       paf         3: 
1.11      paf         4:        Copyright (c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com)
1.12      paf         5:        Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru)
1.1       paf         6: */
                      7: 
                      8: #ifndef PA_VJUNCTION_H
                      9: #define PA_VJUNCTION_H
1.14      paf        10: 
1.16    ! paf        11: static const char* IDENT_VJUNCTION_H="$Date: 2002/08/01 11:41:24 $";
1.1       paf        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.13      paf        21: 
                     22:        /// VJunction: 0
                     23:        VStateless_class *get_class() { return 0; }
1.8       parser     24: 
                     25:        /// VJunction: true
                     26:        bool as_bool() const { return true; }
                     27: 
                     28:        /// VJunction: true
1.9       parser     29:        Value *as_expr_result(bool) { return NEW VBool(pool(), as_bool()); }
1.1       paf        30: 
1.5       paf        31:        /// VJunction: method, root,self,rcontext, code
1.1       paf        32:        Junction *get_junction() { return &fjunction; }
                     33: 
1.16    ! paf        34:        /// VJunction: wcontext transparent
        !            35:        /*override*/ Value *get_element(const String& aname, Value *aself, bool looking_up);
        !            36:        /// VJunction: wcontext transparent
        !            37:        /*override*/ bool put_element(const String& aname, Value *avalue, bool replace);
1.1       paf        38: public: // usage
                     39: 
                     40:        VJunction(Junction& ajunction) : Value(ajunction.pool()),
                     41:                fjunction(ajunction) {
                     42:        }
                     43: 
                     44: private:
                     45: 
                     46:        Junction& fjunction;
                     47: };
                     48: 
                     49: 
                     50: #endif

E-mail: