Qt 4.8
qscriptdebuggercommand_p.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
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 Digia. For licensing terms and
14 ** conditions see http://qt.digia.com/licensing. For further information
15 ** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights. These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file. Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 
42 #ifndef QSCRIPTDEBUGGERCOMMAND_P_H
43 #define QSCRIPTDEBUGGERCOMMAND_P_H
44 
45 //
46 // W A R N I N G
47 // -------------
48 //
49 // This file is not part of the Qt API. It exists purely as an
50 // implementation detail. This header file may change from version to
51 // version without notice, or even be removed.
52 //
53 // We mean it.
54 //
55 
56 #include <QtCore/qobjectdefs.h>
57 #include <QtCore/qscopedpointer.h>
58 #include <QtCore/qhash.h>
59 #include <QtCore/qvariant.h>
60 
62 
63 class QDataStream;
66 
69 {
70 public:
73 
74  enum Type {
76 
86 
93 
99 
111 
115 
119 
121 
124 
126 
127  UserCommand = 1000,
128  MaxUserCommand = 32767
129  };
130 
131  enum Attribute {
145  UserAttribute = 1000,
146  MaxUserAttribute = 32767
147  };
148 
153 
154  Type type() const;
155 
156  QVariant attribute(Attribute attribute, const QVariant &defaultValue = QVariant()) const;
157  void setAttribute(Attribute attribute, const QVariant &value);
158  QHash<Attribute, QVariant> attributes() const;
159 
160  QString fileName() const;
161  void setFileName(const QString &fileName);
162 
163  int lineNumber() const;
164  void setLineNumber(int lineNumber);
165 
166  qint64 scriptId() const;
167  void setScriptId(qint64 id);
168 
169  QString program() const;
170  void setProgram(const QString &program);
171 
172  int breakpointId() const;
173  void setBreakpointId(int id);
174 
175  QScriptBreakpointData breakpointData() const;
176  void setBreakpointData(const QScriptBreakpointData &data);
177 
178  QScriptDebuggerValue scriptValue() const;
179  void setScriptValue(const QScriptDebuggerValue &value);
180 
181  int contextIndex() const;
182  void setContextIndex(int index);
183 
184  int iteratorId() const;
185  void setIteratorId(int id);
186 
187  QString name() const;
188  void setName(const QString &name);
189 
190  QScriptDebuggerValue subordinateScriptValue() const;
191  void setSubordinateScriptValue(const QScriptDebuggerValue &value);
192 
193  int snapshotId() const;
194  void setSnapshotId(int id);
195 
196  QScriptDebuggerCommand &operator=(const QScriptDebuggerCommand &other);
197 
198  bool operator==(const QScriptDebuggerCommand &other) const;
199  bool operator!=(const QScriptDebuggerCommand &other) const;
200 
201  static QScriptDebuggerCommand interruptCommand();
202  static QScriptDebuggerCommand continueCommand();
203  static QScriptDebuggerCommand stepIntoCommand(int count = 1);
204  static QScriptDebuggerCommand stepOverCommand(int count = 1);
205  static QScriptDebuggerCommand stepOutCommand();
206  static QScriptDebuggerCommand runToLocationCommand(const QString &fileName, int lineNumber);
207  static QScriptDebuggerCommand runToLocationCommand(qint64 scriptId, int lineNumber);
208  static QScriptDebuggerCommand forceReturnCommand(int contextIndex, const QScriptDebuggerValue &value);
209  static QScriptDebuggerCommand resumeCommand();
210 
211  static QScriptDebuggerCommand setBreakpointCommand(const QString &fileName, int lineNumber);
212  static QScriptDebuggerCommand setBreakpointCommand(const QScriptBreakpointData &data);
213  static QScriptDebuggerCommand deleteBreakpointCommand(int id);
214  static QScriptDebuggerCommand deleteAllBreakpointsCommand();
215  static QScriptDebuggerCommand getBreakpointsCommand();
216  static QScriptDebuggerCommand getBreakpointDataCommand(int id);
217  static QScriptDebuggerCommand setBreakpointDataCommand(int id, const QScriptBreakpointData &data);
218 
219  static QScriptDebuggerCommand getScriptsCommand();
220  static QScriptDebuggerCommand getScriptDataCommand(qint64 id);
221  static QScriptDebuggerCommand scriptsCheckpointCommand();
222  static QScriptDebuggerCommand getScriptsDeltaCommand();
223  static QScriptDebuggerCommand resolveScriptCommand(const QString &fileName);
224 
225  static QScriptDebuggerCommand getBacktraceCommand();
226  static QScriptDebuggerCommand getContextCountCommand();
227  static QScriptDebuggerCommand getContextStateCommand(int contextIndex);
228  static QScriptDebuggerCommand getContextInfoCommand(int contextIndex);
229  static QScriptDebuggerCommand getContextIdCommand(int contextIndex);
230  static QScriptDebuggerCommand getThisObjectCommand(int contextIndex);
231  static QScriptDebuggerCommand getActivationObjectCommand(int contextIndex);
232  static QScriptDebuggerCommand getScopeChainCommand(int contextIndex);
233  static QScriptDebuggerCommand contextsCheckpoint();
234  static QScriptDebuggerCommand getPropertyExpressionValue(int contextIndex, int lineNumber,
235  const QStringList &path);
236  static QScriptDebuggerCommand getCompletions(int contextIndex, const QStringList &path);
237 
238  static QScriptDebuggerCommand newScriptObjectSnapshotCommand();
239  static QScriptDebuggerCommand scriptObjectSnapshotCaptureCommand(int id, const QScriptDebuggerValue &object);
240  static QScriptDebuggerCommand deleteScriptObjectSnapshotCommand(int id);
241 
242  static QScriptDebuggerCommand newScriptValueIteratorCommand(const QScriptDebuggerValue &object);
243  static QScriptDebuggerCommand getPropertiesByIteratorCommand(int id, int count);
244  static QScriptDebuggerCommand deleteScriptValueIteratorCommand(int id);
245 
246  static QScriptDebuggerCommand evaluateCommand(int contextIndex, const QString &program,
247  const QString &fileName = QString(),
248  int lineNumber = 1);
249 
250  static QScriptDebuggerCommand setScriptValuePropertyCommand(const QScriptDebuggerValue &object,
251  const QString &name,
252  const QScriptDebuggerValue &value);
253  static QScriptDebuggerCommand scriptValueToStringCommand(const QScriptDebuggerValue &value);
254 
255  static QScriptDebuggerCommand clearExceptionsCommand();
256 
257 private:
259 
261 };
262 
265 
267 
268 #endif
The QVariant class acts like a union for the most common Qt data types.
Definition: qvariant.h:92
int type
Definition: qmetatype.cpp:239
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
Q_AUTOTEST_EXPORT QDataStream & operator<<(QDataStream &, const QScriptDebuggerCommand &)
bool operator!=(QBool b1, bool b2)
Definition: qglobal.h:2026
The QString class provides a Unicode character string.
Definition: qstring.h:83
The QHash class is a template class that provides a hash-table-based dictionary.
Definition: qdatastream.h:66
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
const char * name
The QStringList class provides a list of strings.
Definition: qstringlist.h:66
static const char * data(const QByteArray &arr)
__int64 qint64
Definition: qglobal.h:942
The QScriptBreakpointData class contains data associated with a breakpoint.
The QScriptDebuggerCommand class represents a command issued to a QScriptDebuggerFrontend.
The QScriptDebuggerValue class represents a script value.
QScopedPointer< QScriptDebuggerCommandPrivate > d_ptr
#define Q_AUTOTEST_EXPORT
Definition: qglobal.h:1510
quint16 index
#define Q_DECLARE_PRIVATE(Class)
Definition: qglobal.h:2467
The QDataStream class provides serialization of binary data to a QIODevice.
Definition: qdatastream.h:71
Q_AUTOTEST_EXPORT QDataStream & operator>>(QDataStream &, QScriptDebuggerCommand &)
static QString fileName(const QString &fileUrl)
bool operator==(QBool b1, bool b2)
Definition: qglobal.h:2023