--- parser3/src/include/Attic/pa_vstring.h 2001/03/06 15:30:48 1.8 +++ parser3/src/include/Attic/pa_vstring.h 2001/03/09 04:47:27 1.13 @@ -1,5 +1,5 @@ /* - $Id: pa_vstring.h,v 1.8 2001/03/06 15:30:48 paf Exp $ + $Id: pa_vstring.h,v 1.13 2001/03/09 04:47:27 paf Exp $ */ #ifndef PA_VSTRING_H @@ -8,31 +8,33 @@ #include #include "pa_value.h" +#include "pa_vobject.h" +#include "classes/_string.h" -class VString : public Value { +class VString : public VObject { public: // Value // all: for error reporting after fail(), etc - const char *type() const { return "value"; } - // value: value - String *get_string() { return &value; }; - // value: value - double get_double() { return atof(value.cstr()); } + const char *type() const { return "string"; } + // value: fvalue + String *get_string() { return &fvalue; }; + // value: fvalue + double get_double() { return atof(fvalue.cstr()); } // value: empty or not - bool get_bool() { return value.size()!=0; }; + bool get_bool() { return fvalue.size()!=0; }; public: // usage - VString(Pool& apool) : Value(apool), - value(*new(apool) String(apool)) { + VString() : VObject(*string_class), + fvalue(*new(string_class->pool()) String(string_class->pool())) { } - VString(String& avalue) : Value(avalue.pool()), - value(avalue) { + VString(String& avalue) : VObject(*string_class), + fvalue(avalue) { } private: - String& value; + String& fvalue; };