Annotation of parser3/src/types/pa_vproperty.h, revision 1.4

1.2       paf         1: /**    @file
                      2:        Parser: @b property class decl.
                      3: 
1.3       paf         4:        Copyright (c) 2001-2005 ArtLebedev Group (http://www.artlebedev.com)
1.2       paf         5:        Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru)
                      6: */
                      7: 
                      8: #ifndef PA_VPROPERTY_H
                      9: #define PA_VPROPERTY_H
                     10: 
1.4     ! misha      11: static const char * const IDENT_VPROPERTY_H="$Date: 2005/08/09 08:14:55 $";
1.2       paf        12: 
                     13: // include
                     14: 
                     15: #include "pa_value.h"
                     16: #include "pa_property.h"
                     17: 
                     18: /// property two methods
                     19: class VProperty: public Value {
                     20: public: // VProperty
                     21: 
                     22:        override const char* type() const { return "property"; }
                     23: 
                     24:        /// VProperty: 0
                     25:        override VStateless_class *get_class() { bark("is '%s', it has no class"); return 0; }
                     26: 
                     27:        /// VProperty: false
                     28:        override bool is_defined() const { bark("is '%s', it has no 'defined'"); return false; }
                     29: 
                     30:        /// VProperty: false
                     31:        override bool as_bool() const { return is_defined(); }
                     32: 
                     33:        /// VProperty: false
1.4     ! misha      34:        override Value& as_expr_result(bool);
1.2       paf        35: 
                     36:        /// VProperty: property
                     37:        override Property* get_property() { return &fproperty; }
                     38: 
                     39: public: // usage
                     40: 
                     41:        Property& get() { return fproperty; }
                     42: 
                     43: private:
                     44: 
                     45:        Property fproperty;
                     46: };
                     47: 
                     48: 
                     49: #endif

E-mail: