Annotation of parser3/src/types/pa_vbool.h, revision 1.5
1.1 paf 1: /*
2: Parser
3: Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com)
1.2 paf 4: Author: Alexander Petrosyan <paf@design.ru> (http://design.ru/paf)
1.1 paf 5:
1.5 ! paf 6: $Id: pa_vbool.h,v 1.4 2001/03/19 16:57:24 paf Exp $
1.1 paf 7: */
8:
9: #ifndef PA_VBOOL_H
10: #define PA_VBOOL_H
11:
1.3 paf 12: #include "pa_common.h"
1.1 paf 13: #include "pa_value.h"
14:
15: #define MAX_BOOL_AS_STRING 20
16:
1.4 paf 17: /// VBool
1.1 paf 18: class VBool : public Value {
19: public: // Value
20:
21: // all: for error reporting after fail(), etc
22: const char *type() const { return "bool"; }
23: // bool: this
1.5 ! paf 24: Value *get_expr_result(bool return_string_as_is=false) { return this; }
1.1 paf 25: // bool: fbool
26: bool get_bool() { return fbool; }
27: // bool: fbool
28: double get_double() { return fbool; }
29:
30: public: // usage
31:
32: VBool(Pool& apool, bool abool) : Value(apool),
33: fbool(abool) {
34: }
35:
36: private:
37:
38: bool fbool;
39:
40: };
41:
42: #endif
E-mail: