Annotation of parser3/src/types/pa_vmath.h, revision 1.26
1.1 parser 1: /** @file
2: Parser: @b math class decls.
3:
1.26 ! moko 4: Copyright (c) 2001-2023 Art. Lebedev Studio (http://www.artlebedev.com)
! 5: Authors: Konstantin Morshnev <moko@design.ru>, Alexandr Petrosian <paf@design.ru>
1.1 parser 6: */
7:
8: #ifndef PA_VMATH_H
9: #define PA_VMATH_H
1.8 paf 10:
1.26 ! moko 11: #define IDENT_PA_VMATH_H "$Id: pa_vmath.h,v 1.25 2020/12/15 17:10:41 moko Exp $"
1.15 paf 12:
13: // includes
1.1 parser 14:
15: #include "classes.h"
16: #include "pa_common.h"
17:
1.15 paf 18: // defines
1.1 parser 19:
1.19 misha 20: #define PI 3.14159265358979
21: #define MathE 2.718281828459
1.1 parser 22:
23: /**
24: */
1.15 paf 25: class VMath: public VStateless_class {
1.1 parser 26: public: // Value
27:
1.15 paf 28: const char* type() const { return "math"; }
1.1 parser 29:
1.22 misha 30: // math: method,field
1.20 misha 31: Value* get_element(const String& aname) {
1.22 misha 32: // $method
1.20 misha 33: if(Value* result=VStateless_class::get_element(aname))
1.1 parser 34: return result;
35:
36: // $const
1.15 paf 37: return fconsts.get(aname);
1.1 parser 38: }
39:
40: public: // usage
41:
1.15 paf 42: VMath();
1.1 parser 43:
44: private:
45:
1.15 paf 46: HashStringValue fconsts;
1.1 parser 47:
48: };
49:
50: #endif
E-mail: