Annotation of parser3/src/types/pa_vbool.h, revision 1.3

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.3     ! paf         6:        $Id: pa_vbool.h,v 1.2 2001/03/11 08:16:37 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: 
                     17: class VBool : public Value {
                     18: public: // Value
                     19: 
                     20:        // all: for error reporting after fail(), etc
                     21:        const char *type() const { return "bool"; }
                     22:        // bool: this
                     23:        Value *get_expr_result() { return this; }
                     24:        // bool: fbool
                     25:        bool get_bool() { return fbool; }
                     26:        // bool: fbool
                     27:        double get_double() { return fbool; }
                     28: 
                     29: public: // usage
                     30: 
                     31:        VBool(Pool& apool, bool abool) : Value(apool), 
                     32:                fbool(abool) {
                     33:        }
                     34: 
                     35: private:
                     36: 
                     37:        bool fbool;
                     38: 
                     39: };
                     40: 
                     41: #endif

E-mail: