Annotation of parser3/src/include/pa_value.h, revision 1.4

1.1       paf         1: /*
1.4     ! paf         2:   $Id: pa_value.h,v 1.3 2001/02/12 11:44:41 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.1       paf        44: };
                     45: 
                     46: /*
                     47: descendants:
                     48:        text:+ value:String
                     49:     hash:+ keys&values:Hash
                     50:     table:+ columns_order:Array, columns:Hash, rows:Array
                     51:     object_class:+ STATIC:Hash, methods:Hash
                     52:     object_instance:+ object_class, fields:Hash
1.2       paf        53:     method_ref:+ self:Value/object_class, method:String
1.4     ! paf        54:     method_self_n_params_n_locals:+ self:Value/object_class[1st try], params_locals&values:Hash[2nd try]
1.1       paf        55: 
                     56: 
                     57: */
                     58: 
                     59: #endif

E-mail: