debugger.h

00001 // -*- c-basic-offset: 2 -*-
00002 /*
00003  *  This file is part of the KDE libraries
00004  *  Copyright (C) 1999-2001 Harri Porten (porten@kde.org)
00005  *  Copyright (C) 2001 Peter Kelly (pmk@post.com)
00006  *
00007  *  This library is free software; you can redistribute it and/or
00008  *  modify it under the terms of the GNU Lesser General Public
00009  *  License as published by the Free Software Foundation; either
00010  *  version 2 of the License, or (at your option) any later version.
00011  *
00012  *  This library is distributed in the hope that it will be useful,
00013  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  *  Lesser General Public License for more details.
00016  *
00017  *  You should have received a copy of the GNU Lesser General Public
00018  *  License along with this library; if not, write to the Free Software
00019  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00020  *
00021  */
00022 
00023 #ifndef _KJSDEBUGGER_H_
00024 #define _KJSDEBUGGER_H_
00025 
00026 #include "interpreter.h"
00027 
00028 namespace KJS {
00029 
00030   class DebuggerImp;
00031   class Interpreter;
00032   class ExecState;
00033   class Value;
00034   class Object;
00035   class UString;
00036   class List;
00037   class Completion;
00038 
00052   class KJS_EXPORT Debugger {
00053   public:
00054 
00058     Debugger();
00059 
00064     virtual ~Debugger();
00065 
00066     DebuggerImp *imp() const { return rep; }
00067 
00083     void attach(Interpreter *interp);
00084 
00093     void detach(Interpreter *interp);
00094 
00114     virtual bool sourceParsed(ExecState *exec, int sourceId,
00115                   const UString &source, int errorLine);
00116 
00131     virtual bool sourceUnused(ExecState *exec, int sourceId);
00132 
00146     virtual bool exception(ExecState *exec, const Value &value,
00147                bool inTryCatch);
00148 
00162     virtual bool atStatement(ExecState *exec);
00163 
00191     virtual bool enterContext(ExecState *exec);
00192 
00202     virtual bool exitContext(ExecState *exec, const Completion &completion);
00203 
00204   private:
00205     DebuggerImp *rep;
00206   };
00207 
00208 }
00209 
00210 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys