Annotation of parser3/src/include/pa_value.h, revision 1.6
1.1 paf 1: /*
1.6 ! paf 2: $Id: pa_value.h,v 1.5 2001/02/13 15:10:45 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;
1.4 paf 17: Array local_names;
1.1 paf 18: String code;
19: };
20:
1.2 paf 21: class Method_ref {
22: public:
23: Value *self;
24: Method& method;
25: };
26:
1.1 paf 27: class Value {
28: public:
29: // text: value
30: virtual String *get_string() const =0;
31: virtual String *put_string(const String *astring)=0;
32:
1.3 paf 33: // method_ref: "self" part, method
34: virtual Method_ref *get_method_ref() const =0;
35:
1.1 paf 36: // hash: (key)=value
1.2 paf 37: // object_class: (field)=STATIC.value;(STATIC)=hash;(method)=method_ref with self=object_class
1.1 paf 38: // object_instance: (field)=value;(STATIC)=hash;(method)=method_ref
39: virtual Value *get_element(const String& name) const =0;
40: virtual Value *put_element(const String& name, const Value *avalue)=0;
41:
42: // object_instance, object_class: method
1.2 paf 43: virtual Method *get_method(const String& name) const =0;
1.5 paf 44:
45: // object_class, object_instance: object_class
46: virtual Class *get_class() const =0;
1.6 ! paf 47:
! 48: // object_class: true when this class is derived from 'parent'
! 49: virtual bool has_parent(Class *aparent) const =0;
1.1 paf 50: };
51:
52: /*
53: descendants:
54: text:+ value:String
55: hash:+ keys&values:Hash
56: table:+ columns_order:Array, columns:Hash, rows:Array
57: object_class:+ STATIC:Hash, methods:Hash
58: object_instance:+ object_class, fields:Hash
1.2 paf 59: method_ref:+ self:Value/object_class, method:String
1.4 paf 60: method_self_n_params_n_locals:+ self:Value/object_class[1st try], params_locals&values:Hash[2nd try]
1.1 paf 61:
62:
63: */
64:
65: #endif
E-mail: