]> git.saurik.com Git - apple/javascriptcore.git/blame - kjs/SavedBuiltins.h
JavaScriptCore-466.1.6.tar.gz
[apple/javascriptcore.git] / kjs / SavedBuiltins.h
CommitLineData
b37bf2e1
A
1// -*- c-basic-offset: 2 -*-
2/*
3 * This file is part of the KDE libraries
4 * Copyright (C) 1999-2001 Harri Porten (porten@kde.org)
5 * Copyright (C) 2001 Peter Kelly (pmk@post.com)
6 * Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc.
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
17 *
18 * You should have received a copy of the GNU Library General Public License
19 * along with this library; see the file COPYING.LIB. If not, write to
20 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301, USA.
22 *
23 */
24
25#ifndef SavedBuiltins_H
26#define SavedBuiltins_H
27
28#include "protect.h"
29#include "object_object.h"
30#include "string_object.h"
31#include "error_object.h"
32#include "regexp_object.h"
33#include "array_object.h"
34#include "bool_object.h"
35#include "date_object.h"
36#include "number_object.h"
37#include "math_object.h"
38
39namespace KJS {
40
41struct SavedBuiltinsInternal {
42 ProtectedPtr<ObjectObjectImp> objectConstructor;
43 ProtectedPtr<FunctionObjectImp> functionConstructor;
44 ProtectedPtr<ArrayObjectImp> arrayConstructor;
45 ProtectedPtr<BooleanObjectImp> booleanConstructor;
46 ProtectedPtr<StringObjectImp> stringConstructor;
47 ProtectedPtr<NumberObjectImp> numberConstructor;
48 ProtectedPtr<DateObjectImp> dateConstructor;
49 ProtectedPtr<RegExpObjectImp> regExpConstructor;
50 ProtectedPtr<ErrorObjectImp> errorConstructor;
51 ProtectedPtr<NativeErrorImp> evalErrorConstructor;
52 ProtectedPtr<NativeErrorImp> rangeErrorConstructor;
53 ProtectedPtr<NativeErrorImp> referenceErrorConstructor;
54 ProtectedPtr<NativeErrorImp> syntaxErrorConstructor;
55 ProtectedPtr<NativeErrorImp> typeErrorConstructor;
56 ProtectedPtr<NativeErrorImp> URIErrorConstructor;
57
58 ProtectedPtr<ObjectPrototype> objectPrototype;
59 ProtectedPtr<FunctionPrototype> functionPrototype;
60 ProtectedPtr<ArrayPrototype> arrayPrototype;
61 ProtectedPtr<BooleanPrototype> booleanPrototype;
62 ProtectedPtr<StringPrototype> stringPrototype;
63 ProtectedPtr<NumberPrototype> numberPrototype;
64 ProtectedPtr<DatePrototype> datePrototype;
65 ProtectedPtr<RegExpPrototype> regExpPrototype;
66 ProtectedPtr<ErrorPrototype> errorPrototype;
67 ProtectedPtr<NativeErrorPrototype> evalErrorPrototype;
68 ProtectedPtr<NativeErrorPrototype> rangeErrorPrototype;
69 ProtectedPtr<NativeErrorPrototype> referenceErrorPrototype;
70 ProtectedPtr<NativeErrorPrototype> syntaxErrorPrototype;
71 ProtectedPtr<NativeErrorPrototype> typeErrorPrototype;
72 ProtectedPtr<NativeErrorPrototype> URIErrorPrototype;
73};
74
75class SavedBuiltins {
76 friend class JSGlobalObject;
77public:
78 SavedBuiltins()
79 : _internal(0)
80 {
81 }
82
83 ~SavedBuiltins()
84 {
85 delete _internal;
86 }
87
88private:
89 SavedBuiltinsInternal* _internal;
90};
91
92} // namespace
93
94#endif // SavedBuiltins_H