zorba::ZorbaDebuggerClient Class Reference

Client instance of Zorba debugger. More...

#include <zorba/debugger_client.h>

List of all members.

Public Member Functions

virtual void addBreakpoint (const String &anExpr)=0
 Set a new watchpoint.
virtual void addBreakpoint (const unsigned int aLineNo)=0
 Set a new breakpoint in the main query.
virtual void addBreakpoint (const String &aFileName, const unsigned int aLineNo)=0
 Set a new breakpoint.
virtual bool clearBreakpoint (unsigned int anId)=0
 Remove a breakpoint or watchpoint of the given id.
virtual void clearBreakpoints ()=0
 Remove all breakpoints on the remote query.
virtual void clearBreakpoints (std::list< unsigned int > &Ids)=0
 Remove a breakpoint or watchpoint of the given collection of ids.
virtual void eval (String &anExpr)=0
 Evaluate an XQuery expression on the remote debugger server.
virtual std::list< VariablegetAllVariables ()=0
 Get all variables that are in scope in the remote query.
virtual std::map< unsigned int,
String
getBreakpoints () const =0
 Get all breakpoints set on the remote query.
virtual std::list< VariablegetGlobalVariables ()=0
 Get all global variables that are in scope in the remote query.
virtual std::list< VariablegetLocalVariables ()=0
 Get all local variables that are in scope in the remote query.
virtual QueryLocationgetLocation () const =0
 Get the current location of the remote query.
virtual bool isQueryIdle () const =0
 Indicates if the query is idle.
virtual bool isQueryRunning () const =0
 Indicates if the query is running.
virtual bool isQuerySuspended () const =0
 Indicates if the query is suspended.
virtual bool isQueryTerminated () const =0
 Indicates if the query is terminated.
virtual void quit ()=0
 Request the remote query quit and the debugger server to shutdown.
virtual void registerEventHandler (DebuggerEventHandler *aDebuggerEventHandler)=0
 Register a debuggere vent handler to which runtime events on the remote debugger server are reported.
virtual void resume ()=0
 Request the remote query to resume.
virtual void run ()=0
 Request the remote query to run.
virtual void suspend ()=0
 Request the remote query to suspend.
virtual void terminate ()=0
 Request the remote query to terminate.
virtual ~ZorbaDebuggerClient ()

Static Public Member Functions

static ZorbaDebuggerClientcreateClient (unsigned short aRequestPortno, unsigned short aEventPortno)
 Gets a new instance of Zorba debugger client.


Detailed Description

Client instance of Zorba debugger.

ZorbaDebuggerClient API provides to send commands to a remote debugger and to handle events from it.

Definition at line 50 of file debugger_client.h.


Constructor & Destructor Documentation

virtual zorba::ZorbaDebuggerClient::~ZorbaDebuggerClient (  )  [inline, virtual]

Definition at line 55 of file debugger_client.h.


Member Function Documentation

virtual void zorba::ZorbaDebuggerClient::addBreakpoint ( const String anExpr  )  [pure virtual]

Set a new watchpoint.

A watchpoint suspend the query execution when the return value of its XQuery expression is true.

Parameters:
anExpr String XQuery expression to be evaluated.

virtual void zorba::ZorbaDebuggerClient::addBreakpoint ( const unsigned int  aLineNo  )  [pure virtual]

Set a new breakpoint in the main query.

Parameters:
aLineNo unsigned int Line number in the main query.

virtual void zorba::ZorbaDebuggerClient::addBreakpoint ( const String aFileName,
const unsigned int  aLineNo 
) [pure virtual]

Set a new breakpoint.

Parameters:
aFileName String Filename of the query or module.
aLineNo unsigned int Line number in the file.

virtual bool zorba::ZorbaDebuggerClient::clearBreakpoint ( unsigned int  anId  )  [pure virtual]

Remove a breakpoint or watchpoint of the given id.

Parameters:
anId unsigned int the breakpoint/watchpoint id
Returns:
true if the breakpoint id is correct.

virtual void zorba::ZorbaDebuggerClient::clearBreakpoints (  )  [pure virtual]

Remove all breakpoints on the remote query.

