File indexing completed on 2024-05-12 15:43:34

0001 /*
0002  *  This file is part of the KDE libraries
0003  *  Copyright (C) 1999-2001 Harri Porten (porten@kde.org)
0004  *  Copyright (C) 2001 Peter Kelly (pmk@post.com)
0005  *  Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc.
0006  *
0007  *  This library is free software; you can redistribute it and/or
0008  *  modify it under the terms of the GNU Library General Public
0009  *  License as published by the Free Software Foundation; either
0010  *  version 2 of the License, or (at your option) any later version.
0011  *
0012  *  This library is distributed in the hope that it will be useful,
0013  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
0014  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0015  *  Library General Public License for more details.
0016  *
0017  *  You should have received a copy of the GNU Library General Public License
0018  *  along with this library; see the file COPYING.LIB.  If not, write to
0019  *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0020  *  Boston, MA 02110-1301, USA.
0021  *
0022  */
0023 
0024 #ifndef SavedBuiltins_H
0025 #define SavedBuiltins_H
0026 
0027 namespace KJS
0028 {
0029 
0030 class SavedBuiltinsInternal;
0031 
0032 class SavedBuiltins
0033 {
0034     friend class Interpreter;
0035 public:
0036     SavedBuiltins();
0037     ~SavedBuiltins();
0038 private:
0039     SavedBuiltinsInternal *_internal;
0040 };
0041 
0042 class SavedBuiltinsInternal
0043 {
0044     friend class Interpreter;
0045 private:
0046     ProtectedPtr<JSObject> m_Object;
0047     ProtectedPtr<JSObject> m_Function;
0048     ProtectedPtr<JSObject> m_Array;
0049     ProtectedPtr<JSObject> m_Boolean;
0050     ProtectedPtr<JSObject> m_String;
0051     ProtectedPtr<JSObject> m_Number;
0052     ProtectedPtr<JSObject> m_Date;
0053     ProtectedPtr<JSObject> m_RegExp;
0054     ProtectedPtr<JSObject> m_Error;
0055 
0056     ProtectedPtr<JSObject> m_ObjectPrototype;
0057     ProtectedPtr<JSObject> m_FunctionPrototype;
0058     ProtectedPtr<JSObject> m_ArrayPrototype;
0059     ProtectedPtr<JSObject> m_BooleanPrototype;
0060     ProtectedPtr<JSObject> m_StringPrototype;
0061     ProtectedPtr<JSObject> m_NumberPrototype;
0062     ProtectedPtr<JSObject> m_DatePrototype;
0063     ProtectedPtr<JSObject> m_RegExpPrototype;
0064     ProtectedPtr<JSObject> m_ErrorPrototype;
0065 
0066     ProtectedPtr<JSObject> m_EvalError;
0067     ProtectedPtr<JSObject> m_RangeError;
0068     ProtectedPtr<JSObject> m_ReferenceError;
0069     ProtectedPtr<JSObject> m_SyntaxError;
0070     ProtectedPtr<JSObject> m_TypeError;
0071     ProtectedPtr<JSObject> m_UriError;
0072 
0073     ProtectedPtr<JSObject> m_EvalErrorPrototype;
0074     ProtectedPtr<JSObject> m_RangeErrorPrototype;
0075     ProtectedPtr<JSObject> m_ReferenceErrorPrototype;
0076     ProtectedPtr<JSObject> m_SyntaxErrorPrototype;
0077     ProtectedPtr<JSObject> m_TypeErrorPrototype;
0078     ProtectedPtr<JSObject> m_UriErrorPrototype;
0079 };
0080 
0081 } // namespace
0082 
0083 #endif // SavedBuiltins_H