Qt 4.8
qscriptdebuggercommandschedulerfrontend.cpp
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 
45 
47 
51  : m_scheduler(scheduler), m_responseHandler(responseHandler)
52 {
53 }
54 
56 {
57 }
58 
60 {
62 }
63 
74 {
76 }
77 
85 {
87 }
88 
97 {
99 }
100 
109 {
111 }
112 
122 {
124 }
125 
131 {
133 }
134 
140 {
142 }
143 
145 {
146  return scheduleCommand(QScriptDebuggerCommand::forceReturnCommand(contextIndex, value));
147 }
148 
150 {
152 }
153 
155 {
157 }
158 
160 {
162 }
163 
165 {
167 }
168 
170 {
172 }
173 
175 {
177 }
178 
180 {
182 }
183 
185 {
187 }
188 
190 {
192 }
193 
195 {
197 }
198 
200 {
202 }
203 
205 {
207 }
208 
210 {
212 }
213 
215 {
217 }
218 
220 {
222 }
223 
225 {
227 }
228 
230 {
232 }
233 
235 {
237 }
238 
240 {
242 }
243 
245 {
247 }
248 
250 {
252 }
253 
255  int contextIndex, int lineNumber, const QStringList &path)
256 {
257  return scheduleCommand(QScriptDebuggerCommand::getPropertyExpressionValue(contextIndex, lineNumber, path));
258 }
259 
261 {
262  return scheduleCommand(QScriptDebuggerCommand::getCompletions(contextIndex, path));
263 }
264 
266  const QString &program,
267  const QString &fileName,
268  int lineNumber)
269 {
270  return scheduleCommand(QScriptDebuggerCommand::evaluateCommand(contextIndex, program, fileName, lineNumber));
271 }
272 
274 {
276 }
277 
279 {
281 }
282 
284 {
286 }
287 
289 {
291 }
292 
294  const QString &name,
295  const QScriptDebuggerValue &value)
296 {
298 }
299 
301 {
303 }
304 
306 {
308 }
309 
311 {
313 }
314 
316 {
318 }
319 
int scheduleGetCompletions(int contextIndex, const QStringList &path)
static QScriptDebuggerCommand newScriptValueIteratorCommand(const QScriptDebuggerValue &object)
static QScriptDebuggerCommand setBreakpointDataCommand(int id, const QScriptBreakpointData &data)
int scheduleStepOver(int count=1)
Instructs the front-end to step over the next script statement, and returns a unique identifier assoc...
static QScriptDebuggerCommand runToLocationCommand(const QString &fileName, int lineNumber)
static QScriptDebuggerCommand getBreakpointsCommand()
static QScriptDebuggerCommand newScriptObjectSnapshotCommand()
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
static QScriptDebuggerCommand interruptCommand()
static QScriptDebuggerCommand evaluateCommand(int contextIndex, const QString &program, const QString &fileName=QString(), int lineNumber=1)
static QScriptDebuggerCommand getContextStateCommand(int contextIndex)
int scheduleSetBreakpoint(const QString &fileName, int lineNumber)
static QScriptDebuggerCommand getPropertyExpressionValue(int contextIndex, int lineNumber, const QStringList &path)
static QScriptDebuggerCommand deleteScriptValueIteratorCommand(int id)
static QScriptDebuggerCommand getActivationObjectCommand(int contextIndex)
static QScriptDebuggerCommand getScriptDataCommand(qint64 id)
QScriptDebuggerCommandSchedulerFrontend(QScriptDebuggerCommandSchedulerInterface *scheduler, QScriptDebuggerResponseHandlerInterface *responseHandler)
static QScriptDebuggerCommand forceReturnCommand(int contextIndex, const QScriptDebuggerValue &value)
static QScriptDebuggerCommand deleteAllBreakpointsCommand()
static QScriptDebuggerCommand getContextIdCommand(int contextIndex)
static QScriptDebuggerCommand setBreakpointCommand(const QString &fileName, int lineNumber)
static QScriptDebuggerCommand stepOverCommand(int count=1)
static QScriptDebuggerCommand getBacktraceCommand()
static QScriptDebuggerCommand scriptsCheckpointCommand()
The QString class provides a Unicode character string.
Definition: qstring.h:83
static QScriptDebuggerCommand getContextInfoCommand(int contextIndex)
static QScriptDebuggerCommand scriptValueToStringCommand(const QScriptDebuggerValue &value)
int scheduleCommand(const QScriptDebuggerCommand &command)
static QScriptDebuggerCommand getContextCountCommand()
static QScriptDebuggerCommand deleteBreakpointCommand(int id)
static QScriptDebuggerCommand getScriptsDeltaCommand()
static QScriptDebuggerCommand getPropertiesByIteratorCommand(int id, int count)
static QScriptDebuggerCommand getScriptsCommand()
int scheduleSetScriptValueProperty(const QScriptDebuggerValue &object, const QString &name, const QScriptDebuggerValue &value)
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
int scheduleNewScriptValueIterator(const QScriptDebuggerValue &object)
static QScriptDebuggerCommand continueCommand()
const char * name
static QScriptDebuggerCommand stepOutCommand()
static QScriptDebuggerCommand deleteScriptObjectSnapshotCommand(int id)
The QStringList class provides a list of strings.
Definition: qstringlist.h:66
static QScriptDebuggerCommand getBreakpointDataCommand(int id)
QScriptDebuggerCommandSchedulerInterface * m_scheduler
static const char * data(const QByteArray &arr)
__int64 qint64
Definition: qglobal.h:942
The QScriptBreakpointData class contains data associated with a breakpoint.
static QScriptDebuggerCommand clearExceptionsCommand()
static QScriptDebuggerCommand contextsCheckpoint()
static QScriptDebuggerCommand getScopeChainCommand(int contextIndex)
int scheduleScriptObjectSnapshotCapture(int id, const QScriptDebuggerValue &object)
The QScriptDebuggerCommand class represents a command issued to a QScriptDebuggerFrontend.
int scheduleForceReturn(int contextIndex, const QScriptDebuggerValue &value)
static QScriptDebuggerCommand setScriptValuePropertyCommand(const QScriptDebuggerValue &object, const QString &name, const QScriptDebuggerValue &value)
The QScriptDebuggerValue class represents a script value.
int scheduleStepOut()
Instructs the front-end to step out of the current script function, and returns a unique identifier a...
static QScriptDebuggerCommand getThisObjectCommand(int contextIndex)
static QScriptDebuggerCommand resolveScriptCommand(const QString &fileName)
int scheduleScriptValueToString(const QScriptDebuggerValue &value)
static QScriptDebuggerCommand getCompletions(int contextIndex, const QStringList &path)
virtual int scheduleCommand(const QScriptDebuggerCommand &command, QScriptDebuggerResponseHandlerInterface *responseHandler)=0
int scheduleStepInto(int count=1)
Instructs the front-end to step into the next script statement, and returns a unique identifier assoc...
int scheduleEvaluate(int contextIndex, const QString &program, const QString &fileName=QString(), int lineNumber=1)
int scheduleSetBreakpointData(int id, const QScriptBreakpointData &data)
int scheduleGetPropertyExpressionValue(int contextIndex, int lineNumber, const QStringList &path)
int scheduleInterrupt()
Instructs the front-end to break at the next script statement, and returns a unique identifier associ...
static QScriptDebuggerCommand stepIntoCommand(int count=1)
static QString fileName(const QString &fileUrl)
int scheduleContinue()
Instructs the front-end to continue evaluation, and returns a unique identifier associated with this ...
QScriptDebuggerResponseHandlerInterface * m_responseHandler
int scheduleRunToLocation(const QString &fileName, int lineNumber)
Instructs the front-end to continue evaluation until the location specified by the given fileName and...
static QScriptDebuggerCommand scriptObjectSnapshotCaptureCommand(int id, const QScriptDebuggerValue &object)