--- parser3/src/include/Attic/pa_value.h 2001/02/24 13:18:19 1.26 +++ parser3/src/include/Attic/pa_value.h 2001/02/25 08:12:21 1.28 @@ -1,5 +1,5 @@ /* - $Id: pa_value.h,v 1.26 2001/02/24 13:18:19 paf Exp $ + $Id: pa_value.h,v 1.28 2001/02/25 08:12:21 paf Exp $ */ /* @@ -14,6 +14,11 @@ #include "pa_array.h" //#include "pa_voperator.h" +#define NAME_NAME "NAME" +#define PARENTS_NAME "PARENTS" +#define STATIC_NAME "STATIC" +#define STATICS_NAME "STATICS" + class Value; class VClass; //class VOperator; @@ -81,7 +86,7 @@ public: // Value // all: for error reporting after fail(), etc virtual const char *type() const =0; - const String *name() const { return fname; } + /*const*/ String *name() const { return fname; } // string: value // unknown: "" @@ -117,17 +122,13 @@ public: // Value // codeframe: wcontext_transparent virtual VClass *get_class() { return 0; } - // object_class: true when this class is this or derived from 'ancestor' - // frame: transparent - // wcontext: transparent - // codeframe: wcontext_transparent - virtual bool is_or_derived_from(VClass& ancestor) { failed("thoghts of ancestors of '%s'"); return false; } - public: // usage - Value(Pool& apool) : Pooled(apool), fname(0) {} + Value(Pool& apool) : Pooled(apool), fname(new(apool) String(apool)) { + fname->APPEND_CONST("unnamed"); + } - void set_name(const String& aname) { fname=&aname; } + void set_name(String& aname) { fname=&aname; } String& as_string() { String *result=get_string(); @@ -138,7 +139,7 @@ public: // usage private: - const String *fname; + String *fname; private: