Annotation of parser3/src/types/pa_vclass.h, revision 1.60

1.13      paf         1: /**    @file
1.14      paf         2:        Parser: @b class parser class decl.
1.13      paf         3: 
1.59      moko        4:        Copyright (c) 2001-2012 Art. Lebedev Studio (http://www.artlebedev.com)
1.24      paf         5:        Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru)
1.1       paf         6: */
                      7: 
                      8: #ifndef PA_VCLASS_H
                      9: #define PA_VCLASS_H
1.26      paf        10: 
1.60    ! misha      11: #define IDENT_PA_VCLASS_H "$Id: pa_vclass.h,v 1.59 2012-03-16 09:24:16 moko Exp $"
1.40      paf        12: 
                     13: // includes
1.1       paf        14: 
1.8       paf        15: #include "pa_vstateless_class.h"
1.1       paf        16: #include "pa_vjunction.h"
1.22      paf        17: #include "pa_vobject.h"
1.1       paf        18: 
1.13      paf        19: /**    stores 
1.55      misha      20: - static fields, getters & setters: VClass::ffields
1.13      paf        21: */
1.40      paf        22: class VClass: public VStateless_class {
1.1       paf        23: public: // Value
                     24:        
1.55      misha      25:        override const char* type() const { return name_cstr(); }
1.20      parser     26: 
                     27:        /// VClass: true
1.40      paf        28:        override bool as_bool() const { return true; }
1.55      misha      29:        override Value* as(const char* atype);
1.1       paf        30: 
1.55      misha      31:        override Value* get_element(Value& aself, const String& aname);
1.50      paf        32:        override const VJunction* put_element(Value& self, const String& name, Value* value, bool replace);
1.55      misha      33:        override Value* create_new_value(Pool&);
1.8       paf        34: 
1.60    ! misha      35:        override HashStringValue *get_hash();
        !            36:        override HashStringValue* get_fields() { return get_hash(); };
1.58      misha      37: 
1.55      misha      38: public: 
                     39:        
                     40:        // VStateless_class
1.57      misha      41:        override void real_set_method(const String& aname, Method* amethod);
1.55      misha      42:        override HashStringProperty* get_properties(){ return &ffields; };
                     43:        override void set_base(VStateless_class* abase);
1.47      paf        44: 
                     45: private:
                     46: 
1.55      misha      47:        Property& get_property(const String& aname);
1.4       paf        48: 
1.25      paf        49: private: // self
1.1       paf        50: 
1.55      misha      51:        HashStringProperty ffields;
1.25      paf        52: 
1.1       paf        53: };
                     54: 
                     55: #endif

E-mail: