KDevelop API Documentation

src/debugger.h

Go to the documentation of this file.
00001 #ifndef __DEBUGGER_H__ 00002 #define __DEBUGGER_H__ 00003 00004 #include <qvaluelist.h> 00005 00006 #include "kdevdebugger.h" 00007 00008 #include <kparts/part.h> 00009 #include <ktexteditor/markinterface.h> 00010 00011 #include <kdeversion.h> 00012 #if (KDE_VERSION > 305) 00013 # include <ktexteditor/markinterfaceextension.h> 00014 #else 00015 # include "kde30x_markinterfaceextension.h" 00016 #endif 00017 00025 class BPItem 00026 { 00027 public: 00031 BPItem() : m_fileName(""), m_lineNum(0) 00032 {} 00033 00034 BPItem( const QString& fileName, const uint lineNum) 00035 : m_fileName(fileName), 00036 m_lineNum(lineNum) 00037 {} 00038 00039 uint lineNum() const { return m_lineNum; } 00040 QString fileName() const { return m_fileName; } 00041 00042 bool operator==( const BPItem& rhs ) const 00043 { 00044 return (m_fileName == rhs.m_fileName 00045 && m_lineNum == rhs.m_lineNum); 00046 } 00047 00048 private: 00049 QString m_fileName; 00050 uint m_lineNum; 00051 }; 00052 00053 00059 class Debugger : public KDevDebugger 00060 { 00061 Q_OBJECT 00062 00063 public: 00064 00067 static Debugger *getInstance(); 00068 00080 void setBreakpoint(const QString &fileName, int lineNum, 00081 int id, bool enabled, bool pending); 00082 00089 void gotoExecutionPoint(const KURL &url, int lineNum=-1); 00090 00094 void clearExecutionPoint(); 00095 00096 protected: 00097 00098 Debugger(); 00099 ~Debugger(); 00100 00101 private slots: 00102 00109 void partAdded( KParts::Part* part ); 00110 00117 void marksChanged(); 00118 00119 private: 00120 enum MarkType { 00121 Bookmark = KTextEditor::MarkInterface::markType01, 00122 Breakpoint = KTextEditor::MarkInterface::markType02, 00123 ActiveBreakpoint = KTextEditor::MarkInterface::markType03, 00124 ReachedBreakpoint = KTextEditor::MarkInterface::markType04, 00125 DisabledBreakpoint = KTextEditor::MarkInterface::markType05, 00126 ExecutionPoint = KTextEditor::MarkInterface::markType06 00127 }; 00128 00129 static Debugger *s_instance; 00130 QValueList<BPItem> BPList; 00131 }; 00132 00133 #endif
KDE Logo
This file is part of the documentation for KDevelop Version 3.0.4.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Oct 19 08:01:52 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003