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

1.1       paf         1: /*
1.8     ! paf         2:   $Id: pa_value.h,v 1.7 2001/02/14 14:15:36 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.8     ! paf        32: class Junction {
        !            33:        Value *self;
        !            34:        String code;
        !            35: };
        !            36: 
1.1       paf        37: class Value {
                     38: public:
                     39:        // text: value
                     40:        virtual String *get_string() const =0;
                     41:        virtual String *put_string(const String *astring)=0;
                     42: 
1.8     ! paf        43:        // method_ref: self, method
1.3       paf        44:        virtual Method_ref *get_method_ref() const =0;
                     45: 
1.8     ! paf        46:        // junction: self, code
        !            47:        virtual Junction *get_junction() const =0;
        !            48: 
1.1       paf        49:        // hash: (key)=value
1.2       paf        50:        // object_class: (field)=STATIC.value;(STATIC)=hash;(method)=method_ref with self=object_class
1.1       paf        51:        // object_instance: (field)=value;(STATIC)=hash;(method)=method_ref
1.7       paf        52:        // operator_class: (field)=value - static values only
1.1       paf        53:        virtual Value *get_element(const String& name) const =0;
                     54:        virtual Value *put_element(const String& name, const Value *avalue)=0;
                     55: 
                     56:        // object_instance, object_class: method
1.2       paf        57:        virtual Method *get_method(const String& name) const =0;
1.5       paf        58: 
                     59:        // object_class, object_instance: object_class
                     60:        virtual Class *get_class() const =0;
1.6       paf        61: 
                     62:        // object_class: true when this class is derived from 'parent'
                     63:        virtual bool has_parent(Class *aparent) const =0;
1.1       paf        64: };
                     65: 
                     66: /*
                     67: descendants:
                     68:        text:+ value:String
                     69:     hash:+ keys&values:Hash
                     70:     table:+ columns_order:Array, columns:Hash, rows:Array
                     71:     object_class:+ STATIC:Hash, methods:Hash
                     72:     object_instance:+ object_class, fields:Hash
1.2       paf        73:     method_ref:+ self:Value/object_class, method:String
1.4       paf        74:     method_self_n_params_n_locals:+ self:Value/object_class[1st try], params_locals&values:Hash[2nd try]
1.8     ! paf        75:        junction:+ self:Value, code:String
1.1       paf        76: */
                     77: 
                     78: #endif

E-mail: