Diff for /parser3/src/include/Attic/pa_vstring.h between versions 1.12 and 1.15

version 1.12, 2001/03/08 17:14:51 version 1.15, 2001/03/10 11:44:32
Line 8 Line 8
 #include <stdlib.h>  #include <stdlib.h>
   
 #include "pa_value.h"  #include "pa_value.h"
   #include "pa_vobject.h"
   #include "pa_vdouble.h"
   #include "classes/_string.h"
   
 class VString : public Value {  class VString : public VObject {
 public: // Value  public: // Value
   
         // all: for error reporting after fail(), etc          // all: for error reporting after fail(), etc
         const char *type() const { return "string"; }          const char *type() const { return "string"; }
         // fvalue: fvalue          // string: fvalue as VDouble
         String *get_string() { return &fvalue; };          Value *get_expr_result() { return NEW VDouble(pool(), get_double()); }
         // fvalue: fvalue          // string: fvalue
           const String *get_string() { return &fvalue; };
           // string: fvalue
         double get_double() { return atof(fvalue.cstr()); }          double get_double() { return atof(fvalue.cstr()); }
         // fvalue: empty or not          // string: empty or not
         bool get_bool() { return fvalue.size()!=0; };          bool get_bool() { return fvalue.size()!=0; };
   
 public: // usage  public: // usage
   
         VString(Pool& apool) : Value(apool),           VString(Pool& apool) : VObject(apool, *string_class), 
                 fvalue(*new(apool) String(apool)) {                  fvalue(*new(string_class->pool()) String(string_class->pool())) {
         }          }
   
         VString(String& avalue) : Value(avalue.pool()),           VString(const String& avalue) : VObject(avalue.pool(), *string_class),
                 fvalue(avalue) {                  fvalue(avalue) {
         }          }
   
 private:  private:
         String& fvalue;          const String& fvalue;
   
 };  };
   

Removed from v.1.12  
changed lines
  Added in v.1.15


E-mail: