| 1 | /**************************************************************************** |
| 2 | ** |
| 3 | ** Copyright (C) 2018 The Qt Company Ltd. |
| 4 | ** Contact: https://www.qt.io/licensing/ |
| 5 | ** |
| 6 | ** This file is part of the QtSCriptTools 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 | #include "qscriptdebuggervalueproperty_p.h"cxx . . $ `<file>/src/scripttools/debugging/qscriptdebuggervalueproperty_p.h`/ |
| 41 | #include "qscriptdebuggervalue_p.h"cxx . . $ `<file>/src/scripttools/debugging/qscriptdebuggervalue_p.h`/ |
| 42 | #include "qscriptdebuggerobjectsnapshotdelta_p.h"cxx . . $ `<file>/src/scripttools/debugging/qscriptdebuggerobjectsnapshotdelta_p.h`/ |
| 43 | |
| 44 | #include <QtCore/qshareddata.h> |
| 45 | #include <QtCore/qdatastream.h> |
| 46 | #include <QtCore/qstring.h> |
| 47 | |
| 48 | QT_BEGIN_NAMESPACEcxx . . $ `<external>/15045578679651060896/qglobal.h:148:10`! |
| 49 | |
| 50 | /*! |
| 51 | \internal |
| 52 | \class QScriptDebuggerValueProperty |
| 53 | */ |
| 54 | |
| 55 | class QScriptDebuggerValuePropertyPrivatecxx . . $ QScriptDebuggerValuePropertyPrivate# : public QSharedDatacxx . . $ QSharedData# |
| 56 | { |
| 57 | public: |
| 58 | QScriptDebuggerValuePropertyPrivatecxx . . $ QScriptDebuggerValuePropertyPrivate#QScriptDebuggerValuePropertyPrivate(49f6e7a06ebc5aa8).(); |
| 59 | ~cxx . . $ QScriptDebuggerValuePropertyPrivate#`~QScriptDebuggerValuePropertyPrivate`(ced63f7c635d850d).QScriptDebuggerValuePropertyPrivatecxx . . $ QScriptDebuggerValuePropertyPrivate#(); |
| 60 | |
| 61 | QStringcxx . . $ QString# namecxx . . $ QScriptDebuggerValuePropertyPrivate#name.; |
| 62 | QScriptDebuggerValuecxx . . $ QScriptDebuggerValue# valuecxx . . $ QScriptDebuggerValuePropertyPrivate#value.; |
| 63 | QStringcxx . . $ QString# valueAsStringcxx . . $ QScriptDebuggerValuePropertyPrivate#valueAsString.; |
| 64 | QScriptValuecxx . . $ QScriptValue#::PropertyFlagscxx . . $ QScriptValue#PropertyFlags# flagscxx . . $ QScriptDebuggerValuePropertyPrivate#flags.; |
| 65 | }; |
| 66 | |
| 67 | QScriptDebuggerValuePropertyPrivatecxx . . $ QScriptDebuggerValuePropertyPrivate#::QScriptDebuggerValuePropertyPrivatecxx . . $ QScriptDebuggerValuePropertyPrivate#QScriptDebuggerValuePropertyPrivate(49f6e7a06ebc5aa8).() |
| 68 | { |
| 69 | } |
| 70 | |
| 71 | QScriptDebuggerValuePropertyPrivatecxx . . $ QScriptDebuggerValuePropertyPrivate#::~cxx . . $ QScriptDebuggerValuePropertyPrivate#`~QScriptDebuggerValuePropertyPrivate`(ced63f7c635d850d).QScriptDebuggerValuePropertyPrivatecxx . . $ QScriptDebuggerValuePropertyPrivate#() |
| 72 | { |
| 73 | } |
| 74 | |
| 75 | /*! |
| 76 | Constructs an invalid QScriptDebuggerValueProperty. |
| 77 | */ |
| 78 | QScriptDebuggerValuePropertycxx . . $ QScriptDebuggerValueProperty#::QScriptDebuggerValuePropertycxx . . $ QScriptDebuggerValueProperty#QScriptDebuggerValueProperty(49f6e7a06ebc5aa8).() |
| 79 | : d_ptr(0) |
| 80 | { |
| 81 | } |
| 82 | |
| 83 | /*! |
| 84 | Constructs a QScriptDebuggerValueProperty with the given \a name, |
| 85 | \a value and \a flags. |
| 86 | */ |
| 87 | QScriptDebuggerValuePropertycxx . . $ QScriptDebuggerValueProperty#::QScriptDebuggerValuePropertycxx . . $ QScriptDebuggerValueProperty#QScriptDebuggerValueProperty(cdaa2367caf9ade5).(const QStringcxx . . $ QString# &name, |
| 88 | const QScriptDebuggerValuecxx . . $ QScriptDebuggerValue# &value, |
| 89 | const QStringcxx . . $ QString# &valueAsString, |
| 90 | QScriptValuecxx . . $ QScriptValue#::PropertyFlagscxx . . $ QScriptValue#PropertyFlags# flags) |
| 91 | : d_ptr(new QScriptDebuggerValuePropertyPrivate) |
| 92 | { |
| 93 | d_ptr->name = name; |
| 94 | d_ptr->value = value; |
| 95 | d_ptr->valueAsString = valueAsString; |
| 96 | d_ptr->flags = flags; |
| 97 | d_ptr->ref.ref(); |
| 98 | } |
| 99 | |
| 100 | /*! |
| 101 | Constructs a QScriptDebuggerValueProperty that is a copy of the \a other property. |
| 102 | */ |
| 103 | QScriptDebuggerValuePropertycxx . . $ QScriptDebuggerValueProperty#::QScriptDebuggerValuePropertycxx . . $ QScriptDebuggerValueProperty#QScriptDebuggerValueProperty(9b4ac727a4c97e7d).(const QScriptDebuggerValuePropertycxx . . $ QScriptDebuggerValueProperty# &other) |
| 104 | : d_ptr(other.d_ptr.data()) |
| 105 | { |
| 106 | if (d_ptr) |
| 107 | d_ptr->ref.ref(); |
| 108 | } |
| 109 | |
| 110 | /*! |
| 111 | Destroys this QScriptDebuggerValueProperty. |
| 112 | */ |
| 113 | QScriptDebuggerValuePropertycxx . . $ QScriptDebuggerValueProperty#::~cxx . . $ QScriptDebuggerValueProperty#`~QScriptDebuggerValueProperty`(ced63f7c635d850d).QScriptDebuggerValuePropertycxx . . $ QScriptDebuggerValueProperty#() |
| 114 | { |
| 115 | } |
| 116 | |
| 117 | /*! |
| 118 | Assigns the \a other property to this QScriptDebuggerValueProperty. |
| 119 | */ |
| 120 | QScriptDebuggerValuePropertycxx . . $ QScriptDebuggerValueProperty# &QScriptDebuggerValuePropertycxx . . $ QScriptDebuggerValueProperty#::operatorcxx . . $ QScriptDebuggerValueProperty#`operator=`(d0d4456b24195cd2).=(const QScriptDebuggerValuePropertycxx . . $ QScriptDebuggerValueProperty# &other) |
| 121 | { |
| 122 | d_ptr.assign(other.d_ptr.data()); |
| 123 | return *this; |
| 124 | } |
| 125 | |
| 126 | /*! |
| 127 | Returns the name of this QScriptDebuggerValueProperty. |
| 128 | */ |
| 129 | QStringcxx . . $ QString# QScriptDebuggerValuePropertycxx . . $ QScriptDebuggerValueProperty#::namecxx . . $ QScriptDebuggerValueProperty#name(6ef7b6c27b00b43d).() const |
| 130 | { |
| 131 | Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(const QScriptDebuggerValueProperty); |
| 132 | if (!d) |
| 133 | return QStringcxx . . $ QString#QString(ced63f7c635d850d).(); |
| 134 | return dcxx . . $ QString#QString(132dd6869045752b).->namecxx . . $ QScriptDebuggerValuePropertyPrivate#name.; |
| 135 | } |
| 136 | |
| 137 | /*! |
| 138 | Returns the value of this QScriptDebuggerValueProperty. |
| 139 | */ |
| 140 | QScriptDebuggerValuecxx . . $ QScriptDebuggerValue# QScriptDebuggerValuePropertycxx . . $ QScriptDebuggerValueProperty#::valuecxx . . $ QScriptDebuggerValueProperty#value(73c7f2fc16c9f19c).() const |
| 141 | { |
| 142 | Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(const QScriptDebuggerValueProperty); |
| 143 | if (!d) |
| 144 | return QScriptDebuggerValuecxx . . $ QScriptDebuggerValue#QScriptDebuggerValue(49f6e7a06ebc5aa8).(); |
| 145 | return d->value; |
| 146 | } |
| 147 | |
| 148 | QStringcxx . . $ QString# QScriptDebuggerValuePropertycxx . . $ QScriptDebuggerValueProperty#::valueAsStringcxx . . $ QScriptDebuggerValueProperty#valueAsString(6ef7b6c27b00b43d).() const |
| 149 | { |
| 150 | Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(const QScriptDebuggerValueProperty); |
| 151 | if (!d) |
| 152 | return QStringcxx . . $ QString#QString(ced63f7c635d850d).(); |
| 153 | return dcxx . . $ QString#QString(132dd6869045752b).->valueAsStringcxx . . $ QScriptDebuggerValuePropertyPrivate#valueAsString.; |
| 154 | } |
| 155 | |
| 156 | /*! |
| 157 | Returns the flags of this QScriptDebuggerValueProperty. |
| 158 | */ |
| 159 | QScriptValuecxx . . $ QScriptValue#::PropertyFlagscxx . . $ QScriptValue#PropertyFlags# QScriptDebuggerValuePropertycxx . . $ QScriptDebuggerValueProperty#::flagscxx . . $ QScriptDebuggerValueProperty#flags(97d37d1154f9e612).() const |
| 160 | { |
| 161 | Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(const QScriptDebuggerValueProperty); |
| 162 | if (!d) |
| 163 | return {}; |
| 164 | return d->flags; |
| 165 | } |
| 166 | |
| 167 | /*! |
| 168 | Returns true if this QScriptDebuggerValueProperty is valid, otherwise |
| 169 | returns false. |
| 170 | */ |
| 171 | bool QScriptDebuggerValuePropertycxx . . $ QScriptDebuggerValueProperty#::isValidcxx . . $ QScriptDebuggerValueProperty#isValid(50ce9a9e25b4a850).() const |
| 172 | { |
| 173 | Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(const QScriptDebuggerValueProperty); |
| 174 | return (d != 0); |
| 175 | } |
| 176 | |
| 177 | /*! |
| 178 | \relates QScriptDebuggerValueProperty |
| 179 | |
| 180 | Writes the given \a property to the specified \a stream. |
| 181 | */ |
| 182 | QDataStreamcxx . . $ QDataStream# &operatorcxx . . $ `operator<<`(d0bf574a9cc9fec9).<<(QDataStreamcxx . . $ QDataStream# &out, const QScriptDebuggerValuePropertycxx . . $ QScriptDebuggerValueProperty# &property) |
| 183 | { |
| 184 | out <<cxx . . $ `operator<<`(840080fcc32a7f1c). property.namecxx . . $ QScriptDebuggerValueProperty#name(6ef7b6c27b00b43d).(); |
| 185 | out <<cxx . . $ `operator<<`(fa4bf4885426cb72). property.valuecxx . . $ QScriptDebuggerValueProperty#value(73c7f2fc16c9f19c).(); |
| 186 | out <<cxx . . $ `operator<<`(840080fcc32a7f1c). property.valueAsStringcxx . . $ QScriptDebuggerValueProperty#valueAsString(6ef7b6c27b00b43d).(); |
| 187 | out <<cxx . . $ QDataStream#`operator<<`(1483334db06c9178). (quint32cxx . . $ quint32#)property.flags(); |
| 188 | return out; |
| 189 | } |
| 190 | |
| 191 | /*! |
| 192 | \relates QScriptDebuggerValueProperty |
| 193 | |
| 194 | Reads a QScriptDebuggerValueProperty from the specified \a stream into the |
| 195 | given \a property. |
| 196 | */ |
| 197 | QDataStreamcxx . . $ QDataStream# &operatorcxx . . $ `operator>>`(1550a37d1e3837a0).>>(QDataStreamcxx . . $ QDataStream# &in, QScriptDebuggerValuePropertycxx . . $ QScriptDebuggerValueProperty# &property) |
| 198 | { |
| 199 | QStringcxx . . $ QString# namecxx . . $ QString#QString(ced63f7c635d850d).; |
| 200 | QScriptDebuggerValuecxx . . $ QScriptDebuggerValue# valuecxx . . $ QScriptDebuggerValue#QScriptDebuggerValue(49f6e7a06ebc5aa8).; |
| 201 | QStringcxx . . $ QString# valueAsStringcxx . . $ QString#QString(ced63f7c635d850d).; |
| 202 | quint32cxx . . $ quint32# flags; |
| 203 | in >>cxx . . $ `operator>>`(66d14281a2151d). name; |
| 204 | in >>cxx . . $ `operator>>`(b9ebd4a0699e85f9). value; |
| 205 | in >>cxx . . $ `operator>>`(66d14281a2151d). valueAsString; |
| 206 | in >>cxx . . $ QDataStream#`operator>>`(a72c8f61547c6abb). flags; |
| 207 | property =cxx . . $ QScriptDebuggerValueProperty#`operator=`(d0d4456b24195cd2). QScriptDebuggerValueProperty( |
| 208 | name, value, valueAsString, QScriptValue::PropertyFlags(flags)); |
| 209 | return in; |
| 210 | } |
| 211 | |
| 212 | QDataStreamcxx . . $ QDataStream# &operatorcxx . . $ `operator<<`(6a672beb6fc5b4d1).<<(QDataStreamcxx . . $ QDataStream# &out, const QScriptDebuggerObjectSnapshotDeltacxx . . $ QScriptDebuggerObjectSnapshotDelta# &delta) |
| 213 | { |
| 214 | out <<cxx . . $ `operator<<`(6a672beb6fc5b4d1). delta.removedProperties; |
| 215 | out <<cxx . . $ `operator<<`(6a672beb6fc5b4d1). delta.changedProperties; |
| 216 | out <<cxx . . $ `operator<<`(6a672beb6fc5b4d1). delta.addedProperties; |
| 217 | return out; |
| 218 | } |
| 219 | |
| 220 | QDataStreamcxx . . $ QDataStream# &operatorcxx . . $ `operator>>`(942a1019148fe38d).>>(QDataStreamcxx . . $ QDataStream# &in, QScriptDebuggerObjectSnapshotDeltacxx . . $ QScriptDebuggerObjectSnapshotDelta# &delta) |
| 221 | { |
| 222 | in >>cxx . . $ `operator>>`(942a1019148fe38d). delta.removedProperties; |
| 223 | in >>cxx . . $ `operator>>`(942a1019148fe38d). delta.changedProperties; |
| 224 | in >>cxx . . $ `operator>>`(942a1019148fe38d). delta.addedProperties; |
| 225 | return in; |
| 226 | } |
| 227 | |
| 228 | QT_END_NAMESPACEcxx . . $ `<external>/15045578679651060896/qglobal.h:149:10`! |