Diff for /parser3/src/include/Attic/pa_value.h between versions 1.19 and 1.25

version 1.19, 2001/02/23 14:18:26 version 1.25, 2001/02/24 11:46:03
Line 25  public: Line 25  public:
         const String& name;          const String& name;
         Array& params_names;          Array& params_names;
         Array& locals_names;          Array& locals_names;
         Array& code;          const Array& code;
   
         Method(          Method(
                 Pool& apool,                  Pool& apool,
                 const String& aname,                  const String& aname,
                 Array& aparams_names,                  Array& aparams_names,
                 Array& alocals_names,                  Array& alocals_names,
                 Array& acode) :                   const Array& acode) : 
   
                 Pooled(apool),                  Pooled(apool),
                 name(aname),                  name(aname),
Line 49  class Operator : public Method { Line 49  class Operator : public Method {
 };  };
 */  */
   
 class Method_ref {  class Junction : public Pooled {
 public:  public:
         Value *self;  
         Method& method;  
 };  
   
 class Junction {          Junction(Pool& apool,
         bool auto_calc;                  Value& aself,
         Value& root;                  Method *amethod,
         Value *self;                  Value *aroot,
         Value& rcontext;                  Value *arcontext,
         WContext& wcontext;                  WContext *awcontext,
         Array& code;                  const Array *acode) : Pooled(apool),
                   
                   self(aself),
                   method(amethod),
                   root(aroot),
                   rcontext(arcontext),
                   wcontext(awcontext),
                   code(acode) {
           }
   
           Value& self;
           Method *method;
           Value *root;
           Value *rcontext;
           WContext *wcontext;
           const Array *code;
 };  };
   
 class Value : public Pooled {  class Value : public Pooled {
Line 77  public: // Value Line 89  public: // Value
         virtual String *get_string() { return 0; }          virtual String *get_string() { return 0; }
                   
         // string: value          // string: value
         virtual void put_string(String *astring) { failed("storing string to %s"); }          virtual void put_string(String *astring) { failed("storing string to '%s'"); }
   
         // method_ref: self, method  
         virtual Method_ref *get_method_ref() { failed("extracting method reference from %s"); return 0; }  
   
         // junction: auto_calc,root,self,rcontext,wcontext, code          // junction: auto_calc,root,self,rcontext,wcontext, code
         virtual Junction *get_junction() { failed("getting junction from %s"); return 0; }          virtual Junction *get_junction() { return 0; }
   
         // hash: (key)=value          // hash: (key)=value
         // object_class: (field)=STATIC.value;(STATIC)=hash;(method)=method_ref with self=object_class          // object_class: (field)=STATIC.value;(STATIC)=hash;(method)=method_ref with self=object_class
Line 91  public: // Value Line 100  public: // Value
         // operator_class: (field)=value - static values only          // operator_class: (field)=value - static values only
         // wcontext: transparent          // wcontext: transparent
         // frame: my or self_transparent          // frame: my or self_transparent
         virtual Value *get_element(const String& name) { failed("getting element from %s"); return 0; }          // codeframe: wcontext_transparent
           virtual Value *get_element(const String& name) { failed("is '%s', can not get element from it"); return 0; }
                   
         // hash: (key)=value          // hash: (key)=value
         // object_class, operator_class: (field)=value - static values only          // object_class, operator_class: (field)=value - static values only
         // wcontext: transparent          // wcontext: transparent
         // frame: my or self_transparent          // frame: my or self_transparent
         virtual void put_element(const String& name, Value *value) { failed("putting element to %s"); }          // codeframe: wcontext_transparent
           virtual void put_element(const String& name, Value *value) { failed("is '%s', can not put element to it"); }
         // object_instance, object_class: method  
         // frame: transparent  
         // wcontext: transparent  
         virtual Method *get_method(const String& name) const { return 0; }  
   
         // object_class, object_instance: object_class          // object_class, object_instance: object_class
         // frame: transparent          // frame: transparent
         // wcontext: transparent          // wcontext: transparent
           // codeframe: wcontext_transparent
         virtual VClass *get_class() { return 0; }          virtual VClass *get_class() { return 0; }
   
         // object_class: true when this class is this or derived from 'ancestor'          // object_class: true when this class is this or derived from 'ancestor'
         // frame: transparent          // frame: transparent
         // wcontext: transparent          // wcontext: transparent
         virtual bool is_or_derived_from(VClass& ancestor) { failed("thoghts of ancestors of %s"); return false; }          // codeframe: wcontext_transparent
           virtual bool is_or_derived_from(VClass& ancestor) { failed("thoghts of ancestors of '%s'"); return false; }
   
 public: // usage  public: // usage
   
Line 123  public: // usage Line 131  public: // usage
         String& as_string() {          String& as_string() {
                 String *result=get_string();                   String *result=get_string(); 
                 if(!result)                  if(!result)
                         failed("getting string of %s");                          failed("getting string of '%s'");
                 return *result;                  return *result;
         }          }
   

Removed from v.1.19  
changed lines
  Added in v.1.25


E-mail: