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

1.3       paf         1: /**    @file
1.4       paf         2:        Parser: @b junction class decl.
1.3       paf         3: 
1.19.2.3  paf         4:        Copyright (c) 2001-2003 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.19.2.4! paf        11: static const char* IDENT_VJUNCTION_H="$Date: 2003/01/31 12:34:43 $";
1.19.2.2  paf        12: 
                     13: // include
1.1       paf        14: 
                     15: #include "pa_value.h"
1.8       parser     16: #include "pa_vbool.h"
1.1       paf        17: 
1.4       paf        18: /// junction is method+self+context, implemented with Junction
1.19.2.4! paf        19: class VJunction: public Value {
1.1       paf        20: public: // VJunction
                     21: 
1.19.2.4! paf        22:        override const char* type() const { return "junction"; }
1.13      paf        23: 
                     24:        /// VJunction: 0
1.19.2.4! paf        25:        override VStateless_class *get_class() { return 0; }
1.8       parser     26: 
1.18      paf        27:        /// VJunction: false
1.19.2.4! paf        28:        override bool is_defined() const { return false; }
1.8       parser     29: 
1.18      paf        30:        /// VJunction: false
1.19.2.4! paf        31:        override bool as_bool() const { return is_defined(); }
1.18      paf        32: 
                     33:        /// VJunction: false
1.19.2.4! paf        34:        override ValuePtr as_expr_result(bool) { return ValuePtr(new VBool(as_bool())); }
1.1       paf        35: 
1.5       paf        36:        /// VJunction: method, root,self,rcontext, code
1.19.2.4! paf        37:        override JunctionPtr get_junction() { return fjunction; }
1.1       paf        38: 
                     39: public: // usage
                     40: 
1.19.2.1  paf        41:        VJunction(JunctionPtr ajunction): fjunction(ajunction) {}
1.1       paf        42: 
                     43: private:
                     44: 
1.19.2.1  paf        45:        JunctionPtr fjunction;
1.1       paf        46: };
                     47: 
                     48: 
                     49: #endif

E-mail: