Annotation of parser3/src/include/pa_value.h, revision 1.2
1.1 paf 1: /*
1.2 ! paf 2: $Id: pa_value.h,v 1.1 2001/02/11 19:35:38 paf Exp $
1.1 paf 3: */
4:
5: /*
6: data core
7: */
8:
9: #ifndef PA_VALUE_H
10: #define PA_VALUE_H
11:
12: #include "pa_string.h"
13:
14: class Method {
15: public:
16: Array param_names;
17: String code;
18: };
19:
1.2 ! paf 20: class Method_ref {
! 21: public:
! 22: Value *self;
! 23: Method& method;
! 24: };
! 25:
1.1 paf 26: class Value {
27: public:
28: // text: value
29: virtual String *get_string() const =0;
30: virtual String *put_string(const String *astring)=0;
31:
32: // hash: (key)=value
1.2 ! paf 33: // object_class: (field)=STATIC.value;(STATIC)=hash;(method)=method_ref with self=object_class
1.1 paf 34: // object_instance: (field)=value;(STATIC)=hash;(method)=method_ref
35: virtual Value *get_element(const String& name) const =0;
36: virtual Value *put_element(const String& name, const Value *avalue)=0;
37:
38: // object_instance, object_class: method
1.2 ! paf 39: virtual Method *get_method(const String& name) const =0;
1.1 paf 40:
41: // method_ref: "self" part, method
1.2 ! paf 42: virtual Method_ref *get_method_ref() const =0;
1.1 paf 43: };
44:
45: /*
46: descendants:
47: text:+ value:String
48: hash:+ keys&values:Hash
49: table:+ columns_order:Array, columns:Hash, rows:Array
50: object_class:+ STATIC:Hash, methods:Hash
51: object_instance:+ object_class, fields:Hash
1.2 ! paf 52: method_ref:+ self:Value/object_class, method:String
! 53: method_self_n_params:+ self:Value/object_class[1st try], params&values:Hash[2nd try]
1.1 paf 54:
55:
56: */
57:
58: #endif
E-mail: