1 | /* This file is part of the KDE project |
2 | Copyright 2008 Dominik Haumann <dhaumann kde org> |
3 | |
4 | This library is free software; you can redistribute it and/or |
5 | modify it under the terms of the GNU Library General Public |
6 | License version 2 as published by the Free Software Foundation. |
7 | |
8 | This library is distributed in the hope that it will be useful, |
9 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
11 | Library General Public License for more details. |
12 | |
13 | You should have received a copy of the GNU Library General Public License |
14 | along with this library; see the file COPYING.LIB. If not, write to |
15 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
16 | Boston, MA 02110-1301, USA. |
17 | */ |
18 | |
19 | #ifndef KATE_BACKTRACEPARSER_H |
20 | #define KATE_BACKTRACEPARSER_H |
21 | |
22 | #include <QList> |
23 | #include <QString> |
24 | |
25 | class BtInfo |
26 | { |
27 | public: |
28 | enum Type { |
29 | Source = 0, |
30 | Lib, |
31 | Unknown, |
32 | Invalid |
33 | }; |
34 | |
35 | /** |
36 | * Default constructor => invalid element |
37 | */ |
38 | BtInfo () |
39 | : step (-1) |
40 | , line (-1) |
41 | , type (Invalid) |
42 | { |
43 | } |
44 | |
45 | public: |
46 | QString original; |
47 | QString filename; |
48 | QString function; |
49 | QString address; |
50 | int step; |
51 | int line; |
52 | |
53 | Type type; |
54 | }; |
55 | |
56 | namespace KateBtParser { |
57 | |
58 | QList<BtInfo> parseBacktrace(const QString& bt); |
59 | |
60 | } |
61 | |
62 | #endif //KATE_BACKTRACEPARSER_H |
63 | |
64 | // kate: space-indent on; indent-width 2; replace-tabs on; |
65 | |