mirror of https://gitlab.com/cppit/libclangmm
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.4 KiB
42 lines
1.4 KiB
|
11 years ago
|
#ifndef COMPLETIONSTRING_H_
|
||
|
|
#define COMPLETIONSTRING_H_
|
||
|
|
#include <clang-c/Index.h>
|
||
|
|
#include "CodeCompleteResults.h"
|
||
|
|
|
||
|
|
namespace clang {
|
||
|
|
enum CompletionChunkKind {
|
||
|
|
CompletionChunk_Optional, CompletionChunk_TypedText,
|
||
|
|
CompletionChunk_Text, CompletionChunk_Placeholder,
|
||
|
|
CompletionChunk_Informative, CompletionChunk_CurrentParameter,
|
||
|
|
CompletionChunk_LeftParen, CompletionChunk_RightParen,
|
||
|
|
CompletionChunk_LeftBracket, CompletionChunk_RightBracket,
|
||
|
|
CompletionChunk_LeftBrace, CompletionChunk_RightBrace,
|
||
|
|
CompletionChunk_LeftAngle, CompletionChunk_RightAngle,
|
||
|
|
CompletionChunk_Comma, CompletionChunk_ResultType,
|
||
|
|
CompletionChunk_Colon, CompletionChunk_SemiColon,
|
||
|
|
CompletionChunk_Equal, CompletionChunk_HorizontalSpace,
|
||
|
|
CompletionChunk_VerticalSpace
|
||
|
|
};
|
||
|
|
|
||
|
|
class CompletionChunk {
|
||
|
|
public:
|
||
|
|
CompletionChunk(std::string chunk, CompletionChunkKind kind);
|
||
|
|
const std::string& chunk() const { return chunk_; }
|
||
|
|
const CompletionChunkKind& kind() const { return kind_; }
|
||
|
|
private:
|
||
|
|
std::string chunk_;
|
||
|
|
CompletionChunkKind kind_;
|
||
|
|
};
|
||
|
|
|
||
|
|
class CompletionString {
|
||
|
|
public:
|
||
|
|
std::vector<CompletionChunk> get_chunks();
|
||
|
|
int get_num_chunks();
|
||
|
|
private:
|
||
|
|
explicit CompletionString(const CXCompletionString &str);
|
||
|
|
CXCompletionString str_;
|
||
|
|
friend CodeCompleteResults;
|
||
|
|
};
|
||
|
|
} // namespace clang
|
||
|
|
#endif // COMPLETIONSTRING_H_
|