-
Notifications
You must be signed in to change notification settings - Fork 6
/
debugmanager.h
58 lines (39 loc) · 1.06 KB
/
debugmanager.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#ifndef DEBUGMANAGER_H
#define DEBUGMANAGER_H
#include <string>
#include <vector>
#include <QObject>
#include <QColor>
#include <QList>
#include <QRegExp>
#include "traceentry.h"
class QRegExp;
namespace Templar {
class TemplateEventHandler;
class DebugManager : public QObject
{
Q_OBJECT
public:
DebugManager(QObject *parent = 0);
void addEventHandler(TemplateEventHandler* handler);
int getEventCount() const;
void inspect(const TraceEntry& entry);
void setBreakpoints(const QList<QRegExp>& breakpoints) {
this->breakpoints = breakpoints;
}
public slots:
void next();
void prev();
void forward();
void rewind();
void reset(const std::vector<TraceEntry>& instHistory);
private:
bool hasBreakpoint(const QString& str) const;
private:
QList<TemplateEventHandler*> eventHandlers;
std::vector<TraceEntry> instantiationHistory;
unsigned int historyPos;
QList<QRegExp> breakpoints;
};
} // namespace Templar
#endif // DEBUGMANAGER_H