Annotation of parser3/src/types/pa_vclass.h, revision 1.61
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.61 ! moko 11: #define IDENT_PA_VCLASS_H "$Id: pa_vclass.h,v 1.60 2012/06/08 02:04:11 misha 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"
17:
1.13 paf 18: /** stores
1.55 misha 19: - static fields, getters & setters: VClass::ffields
1.13 paf 20: */
1.40 paf 21: class VClass: public VStateless_class {
1.1 paf 22: public: // Value
23:
1.55 misha 24: override const char* type() const { return name_cstr(); }
1.20 parser 25:
26: /// VClass: true
1.40 paf 27: override bool as_bool() const { return true; }
1.55 misha 28: override Value* as(const char* atype);
1.1 paf 29:
1.55 misha 30: override Value* get_element(Value& aself, const String& aname);
1.61 ! moko 31: override const VJunction* put_element(Value& self, const String& name, Value* value);
! 32: // for VObject::put_element
! 33: const VJunction* put_element_replace_only(Value& self, const String& name, Value* value);
! 34:
1.55 misha 35: override Value* create_new_value(Pool&);
1.8 paf 36:
1.60 misha 37: override HashStringValue *get_hash();
38: override HashStringValue* get_fields() { return get_hash(); };
1.58 misha 39:
1.55 misha 40: public:
41:
42: // VStateless_class
1.57 misha 43: override void real_set_method(const String& aname, Method* amethod);
1.55 misha 44: override HashStringProperty* get_properties(){ return &ffields; };
45: override void set_base(VStateless_class* abase);
1.47 paf 46:
47: private:
48:
1.55 misha 49: Property& get_property(const String& aname);
1.4 paf 50:
1.25 paf 51: private: // self
1.1 paf 52:
1.55 misha 53: HashStringProperty ffields;
1.25 paf 54:
1.1 paf 55: };
56:
57: #endif
E-mail: