Annotation of parser3/src/types/pa_vjunction.h, revision 1.22.14.2
1.3 paf 1: /** @file
1.4 paf 2: Parser: @b junction class decl.
1.3 paf 3:
1.22.14.1 paf 4: Copyright (c) 2001-2005 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.22.14.2! paf 11: static const char * const IDENT_VJUNCTION_H="$Date: 2005/08/05 13:03:04 $";
1.20 paf 12:
13: // include
1.1 paf 14:
15: #include "pa_value.h"
1.8 parser 16: #include "pa_vbool.h"
1.20 paf 17: #include "pa_junction.h"
1.1 paf 18:
1.4 paf 19: /// junction is method+self+context, implemented with Junction
1.20 paf 20: class VJunction: public Value {
1.1 paf 21: public: // VJunction
22:
1.20 paf 23: override const char* type() const { return "junction"; }
1.13 paf 24:
25: /// VJunction: 0
1.20 paf 26: override VStateless_class *get_class() { return 0; }
1.8 parser 27:
1.18 paf 28: /// VJunction: false
1.20 paf 29: override bool is_defined() const { return false; }
1.8 parser 30:
1.18 paf 31: /// VJunction: false
1.20 paf 32: override bool as_bool() const { return is_defined(); }
1.18 paf 33:
34: /// VJunction: false
1.20 paf 35: override Value& as_expr_result(bool) { return *new VBool(as_bool()); }
1.1 paf 36:
1.5 paf 37: /// VJunction: method, root,self,rcontext, code
1.22.14.2! paf 38: override Junction* get_junction() { return &fjunction; }
1.1 paf 39:
40: public: // usage
41:
1.22.14.2! paf 42: VJunction(
! 43: Value& aself,
! 44: const Method* amethod,
! 45: VMethodFrame* amethod_frame,
! 46: Value* arcontext,
! 47: WContext* awcontext,
! 48: ArrayOperation* acode): fjunction(aself, amethod, amethod_frame, arcontext, awcontext, acode) {}
1.1 paf 49:
50: private:
51:
1.22.14.2! paf 52: Junction fjunction;
1.1 paf 53: };
54:
55:
56: #endif
E-mail: