clang API Documentation
A "string" used to describe how code completion can be performed for an entity. More...
#include <CodeCompleteConsumer.h>
Classes | |
| struct | Chunk |
| One piece of the code completion string. More... | |
Public Types | |
| enum | ChunkKind { CK_TypedText, CK_Text, CK_Optional, CK_Placeholder, CK_Informative, CK_ResultType, CK_CurrentParameter, CK_LeftParen, CK_RightParen, CK_LeftBracket, CK_RightBracket, CK_LeftBrace, CK_RightBrace, CK_LeftAngle, CK_RightAngle, CK_Comma, CK_Colon, CK_SemiColon, CK_Equal, CK_HorizontalSpace, CK_VerticalSpace } |
| The different kinds of "chunks" that can occur within a code completion string. More... | |
| typedef const Chunk * | iterator |
Public Member Functions | |
| iterator | begin () const |
| iterator | end () const |
| bool | empty () const |
| unsigned | size () const |
| const Chunk & | operator[] (unsigned I) const |
| const char * | getTypedText () const |
| Returns the text in the TypedText chunk. | |
| unsigned | getPriority () const |
| Retrieve the priority of this code completion result. | |
| unsigned | getAvailability () const |
| Retrieve the availability of this code completion result. | |
| unsigned | getAnnotationCount () const |
| Retrieve the number of annotations for this code completion result. | |
| const char * | getAnnotation (unsigned AnnotationNr) const |
Retrieve the annotation string specified by AnnotationNr. | |
| StringRef | getParentContextName () const |
| Retrieve the name of the parent context. | |
| const char * | getBriefComment () const |
| std::string | getAsString () const |
| Retrieve a string representation of the code completion string, which is mainly useful for debugging. | |
Friends | |
| class | CodeCompletionBuilder |
| class | CodeCompletionResult |
A "string" used to describe how code completion can be performed for an entity.
A code completion string typically shows how a particular entity can be used. For example, the code completion string for a function would show the syntax to call it, including the parentheses, placeholders for the arguments, etc.
Definition at line 321 of file CodeCompleteConsumer.h.
| typedef const Chunk* clang::CodeCompletionString::iterator |
Definition at line 457 of file CodeCompleteConsumer.h.
The different kinds of "chunks" that can occur within a code completion string.
Definition at line 325 of file CodeCompleteConsumer.h.
| iterator clang::CodeCompletionString::begin | ( | ) | const [inline] |
Definition at line 458 of file CodeCompleteConsumer.h.
Referenced by end(), getAsString(), getTypedText(), and operator[]().
| bool clang::CodeCompletionString::empty | ( | ) | const [inline] |
Definition at line 460 of file CodeCompleteConsumer.h.
| iterator clang::CodeCompletionString::end | ( | ) | const [inline] |
Definition at line 459 of file CodeCompleteConsumer.h.
References begin().
Referenced by getAnnotation(), getAsString(), and getTypedText().
| const char * CodeCompletionString::getAnnotation | ( | unsigned | AnnotationNr | ) | const |
Retrieve the annotation string specified by AnnotationNr.
Definition at line 217 of file CodeCompleteConsumer.cpp.
References end().
Retrieve the number of annotations for this code completion result.
Definition at line 213 of file CodeCompleteConsumer.cpp.
| std::string CodeCompletionString::getAsString | ( | ) | const |
Retrieve a string representation of the code completion string, which is mainly useful for debugging.
Definition at line 225 of file CodeCompleteConsumer.cpp.
References begin(), AttributeLangSupport::C, CK_CurrentParameter, CK_Informative, CK_Optional, CK_Placeholder, CK_ResultType, and end().
Referenced by clang::PrintingCodeCompleteConsumer::ProcessCodeCompleteResults().
| unsigned clang::CodeCompletionString::getAvailability | ( | ) | const [inline] |
Retrieve the availability of this code completion result.
Definition at line 475 of file CodeCompleteConsumer.h.
Referenced by getDeclAvailability().
| const char* clang::CodeCompletionString::getBriefComment | ( | ) | const [inline] |
Definition at line 488 of file CodeCompleteConsumer.h.
| StringRef clang::CodeCompletionString::getParentContextName | ( | ) | const [inline] |
Retrieve the name of the parent context.
Definition at line 484 of file CodeCompleteConsumer.h.
| unsigned clang::CodeCompletionString::getPriority | ( | ) | const [inline] |
Retrieve the priority of this code completion result.
Definition at line 472 of file CodeCompleteConsumer.h.
| const char * CodeCompletionString::getTypedText | ( | ) | const |
Returns the text in the TypedText chunk.
Definition at line 246 of file CodeCompleteConsumer.cpp.
References begin(), AttributeLangSupport::C, CK_TypedText, and end().
Referenced by getOrderedName().
Definition at line 463 of file CodeCompleteConsumer.h.
| unsigned clang::CodeCompletionString::size | ( | ) | const [inline] |
Definition at line 461 of file CodeCompleteConsumer.h.
Referenced by operator[]().
friend class CodeCompletionBuilder [friend] |
Definition at line 453 of file CodeCompleteConsumer.h.
friend class CodeCompletionResult [friend] |
Definition at line 454 of file CodeCompleteConsumer.h.