| 1 | /**************************************************************************** |
| 2 | ** |
| 3 | ** Copyright (C) 2015 The Qt Company Ltd. |
| 4 | ** Contact: http://www.qt.io/licensing/ |
| 5 | ** |
| 6 | ** This file is part of the QtScript module of the Qt Toolkit. |
| 7 | ** |
| 8 | ** $QT_BEGIN_LICENSE:LGPL$ |
| 9 | ** Commercial License Usage |
| 10 | ** Licensees holding valid commercial Qt licenses may use this file in |
| 11 | ** accordance with the commercial license agreement provided with the |
| 12 | ** Software or, alternatively, in accordance with the terms contained in |
| 13 | ** a written agreement between you and The Qt Company. For licensing terms |
| 14 | ** and conditions see https://www.qt.io/terms-conditions. For further |
| 15 | ** information use the contact form at https://www.qt.io/contact-us. |
| 16 | ** |
| 17 | ** GNU Lesser General Public License Usage |
| 18 | ** Alternatively, this file may be used under the terms of the GNU Lesser |
| 19 | ** General Public License version 3 as published by the Free Software |
| 20 | ** Foundation and appearing in the file LICENSE.LGPL3 included in the |
| 21 | ** packaging of this file. Please review the following information to |
| 22 | ** ensure the GNU Lesser General Public License version 3 requirements |
| 23 | ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. |
| 24 | ** |
| 25 | ** GNU General Public License Usage |
| 26 | ** Alternatively, this file may be used under the terms of the GNU |
| 27 | ** General Public License version 2.0 or (at your option) the GNU General |
| 28 | ** Public license version 3 or any later version approved by the KDE Free |
| 29 | ** Qt Foundation. The licenses are as published by the Free Software |
| 30 | ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 |
| 31 | ** included in the packaging of this file. Please review the following |
| 32 | ** information to ensure the GNU General Public License requirements will |
| 33 | ** be met: https://www.gnu.org/licenses/gpl-2.0.html and |
| 34 | ** https://www.gnu.org/licenses/gpl-3.0.html. |
| 35 | ** |
| 36 | ** $QT_END_LICENSE$ |
| 37 | ** |
| 38 | ****************************************************************************/ |
| 39 | |
| 40 | #ifndef QSCRIPTVALUE_P_H |
| 41 | #define QSCRIPTVALUE_P_Hcxx . . $ `src/script/api/qscriptvalue_p.h:41:9`! |
| 42 | |
| 43 | // |
| 44 | // W A R N I N G |
| 45 | // ------------- |
| 46 | // |
| 47 | // This file is not part of the Qt API. It exists purely as an |
| 48 | // implementation detail. This header file may change from version to |
| 49 | // version without notice, or even be removed. |
| 50 | // |
| 51 | // We mean it. |
| 52 | // |
| 53 | |
| 54 | #include <QtCore/qobjectdefs.h> |
| 55 | #include <QtCore/qshareddata.h> |
| 56 | |
| 57 | #include "wtf/Platform.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h`/ |
| 58 | #include "JSValue.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSValue.h`/ |
| 59 | |
| 60 | QT_BEGIN_NAMESPACEcxx . . $ `<external>/15045578679651060896/qglobal.h:148:10`! |
| 61 | |
| 62 | class QStringcxx . . $ QString#; |
| 63 | class QScriptEnginePrivatecxx . . $ QScriptEnginePrivate#; |
| 64 | |
| 65 | class QScriptValuecxx . . $ QScriptValue#; |
| 66 | class QScriptValuePrivatecxx . . $ QScriptValuePrivate# : public QSharedDatacxx . . $ QSharedData# |
| 67 | { |
| 68 | Q_DISABLE_COPYcxx . . $ `<external>/15045578679651060896/qglobal.h:444:9`!(QScriptValuePrivate) |
| 69 | public: |
| 70 | inline void* operatorcxx . . $ QScriptValuePrivate#`operator new`(c1ddb6b7ddb08f75). new(size_t, QScriptEnginePrivatecxx . . $ QScriptEnginePrivate#*); |
| 71 | inline void operatorcxx . . $ QScriptValuePrivate#`operator delete`(5d22bdacc48458e8). delete(void*); |
| 72 | |
| 73 | enum Typecxx . . $ QScriptValuePrivate#Type# { |
| 74 | JavaScriptCorecxx . . $ QScriptValuePrivate#JavaScriptCore., |
| 75 | Numbercxx . . $ QScriptValuePrivate#Number., |
| 76 | Stringcxx . . $ QScriptValuePrivate#String. |
| 77 | }; |
| 78 | |
| 79 | inline QScriptValuePrivatecxx . . $ QScriptValuePrivate#QScriptValuePrivate(db35ed4eaf341aaa).(QScriptEnginePrivatecxx . . $ QScriptEnginePrivate#*); |
| 80 | inline ~cxx . . $ QScriptValuePrivate#`~QScriptValuePrivate`(49f6e7a06ebc5aa8).QScriptValuePrivatecxx . . $ QScriptValuePrivate#(); |
| 81 | |
| 82 | inline void initFromcxx . . $ QScriptValuePrivate#initFrom(5c2ac18db087b3e6).(JSCcxx . . $ QTJSC/::JSValuecxx . . $ QTJSC/JSValue# value); |
| 83 | inline void initFromcxx . . $ QScriptValuePrivate#initFrom(ba8836b59fb42830).(qsrealcxx . . $ qsreal# value); |
| 84 | inline void initFromcxx . . $ QScriptValuePrivate#initFrom(3520e46b33348bf6).(const QStringcxx . . $ QString# &value); |
| 85 | |
| 86 | inline bool isJSCcxx . . $ QScriptValuePrivate#isJSC(50ce9a9e25b4a850).() const; |
| 87 | inline bool isObjectcxx . . $ QScriptValuePrivate#isObject(50ce9a9e25b4a850).() const; |
| 88 | |
| 89 | static inline QScriptValuePrivatecxx . . $ QScriptValuePrivate# *getcxx . . $ QScriptValuePrivate#get(3358d3d0bd9c30a4).(const QScriptValuecxx . . $ QScriptValue# &q) |
| 90 | { |
| 91 | return q.d_ptr.data(); |
| 92 | } |
| 93 | |
| 94 | static inline QScriptValuecxx . . $ QScriptValue# toPubliccxx . . $ QScriptValuePrivate#toPublic(1ef69bc1e2c909e0).(QScriptValuePrivatecxx . . $ QScriptValuePrivate# *d) |
| 95 | { |
| 96 | return QScriptValuecxx . . $ QScriptValue#QScriptValue(565e7a8070d70d6c).(d); |
| 97 | } |
| 98 | |
| 99 | static inline QScriptEnginePrivatecxx . . $ QScriptEnginePrivate# *getEnginecxx . . $ QScriptValuePrivate#getEngine(bd7acf75047c0554).(const QScriptValuecxx . . $ QScriptValue# &q) |
| 100 | { |
| 101 | if (!q.d_ptr) |
| 102 | return 0; |
| 103 | return q.d_ptr->engine; |
| 104 | } |
| 105 | |
| 106 | inline JSCcxx . . $ QTJSC/::JSValuecxx . . $ QTJSC/JSValue# propertycxx . . $ QScriptValuePrivate#property(63fa5edfd4ae7011).(const JSCcxx . . $ `<built-in>:463:9`!::Identifiercxx . . $ QTJSC/Identifier# &id, |
| 107 | const QScriptValuecxx . . $ QScriptValue#::ResolveFlagscxx . . $ QScriptValue#ResolveFlags# &mode = QScriptValuecxx . . $ QScriptValue#::ResolvePrototypecxx . . $ QScriptValue#ResolvePrototype.) const; |
| 108 | inline JSCcxx . . $ QTJSC/::JSValuecxx . . $ QTJSC/JSValue# propertycxx . . $ QScriptValuePrivate#property(9dc9ea08922020dc).(quint32cxx . . $ quint32# index, const QScriptValuecxx . . $ QScriptValue#::ResolveFlagscxx . . $ QScriptValue#ResolveFlags# &mode = QScriptValuecxx . . $ QScriptValue#::ResolvePrototypecxx . . $ QScriptValue#ResolvePrototype.) const; |
| 109 | inline JSCcxx . . $ `<built-in>:463:9`!::JSValuecxx . . $ QTJSC/JSValue# propertycxx . . $ QScriptValuePrivate#property(9c3ad739f7e32a3d).(const JSCcxx . . $ QTJSC/::UStringcxx . . $ QTJSC/UString# &, const QScriptValuecxx . . $ QScriptValue#::ResolveFlagscxx . . $ QScriptValue#ResolveFlags# &mode = QScriptValuecxx . . $ QScriptValue#::ResolvePrototypecxx . . $ QScriptValue#ResolvePrototype.) const; |
| 110 | inline void setPropertycxx . . $ QScriptValuePrivate#setProperty(cc7f7a21926c6cc).(const JSCcxx . . $ `<built-in>:463:9`!::UStringcxx . . $ QTJSC/UString# &name, const JSCcxx . . $ QTJSC/::JSValuecxx . . $ QTJSC/JSValue# &value, |
| 111 | const QScriptValuecxx . . $ QScriptValue#::PropertyFlagscxx . . $ QScriptValue#PropertyFlags# &flags = QScriptValuecxx . . $ QScriptValue#::KeepExistingFlagscxx . . $ QScriptValue#KeepExistingFlags.); |
| 112 | inline void setPropertycxx . . $ QScriptValuePrivate#setProperty(6d4dcba579be031d).(const JSCcxx . . $ `<built-in>:463:9`!::Identifiercxx . . $ QTJSC/Identifier# &id, const JSCcxx . . $ QTJSC/::JSValuecxx . . $ QTJSC/JSValue# &value, |
| 113 | const QScriptValuecxx . . $ QScriptValue#::PropertyFlagscxx . . $ QScriptValue#PropertyFlags# &flags = QScriptValuecxx . . $ QScriptValue#::KeepExistingFlagscxx . . $ QScriptValue#KeepExistingFlags.); |
| 114 | inline void setPropertycxx . . $ QScriptValuePrivate#setProperty(e8321af58c314ab4).(quint32cxx . . $ quint32# index, const JSCcxx . . $ QTJSC/::JSValuecxx . . $ QTJSC/JSValue# &value, |
| 115 | const QScriptValuecxx . . $ QScriptValue#::PropertyFlagscxx . . $ QScriptValue#PropertyFlags# &flags = QScriptValuecxx . . $ QScriptValue#::KeepExistingFlagscxx . . $ QScriptValue#KeepExistingFlags.); |
| 116 | inline QScriptValuecxx . . $ QScriptValue#::PropertyFlagscxx . . $ QScriptValue#PropertyFlags# propertyFlagscxx . . $ QScriptValuePrivate#propertyFlags(ef97df87bb731614).( |
| 117 | const JSCcxx . . $ `<built-in>:463:9`!::Identifiercxx . . $ QTJSC/Identifier# &id, const QScriptValuecxx . . $ QScriptValue#::ResolveFlagscxx . . $ QScriptValue#ResolveFlags# &mode = QScriptValuecxx . . $ QScriptValue#::ResolvePrototypecxx . . $ QScriptValue#ResolvePrototype.) const; |
| 118 | |
| 119 | void detachFromEnginecxx . . $ QScriptValuePrivate#detachFromEngine(49f6e7a06ebc5aa8).(); |
| 120 | |
| 121 | qint64cxx . . $ qint64# objectIdcxx . . $ QScriptValuePrivate#objectId(a5d9f2bf8849668d).() |
| 122 | { |
| 123 | if ( (typecxx . . $ QScriptValuePrivate#type. == JavaScriptCorecxx . . $ QScriptValuePrivate#JavaScriptCore.) && (enginecxx . . $ QScriptValuePrivate#engine.) && jscValuecxx . . $ QScriptValuePrivate#jscValue..isCellcxx . . $ QTJSC/JSValue#isCell(50ce9a9e25b4a850).() ) |
| 124 | return (qint64cxx . . $ qint64#)jscValuecxx . . $ QScriptValuePrivate#jscValue..asCellcxx . . $ QTJSC/JSValue#asCell(60510463d9a84528).(); |
| 125 | else |
| 126 | return -1; |
| 127 | } |
| 128 | |
| 129 | QScriptEnginePrivatecxx . . $ QScriptEnginePrivate# *enginecxx . . $ QScriptValuePrivate#engine.; |
| 130 | Typecxx . . $ QScriptValuePrivate#Type# typecxx . . $ QScriptValuePrivate#type.; |
| 131 | JSCcxx . . $ `<built-in>:463:9`!::JSValuecxx . . $ QTJSC/JSValue# jscValuecxx . . $ QScriptValuePrivate#jscValue.; |
| 132 | qsrealcxx . . $ qsreal# numberValuecxx . . $ QScriptValuePrivate#numberValue.; |
| 133 | QStringcxx . . $ QString# stringValuecxx . . $ QScriptValuePrivate#stringValue.; |
| 134 | |
| 135 | // linked list of engine's script values |
| 136 | QScriptValuePrivatecxx . . $ QScriptValuePrivate# *prevcxx . . $ QScriptValuePrivate#prev.; |
| 137 | QScriptValuePrivatecxx . . $ QScriptValuePrivate# *nextcxx . . $ QScriptValuePrivate#next.; |
| 138 | }; |
| 139 | |
| 140 | inline QScriptValuePrivatecxx . . $ QScriptValuePrivate#::QScriptValuePrivatecxx . . $ QScriptValuePrivate#QScriptValuePrivate(db35ed4eaf341aaa).(QScriptEnginePrivatecxx . . $ QScriptEnginePrivate# *e) |
| 141 | : enginecxx . . $ QScriptValuePrivate#engine.(e), prevcxx . . $ QScriptValuePrivate#prev.(0), nextcxx . . $ QScriptValuePrivate#next.(0) |
| 142 | { |
| 143 | } |
| 144 | |
| 145 | inline bool QScriptValuePrivatecxx . . $ QScriptValuePrivate#::isJSCcxx . . $ QScriptValuePrivate#isJSC(50ce9a9e25b4a850).() const |
| 146 | { |
| 147 | return (typecxx . . $ QScriptValuePrivate#type. == JavaScriptCorecxx . . $ QScriptValuePrivate#JavaScriptCore.); |
| 148 | } |
| 149 | |
| 150 | inline bool QScriptValuePrivatecxx . . $ QScriptValuePrivate#::isObjectcxx . . $ QScriptValuePrivate#isObject(50ce9a9e25b4a850).() const |
| 151 | { |
| 152 | return isJSCcxx . . $ QScriptValuePrivate#isJSC(50ce9a9e25b4a850).() && jscValuecxx . . $ QScriptValuePrivate#jscValue. && jscValuecxx . . $ QScriptValuePrivate#jscValue..isObjectcxx . . $ QTJSC/JSValue#isObject(50ce9a9e25b4a850).(); |
| 153 | } |
| 154 | |
| 155 | // Rest of inline functions implemented in qscriptengine_p.h |
| 156 | |
| 157 | QT_END_NAMESPACEcxx . . $ `<external>/15045578679651060896/qglobal.h:149:10`! |
| 158 | |
| 159 | #endif |