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

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

E-mail: