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

1.13      paf         1: /**    @file
1.14      paf         2:        Parser: @b class parser class decl.
1.13      paf         3: 
1.54      misha       4:        Copyright (c) 2001-2009 ArtLebedev Group (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.55    ! misha      11: static const char * const IDENT_VCLASS_H="$Date: 2009-06-14 00:33:54 $";
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.55    ! misha      35: public: 
        !            36:        
        !            37:        // VStateless_class
        !            38:        override void add_method(const String& aname, Method& amethod);
        !            39:        override void add_property(const String& aname, Property& aprop);
        !            40:        override HashStringProperty* get_properties(){ return &ffields; };
        !            41:        override void set_base(VStateless_class* abase);
1.47      paf        42: 
                     43: private:
                     44: 
1.55    ! misha      45:        Property& get_property(const String& aname);
1.4       paf        46: 
1.25      paf        47: private: // self
1.1       paf        48: 
1.55    ! misha      49:        HashStringProperty ffields;
1.25      paf        50: 
1.1       paf        51: };
                     52: 
                     53: #endif

E-mail: