]>
Commit | Line | Data |
---|---|---|
b37bf2e1 A |
1 | // -*- c-basic-offset: 2 -*- |
2 | /* | |
3 | * This file is part of the KDE libraries | |
4 | * Copyright (C) 1999-2000 Harri Porten (porten@kde.org) | |
5 | * | |
6 | * This library is free software; you can redistribute it and/or | |
7 | * modify it under the terms of the GNU Lesser General Public | |
8 | * License as published by the Free Software Foundation; either | |
9 | * version 2 of the License, or (at your option) any later version. | |
10 | * | |
11 | * This library is distributed in the hope that it will be useful, | |
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
14 | * Lesser General Public License for more details. | |
15 | * | |
16 | * You should have received a copy of the GNU Lesser General Public | |
17 | * License along with this library; if not, write to the Free Software | |
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
19 | * | |
20 | */ | |
21 | ||
22 | #ifndef MATH_OBJECT_H_ | |
23 | #define MATH_OBJECT_H_ | |
24 | ||
25 | #include "function_object.h" | |
26 | #include "lookup.h" | |
27 | ||
28 | namespace KJS { | |
29 | ||
30 | class MathObjectImp : public JSObject { | |
31 | public: | |
32 | MathObjectImp(ExecState*, ObjectPrototype*); | |
33 | ||
34 | bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); | |
35 | JSValue* getValueProperty(ExecState*, int token) const; | |
36 | ||
37 | virtual const ClassInfo* classInfo() const { return &info; } | |
38 | static const ClassInfo info; | |
39 | ||
40 | enum { Euler, Ln2, Ln10, Log2E, Log10E, Pi, Sqrt1_2, Sqrt2 }; | |
41 | }; | |
42 | ||
43 | // Functions | |
44 | JSValue* mathProtoFuncAbs(ExecState*, JSObject*, const List&); | |
45 | JSValue* mathProtoFuncACos(ExecState*, JSObject*, const List&); | |
46 | JSValue* mathProtoFuncASin(ExecState*, JSObject*, const List&); | |
47 | JSValue* mathProtoFuncATan(ExecState*, JSObject*, const List&); | |
48 | JSValue* mathProtoFuncATan2(ExecState*, JSObject*, const List&); | |
49 | JSValue* mathProtoFuncCeil(ExecState*, JSObject*, const List&); | |
50 | JSValue* mathProtoFuncCos(ExecState*, JSObject*, const List&); | |
51 | JSValue* mathProtoFuncExp(ExecState*, JSObject*, const List&); | |
52 | JSValue* mathProtoFuncFloor(ExecState*, JSObject*, const List&); | |
53 | JSValue* mathProtoFuncLog(ExecState*, JSObject*, const List&); | |
54 | JSValue* mathProtoFuncMax(ExecState*, JSObject*, const List&); | |
55 | JSValue* mathProtoFuncMin(ExecState*, JSObject*, const List&); | |
56 | JSValue* mathProtoFuncPow(ExecState*, JSObject*, const List&); | |
57 | JSValue* mathProtoFuncRandom(ExecState*, JSObject*, const List&); | |
58 | JSValue* mathProtoFuncRound(ExecState*, JSObject*, const List&); | |
59 | JSValue* mathProtoFuncSin(ExecState*, JSObject*, const List&); | |
60 | JSValue* mathProtoFuncSqrt(ExecState*, JSObject*, const List&); | |
61 | JSValue* mathProtoFuncTan(ExecState*, JSObject*, const List&); | |
62 | ||
63 | } // namespace KJS | |
64 | ||
65 | #endif // MATH_OBJECT_H_ |