| 1 | /* |
| 2 | * Copyright (C) 2006 Maks Orlovich |
| 3 | * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 4 | * |
| 5 | * This library is free software; you can redistribute it and/or |
| 6 | * modify it under the terms of the GNU Library General Public |
| 7 | * License as published by the Free Software Foundation; either |
| 8 | * version 2 of the License, or (at your option) any later version. |
| 9 | * |
| 10 | * This library is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | * Library General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU Library General Public License |
| 16 | * along with this library; see the file COPYING.LIB. If not, write to |
| 17 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 18 | * Boston, MA 02110-1301, USA. |
| 19 | * |
| 20 | */ |
| 21 | |
| 22 | #ifndef JSWrapperObject_h |
| 23 | #define JSWrapperObject_hcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSWrapperObject.h:23:9`! |
| 24 | |
| 25 | #include "JSObject.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSObject.h`/ |
| 26 | |
| 27 | namespace JSCcxx . . $ QTJSC/ { |
| 28 | |
| 29 | // This class is used as a base for classes such as String, |
| 30 | // Number, Boolean and Date which are wrappers for primitive types. |
| 31 | class JSWrapperObjectcxx . . $ QTJSC/JSWrapperObject# : public JSObjectcxx . . $ QTJSC/JSObject# { |
| 32 | protected: |
| 33 | explicit JSWrapperObjectcxx . . $ QTJSC/JSWrapperObject#JSWrapperObject(9678d77265d996b).(NonNullPassRefPtrcxx . . $ NonNullPassRefPtr#<Structurecxx . . $ QTJSC/Structure#>); |
| 34 | |
| 35 | public: |
| 36 | JSValuecxx . . $ QTJSC/JSValue# internalValuecxx . . $ QTJSC/JSWrapperObject#internalValue(888c053acf364da1).() const { return m_internalValuecxx . . $ QTJSC/JSWrapperObject#m_internalValue.; } |
| 37 | void setInternalValuecxx . . $ QTJSC/JSWrapperObject#setInternalValue(5c2ac18db087b3e6).(JSValuecxx . . $ QTJSC/JSValue#); |
| 38 | |
| 39 | static PassRefPtrcxx . . $ PassRefPtr#<Structurecxx . . $ QTJSC/Structure#> createStructurecxx . . $ QTJSC/JSWrapperObject#createStructure(da75fbe5e97e240f).(JSValuecxx . . $ QTJSC/JSValue# prototype) |
| 40 | { |
| 41 | return Structure::create(prototype, TypeInfocxx . . $ QTJSC/TypeInfo#TypeInfo(85e540a0e5560fef).(ObjectTypecxx . . $ QTJSC/ObjectType., StructureFlagscxx . . $ QTJSC/JSObject#StructureFlags.)); |
| 42 | } |
| 43 | |
| 44 | private: |
| 45 | virtual void markChildrencxx . . $ QTJSC/JSWrapperObject#markChildren(bd9cae851d80a865).(MarkStackcxx . . $ QTJSC/MarkStack#&); |
| 46 | |
| 47 | JSValuecxx . . $ QTJSC/JSValue# m_internalValuecxx . . $ QTJSC/JSWrapperObject#m_internalValue.; |
| 48 | }; |
| 49 | |
| 50 | inline JSWrapperObjectcxx . . $ QTJSC/JSWrapperObject#::JSWrapperObjectcxx . . $ QTJSC/JSWrapperObject#JSWrapperObject(9678d77265d996b).(NonNullPassRefPtrcxx . . $ NonNullPassRefPtr#<Structurecxx . . $ QTJSC/Structure#> structure) |
| 51 | : JSObjectcxx . . $ QTJSC/JSObject#(structure) |
| 52 | { |
| 53 | addAnonymousSlotscxx . . $ QTJSC/JSObject#addAnonymousSlots(cb2f890c2fdad230).(1); |
| 54 | putAnonymousValuecxx . . $ QTJSC/JSObject#putAnonymousValue(862010b52dad24bc).(0, jsNullcxx . . $ QTJSC/jsNull(ad9afe69d7bf6378).()); |
| 55 | } |
| 56 | |
| 57 | inline void JSWrapperObjectcxx . . $ QTJSC/JSWrapperObject#::setInternalValuecxx . . $ QTJSC/JSWrapperObject#setInternalValue(5c2ac18db087b3e6).(JSValuecxx . . $ QTJSC/JSValue# value) |
| 58 | { |
| 59 | ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(value); |
| 60 | ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(!value.isObject()); |
| 61 | m_internalValuecxx . . $ QTJSC/JSWrapperObject#m_internalValue. =cxx . . $ QTJSC/JSValue#`operator=`(af0e8a528f82a1b5). value; |
| 62 | putAnonymousValuecxx . . $ QTJSC/JSObject#putAnonymousValue(862010b52dad24bc).(0, value); |
| 63 | } |
| 64 | |
| 65 | } // namespace JSC |
| 66 | |
| 67 | #endif // JSWrapperObject_h |