Changeset View
Changeset View
Standalone View
Standalone View
languages/clang/util/clangutils.h
Show All 23 Lines | |||||
24 | 24 | | |||
25 | #include <util/path.h> | 25 | #include <util/path.h> | ||
26 | 26 | | |||
27 | #include <KTextEditor/View> | 27 | #include <KTextEditor/View> | ||
28 | 28 | | |||
29 | #include <clang-c/Index.h> | 29 | #include <clang-c/Index.h> | ||
30 | 30 | | |||
31 | #include "clangprivateexport.h" | 31 | #include "clangprivateexport.h" | ||
32 | #include "../duchain/unsavedfile.h" | ||||
32 | 33 | | |||
33 | namespace ClangUtils | 34 | namespace ClangUtils | ||
34 | { | 35 | { | ||
35 | /** | 36 | /** | ||
36 | * Finds the most specific CXCursor which applies to the specified line and column | 37 | * Finds the most specific CXCursor which applies to the specified line and column | ||
37 | * in the given translation unit and file. | 38 | * in the given translation unit and file. | ||
38 | * | 39 | * | ||
39 | * @param line The 0-indexed line number at which to search. | 40 | * @param line The 0-indexed line number at which to search. | ||
Show All 24 Lines | |||||
64 | */ | 65 | */ | ||
65 | QVector<QString> getDefaultArguments(CXCursor cursor, DefaultArgumentsMode mode = FixedSize); | 66 | QVector<QString> getDefaultArguments(CXCursor cursor, DefaultArgumentsMode mode = FixedSize); | ||
66 | 67 | | |||
67 | /** | 68 | /** | ||
68 | * @return true when the cursor kind references a named scope. | 69 | * @return true when the cursor kind references a named scope. | ||
69 | */ | 70 | */ | ||
70 | bool isScopeKind(CXCursorKind kind); | 71 | bool isScopeKind(CXCursorKind kind); | ||
71 | 72 | | |||
72 | /** | 73 | /** | ||
mwolff: please add apidox and note that this must be done from the foreground / have the foreground… | |||||
74 | * @brief Retrieve a list of all unsaved files. | ||||
75 | * | ||||
76 | * @note Since this reads text from the editor widget, it must be called from the | ||||
77 | * GUI thread or with the foreground lock held. | ||||
78 | * | ||||
79 | * @return vector of all unsaved files and their current contents | ||||
80 | */ | ||||
81 | KDEVCLANGPRIVATE_EXPORT QVector<UnsavedFile> unsavedFiles(); | ||||
82 | | ||||
83 | /** | ||||
73 | * Given a cursor and destination context, returns the string representing the | 84 | * Given a cursor and destination context, returns the string representing the | ||
74 | * cursor's scope at its current location. | 85 | * cursor's scope at its current location. | ||
75 | * | 86 | * | ||
76 | * @param cursor The cursor to examine | 87 | * @param cursor The cursor to examine | ||
77 | * @param context The destination context from which the cursor should be referenced. | 88 | * @param context The destination context from which the cursor should be referenced. | ||
78 | * By default this will be set to the cursors lexical parent. | 89 | * By default this will be set to the cursors lexical parent. | ||
79 | * @return the cursor's scope as a string | 90 | * @return the cursor's scope as a string | ||
80 | */ | 91 | */ | ||
▲ Show 20 Lines • Show All 86 Lines • Show Last 20 Lines |
please add apidox and note that this must be done from the foreground / have the foreground locked