Changeset View
Changeset View
Standalone View
Standalone View
languages/clang/util/clangtypes.h
Show All 21 Lines | |||||
22 | 22 | | |||
23 | #ifndef CLANGTYPES_H | 23 | #ifndef CLANGTYPES_H | ||
24 | #define CLANGTYPES_H | 24 | #define CLANGTYPES_H | ||
25 | 25 | | |||
26 | #include <clang-c/Index.h> | 26 | #include <clang-c/Index.h> | ||
27 | 27 | | |||
28 | #include <util/path.h> | 28 | #include <util/path.h> | ||
29 | 29 | | |||
30 | #include "clangprivateexport.h" | ||||
31 | | ||||
30 | #include <iterator> | 32 | #include <iterator> | ||
31 | 33 | | |||
32 | class QTextStream; | 34 | class QTextStream; | ||
33 | 35 | | |||
34 | namespace KTextEditor { | 36 | namespace KTextEditor { | ||
35 | class Cursor; | 37 | class Cursor; | ||
36 | class Range; | 38 | class Range; | ||
37 | } | 39 | } | ||
▲ Show 20 Lines • Show All 55 Lines • ▼ Show 20 Line(s) | 87 | public: | |||
93 | operator KDevelop::CursorInRevision() const; | 95 | operator KDevelop::CursorInRevision() const; | ||
94 | 96 | | |||
95 | operator CXSourceLocation() const; | 97 | operator CXSourceLocation() const; | ||
96 | 98 | | |||
97 | private: | 99 | private: | ||
98 | CXSourceLocation location; | 100 | CXSourceLocation location; | ||
99 | }; | 101 | }; | ||
100 | 102 | | |||
101 | class ClangRange | 103 | class KDEVCLANGPRIVATE_EXPORT ClangRange | ||
102 | { | 104 | { | ||
103 | public: | 105 | public: | ||
104 | ClangRange(CXSourceRange range); | 106 | ClangRange(CXSourceRange range); | ||
105 | 107 | | |||
106 | ~ClangRange(); | 108 | ~ClangRange(); | ||
107 | 109 | | |||
108 | ClangLocation start() const; | 110 | ClangLocation start() const; | ||
109 | ClangLocation end() const; | 111 | ClangLocation end() const; | ||
110 | 112 | | |||
111 | CXSourceRange range() const; | 113 | CXSourceRange range() const; | ||
112 | 114 | | |||
113 | KDevelop::DocumentRange toDocumentRange() const; | 115 | KDevelop::DocumentRange toDocumentRange() const; | ||
114 | 116 | | |||
115 | KTextEditor::Range toRange() const; | 117 | KTextEditor::Range toRange() const; | ||
116 | 118 | | |||
117 | KDevelop::RangeInRevision toRangeInRevision() const; | 119 | KDevelop::RangeInRevision toRangeInRevision() const; | ||
118 | 120 | | |||
119 | private: | 121 | private: | ||
120 | CXSourceRange m_range; | 122 | CXSourceRange m_range; | ||
121 | }; | 123 | }; | ||
122 | 124 | | |||
123 | class ClangTokens | 125 | class KDEVCLANGPRIVATE_EXPORT ClangTokens | ||
124 | { | 126 | { | ||
125 | public: | 127 | public: | ||
126 | ClangTokens(CXTranslationUnit unit, CXSourceRange range); | 128 | ClangTokens(CXTranslationUnit unit, CXSourceRange range); | ||
127 | ClangTokens(const ClangTokens&) = delete; | 129 | ClangTokens(const ClangTokens&) = delete; | ||
128 | ClangTokens& operator=(const ClangTokens&) = delete; | 130 | ClangTokens& operator=(const ClangTokens&) = delete; | ||
129 | ~ClangTokens(); | 131 | ~ClangTokens(); | ||
130 | CXToken* begin() const; | 132 | CXToken* begin() const; | ||
131 | CXToken* end() const; | 133 | CXToken* end() const; | ||
Show All 11 Lines |