Annotation of parser3/src/types/pa_vmath.h, revision 1.1

1.1     ! parser      1: /** @file
        !             2:        Parser: @b math class decls.
        !             3: 
        !             4:        Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com)
        !             5: 
        !             6:        Author: Alexander Petrosyan <paf@design.ru> (http://design.ru/paf)
        !             7: 
        !             8:        $Id: pa_vmath.h,v 1.20 2001/05/07 14:00:53 paf Exp $
        !             9: */
        !            10: 
        !            11: #ifndef PA_VMATH_H
        !            12: #define PA_VMATH_H
        !            13: 
        !            14: #include "classes.h"
        !            15: #include "pa_common.h"
        !            16: 
        !            17: extern Methoded *math_base_class;
        !            18: extern Hash *math_consts;
        !            19: 
        !            20: class Request;
        !            21: 
        !            22: /**
        !            23: */
        !            24: class VMath : public VStateless_class {
        !            25: public: // Value
        !            26:        
        !            27:        const char *type() const { return "math"; }
        !            28: 
        !            29:        // math: CLASS,BASE,method,field
        !            30:        Value *get_element(const String& aname) {
        !            31:                // $CLASS,$BASE,$method
        !            32:                if(Value *result=VStateless_class::get_element(aname))
        !            33:                        return result;
        !            34: 
        !            35:                // $const
        !            36:                return static_cast<Value *>(fconsts.get(aname));
        !            37:        }
        !            38: 
        !            39: public: // usage
        !            40: 
        !            41:        VMath(Pool& apool) : VStateless_class(apool, math_base_class),
        !            42:                fconsts(*math_consts) {
        !            43:        }
        !            44: 
        !            45:        Hash& consts() { return fconsts; }
        !            46: 
        !            47: private:
        !            48: 
        !            49:        Hash& fconsts;
        !            50: 
        !            51: };
        !            52: 
        !            53: #endif

E-mail: