Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
V4CommandHandler Class Referenceabstract
+ Inheritance diagram for V4CommandHandler:
+ Collaboration diagram for V4CommandHandler:

Public Member Functions

 V4CommandHandler (const QString &command)
 
virtual ~V4CommandHandler ()
 
QString command () const
 
void handle (const QJsonObject &request, QV4DebugServiceImpl *s)
 
virtual void handleRequest ()=0
 

Protected Member Functions

void addCommand ()
 
void addRequestSequence ()
 
void addSuccess (bool success)
 
void addBody (const QJsonValue &body)
 
void addRunning ()
 
void createErrorResponse (const QString &msg)
 
int requestSequenceNr () const
 

Protected Attributes

QString cmd
 
QJsonObject req
 
QJsonValue seq
 
QV4DebugServiceImpldebugService
 
QJsonObject response
 

Detailed Description

Definition at line 40 of file qv4debugservice.cpp.

Constructor & Destructor Documentation

◆ V4CommandHandler()

V4CommandHandler::V4CommandHandler ( const QString & command)
inline

Definition at line 43 of file qv4debugservice.cpp.

◆ ~V4CommandHandler()

virtual V4CommandHandler::~V4CommandHandler ( )
inlinevirtual

Definition at line 47 of file qv4debugservice.cpp.

Member Function Documentation

◆ addBody()

void V4CommandHandler::addBody ( const QJsonValue & body)
inlineprotected

Definition at line 78 of file qv4debugservice.cpp.

References QJsonObject::insert(), QStringLiteral, and response.

+ Here is the call graph for this function:

◆ addCommand()

void V4CommandHandler::addCommand ( )
inlineprotected

Definition at line 75 of file qv4debugservice.cpp.

References cmd, QJsonObject::insert(), QStringLiteral, and response.

+ Here is the call graph for this function:

◆ addRequestSequence()

void V4CommandHandler::addRequestSequence ( )
inlineprotected

Definition at line 76 of file qv4debugservice.cpp.

References QJsonObject::insert(), QStringLiteral, response, and seq.

Referenced by createErrorResponse().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addRunning()

void V4CommandHandler::addRunning ( )
inlineprotected

Definition at line 83 of file qv4debugservice.cpp.

References QV4DebugServiceImpl::debuggerAgent, debugService, QJsonObject::insert(), QV4DebuggerAgent::isRunning(), QStringLiteral, and response.

Referenced by createErrorResponse().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addSuccess()

void V4CommandHandler::addSuccess ( bool success)
inlineprotected

Definition at line 77 of file qv4debugservice.cpp.

References QJsonObject::insert(), QStringLiteral, and response.

Referenced by createErrorResponse().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ command()

QString V4CommandHandler::command ( ) const
inline

Definition at line 50 of file qv4debugservice.cpp.

References cmd.

Referenced by createErrorResponse(), and handle().

+ Here is the caller graph for this function:

◆ createErrorResponse()

void V4CommandHandler::createErrorResponse ( const QString & msg)
inlineprotected

Definition at line 88 of file qv4debugservice.cpp.

References addRequestSequence(), addRunning(), addSuccess(), command(), QJsonObject::insert(), QStringLiteral, req, response, and QJsonObject::value().

Referenced by UnknownV4CommandHandler::handleRequest().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handle()

void V4CommandHandler::handle ( const QJsonObject & request,
QV4DebugServiceImpl * s )
inline

Definition at line 52 of file qv4debugservice.cpp.

References command(), debugService, handleRequest(), QJsonObject::isEmpty(), qDebug, QStringLiteral, req, request, response, QV4DebugServiceImpl::send(), seq, TRACE_PROTOCOL, and QJsonObject::value().

+ Here is the call graph for this function:

◆ handleRequest()

virtual void V4CommandHandler::handleRequest ( )
pure virtual

Implemented in UnknownV4CommandHandler.

Referenced by handle().

+ Here is the caller graph for this function:

◆ requestSequenceNr()

int V4CommandHandler::requestSequenceNr ( ) const
inlineprotected

Definition at line 98 of file qv4debugservice.cpp.

References seq, and QJsonValue::toInt().

+ Here is the call graph for this function:

Member Data Documentation

◆ cmd

QString V4CommandHandler::cmd
protected

Definition at line 102 of file qv4debugservice.cpp.

Referenced by addCommand(), and command().

◆ debugService

QV4DebugServiceImpl* V4CommandHandler::debugService
protected

Definition at line 105 of file qv4debugservice.cpp.

Referenced by addRunning(), and handle().

◆ req

QJsonObject V4CommandHandler::req
protected

◆ response

QJsonObject V4CommandHandler::response
protected

◆ seq

QJsonValue V4CommandHandler::seq
protected

Definition at line 104 of file qv4debugservice.cpp.

Referenced by addRequestSequence(), handle(), and requestSequenceNr().


The documentation for this class was generated from the following file: