zorba::ZorbaDebuggerClient Class Reference

Client instance of Zorba debugger. More...

#include <zorba/debugger_client.h>

List of all members.

Public Member Functions

virtual bool addBreakpoint (const String &anExpr)=0
 Set a new watchpoint.
virtual QueryLocation_t addBreakpoint (const unsigned int aLineNo)=0
 Set a new breakpoint in the main query.
virtual QueryLocation_t 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 bool clearBreakpoints ()=0
 Remove all breakpoints on the remote query.
virtual bool clearBreakpoints (std::list< unsigned int > &Ids)=0
 Remove a breakpoint or watchpoint of the given collection of ids.
virtual bool eval (String &anExpr) const =0
 Evaluate an XQuery expression on the remote debugger server.
virtual std::list< VariablegetAllVariables () const =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 () const =0
 Get all global variables that are in scope in the remote query.
virtual std::list< VariablegetLocalVariables () const =0
 Get all local variables that are in scope in the remote query.
virtual QueryLocation_t getLocation () const =0
 Get the current location of the remote query.
virtual StackFrame_t getStack () const =0
 Get the runtime stack frame.
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 ZorbaDebuggerClientregisterEventHandler (DebuggerEventHandler *aDebuggerEventHandler)=0
 Register a debuggere vent handler to which runtime events on the remote debugger server are reported.
virtual bool resume ()=0
 Request the remote query to resume.
virtual bool run ()=0
 Request the remote query to run.
virtual bool stepInto ()=0
 Step into the function call.
virtual bool stepOut ()=0
 Step out the function call.
virtual bool stepOver ()=0
 Step over the expression.
virtual bool suspend ()=0
 Request the remote query to suspend.
virtual bool terminate ()=0
 Request the remote query to terminate.
virtual ~ZorbaDebuggerClient ()

Static Public Member Functions

static ZorbaDebuggerClientcreateClient (std::string aServerAddress, unsigned short aRequestPortno=8000, unsigned short aEventPortno=9000)
 Gets a new instance of Zorba debugger client.
static ZorbaDebuggerClientcreateClient (unsigned short aRequestPortno=8000, unsigned short aEventPortno=9000)
 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 128 of file debugger_client.h.


Constructor & Destructor Documentation

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

Definition at line 133 of file debugger_client.h.


Member Function Documentation

virtual bool 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 QueryLocation_t 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.
Returns:
the location where the breakpoint has been set.

virtual QueryLocation_t 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.
Returns:
the location where the breakpoint has been set.

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 bool zorba::ZorbaDebuggerClient::clearBreakpoints (  )  [pure virtual]

Remove all breakpoints on the remote query.

virtual bool 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 ( std::string  aServerAddress,
unsigned short  aRequestPortno = 8000,
unsigned short  aEventPortno = 9000 
) [static]

Gets a new instance of Zorba debugger client.

This factory method create a new instance of the debugger client for remote debugging. You can specify the IP address of the debugger server. 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("192.168.0.1");
 

Parameters:
std::string aServerAddress the IP address of the debugger server.
unsigned short aRequestPortno Network port number for debugging commands.
unsigned short aEventPortno.
Returns:
ZorbaDebuggerClient the newly created debugger client instance.

static ZorbaDebuggerClient* zorba::ZorbaDebuggerClient::createClient ( unsigned short  aRequestPortno = 8000,
unsigned short  aEventPortno = 9000 
) [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 bool zorba::ZorbaDebuggerClient::eval ( String anExpr  )  const [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 (  )  const [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 (  )  const [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 (  )  const [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_t 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 StackFrame_t zorba::ZorbaDebuggerClient::getStack (  )  const [pure virtual]

Get the runtime stack frame.

Returns:
the runtime stack frame.

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 ZorbaDebuggerClient* 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 bool zorba::ZorbaDebuggerClient::resume (  )  [pure virtual]

Request the remote query to resume.

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

Request the remote query to run.

virtual bool zorba::ZorbaDebuggerClient::stepInto (  )  [pure virtual]

Step into the function call.

virtual bool zorba::ZorbaDebuggerClient::stepOut (  )  [pure virtual]

Step out the function call.

virtual bool zorba::ZorbaDebuggerClient::stepOver (  )  [pure virtual]

Step over the expression.

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

Request the remote query to suspend.

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

Request the remote query to terminate.


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