--- parser3/src/include/Attic/pa_vbool.h 2001/03/08 16:54:25 1.4 +++ parser3/src/include/Attic/pa_vbool.h 2001/03/10 16:34:36 1.7 @@ -1,5 +1,9 @@ /* - $Id: pa_vbool.h,v 1.4 2001/03/08 16:54:25 paf Exp $ + Parser + Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) + Author: Alexander Petrosyan + + $Id: pa_vbool.h,v 1.7 2001/03/10 16:34:36 paf Exp $ */ #ifndef PA_VBOOL_H @@ -7,7 +11,6 @@ #include "pa_value.h" #include "pa_common.h" -#include "pa_bool.h" #define MAX_BOOL_AS_STRING 20 @@ -16,22 +19,22 @@ public: // Value // all: for error reporting after fail(), etc const char *type() const { return "bool"; } - // clone - Value *clone() const { return NEW VBool(fbool); } + // bool: this + Value *get_expr_result() { return this; } // bool: fbool - bool get_bool() { return fbool.value; } + bool get_bool() { return fbool; } // bool: fbool - double get_double() { return fbool.value; } + double get_double() { return fbool; } public: // usage - VBool(Bool& abool) : Value(abool.pool()), + VBool(Pool& apool, bool abool) : Value(apool), fbool(abool) { } private: - Bool& fbool; + bool fbool; };