virtual void zorba::ZorbaDebuggerClient::clearBreakpoints ( std::list< unsigned int > &  Ids  )  [pure virtual]

Remove a breakpoint or watchpoint of the given collection of ids.

Parameters:
Ids std::list<unsigned int> List of the breakpoint/watchpoint ids
Returns:
true if all breakpoint ids are correct.

static ZorbaDebuggerClient* zorba::ZorbaDebuggerClient::createClient ( unsigned short  aRequestPortno,
unsigned short  aEventPortno 
) [static]

Gets a new instance of Zorba debugger client.

This factory method create a new instance of the debugger. The parameters are the network ports for the request and event connection (by default: 8000 for commands and 9000 for events):

 ZorbaDebuggerClient* lClient = ZorbaDebuggerClient::createClient(8000, 9000);
 

Parameters:
unsigned short aRequestPortno Network port number for debugging commands
unsigned short aEventPortno
Returns:
ZorbaDebuggerClient the newly created debugger client instance.

virtual void zorba::ZorbaDebuggerClient::eval ( String anExpr  )  [pure virtual]

Evaluate an XQuery expression on the remote debugger server.

eval() sends an XQuery expression to the remote debugger server for evaluation. This expression can use debugee query global and locals variables. Because eval() can eventually compute very complex expression, the evaluation is done in a separate thread. Once the expression computed, the server fires an event to the client with the result or an error description if an error happened during evaluation.

virtual std::list<Variable> zorba::ZorbaDebuggerClient::getAllVariables (  )  [pure virtual]

Get all variables that are in scope in the remote query.

Returns:
a list of all variables that are in scope in the remote query.

virtual std::map<unsigned int, String> zorba::ZorbaDebuggerClient::getBreakpoints (  )  const [pure virtual]

Get all breakpoints set on the remote query.

Returns:
a map of all breakpoints with their associated id.

virtual std::list<Variable> zorba::ZorbaDebuggerClient::getGlobalVariables (  )  [pure virtual]

Get all global variables that are in scope in the remote query.

Returns:
a list of all global variables that are in scope in the remote query.

virtual std::list<Variable> zorba::ZorbaDebuggerClient::getLocalVariables (  )  [pure virtual]

Get all local variables that are in scope in the remote query.

Returns:
a list of all local variables that are in scope in the remote query.

virtual QueryLocation* zorba::ZorbaDebuggerClient::getLocation (  )  const [pure virtual]

Get the current location of the remote query.

return the current location of the query or null is the query didn't start yet.

virtual bool zorba::ZorbaDebuggerClient::isQueryIdle (  )  const [pure virtual]

Indicates if the query is idle.

Returns:
true if the query is idle, false otherwise.

virtual bool zorba::ZorbaDebuggerClient::isQueryRunning (  )  const [pure virtual]

Indicates if the query is running.

Returns:
true if the query is running, false otherwise.

virtual bool zorba::ZorbaDebuggerClient::isQuerySuspended (  )  const [pure virtual]

Indicates if the query is suspended.

Returns:
true if the query is suspended, false otherwise.

virtual bool zorba::ZorbaDebuggerClient::isQueryTerminated (  )  const [pure virtual]

Indicates if the query is terminated.

Returns:
true if the query is terminated, false otherwise.

virtual void zorba::ZorbaDebuggerClient::quit (  )  [pure virtual]

Request the remote query quit and the debugger server to shutdown.

virtual void zorba::ZorbaDebuggerClient::registerEventHandler ( DebuggerEventHandler aDebuggerEventHandler  )  [pure virtual]

Register a debuggere vent handler to which runtime events on the remote debugger server are reported.

Parameters:
aDebuggerEventHandler DebuggerEventHandler Handler for runtime events comming from the remote debugger server.

virtual void zorba::ZorbaDebuggerClient::resume (  )  [pure virtual]

Request the remote query to resume.

virtual void zorba::ZorbaDebuggerClient::run (  )  [pure virtual]

Request the remote query to run.

virtual void zorba::ZorbaDebuggerClient::suspend (  )  [pure virtual]

Request the remote query to suspend.

virtual void zorba::ZorbaDebuggerClient::terminate (  )  [pure virtual]

Request the remote query to terminate.


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