Annotation of parser3/src/include/pa_vbool.h, revision 1.7

1.1       paf         1: /*
1.7     ! paf         2:        Parser
        !             3:        Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com)
        !             4:        Author: Alexander Petrosyan <paf@design.ru>
        !             5: 
        !             6:        $Id: pa_string.C,v 1.35 2001/03/10 12:12:51 paf Exp $
1.1       paf         7: */
                      8: 
                      9: #ifndef PA_VBOOL_H
                     10: #define PA_VBOOL_H
                     11: 
                     12: #include "pa_value.h"
                     13: #include "pa_common.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"; }
1.6       paf        22:        // bool: this
                     23:        Value *get_expr_result() { return this; }
1.4       paf        24:        // bool: fbool
1.5       paf        25:        bool get_bool() { return fbool; }
1.4       paf        26:        // bool: fbool
1.5       paf        27:        double get_double() { return fbool; }
1.1       paf        28: 
                     29: public: // usage
                     30: 
1.5       paf        31:        VBool(Pool& apool, bool abool) : Value(apool), 
1.4       paf        32:                fbool(abool) {
1.1       paf        33:        }
                     34: 
                     35: private:
                     36: 
1.5       paf        37:        bool fbool;
1.1       paf        38: 
                     39: };
                     40: 
                     41: #endif

E-mail: