clang
15.0.0git
|
A "string" used to describe how code completion can be performed for an entity. More...
#include "clang/Sema/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... | |
using | iterator = const Chunk * |
Public Member Functions | |
CodeCompletionString (const CodeCompletionString &)=delete | |
CodeCompletionString & | operator= (const CodeCompletionString &)=delete |
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 first TypedText chunk. More... | |
std::string | getAllTypedText () const |
Returns the combined text from all TypedText chunks. More... | |
unsigned | getPriority () const |
Retrieve the priority of this code completion result. More... | |
unsigned | getAvailability () const |
Retrieve the availability of this code completion result. More... | |
unsigned | getAnnotationCount () const |
Retrieve the number of annotations for this code completion result. More... | |
const char * | getAnnotation (unsigned AnnotationNr) const |
Retrieve the annotation string specified by AnnotationNr . More... | |
StringRef | getParentContextName () const |
Retrieve the name of the parent context. More... | |
const char * | getBriefComment () const |
std::string | getAsString () const |
Retrieve a string representation of the code completion string, which is mainly useful for debugging. More... | |
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 442 of file CodeCompleteConsumer.h.
using clang::CodeCompletionString::iterator = const Chunk * |
Definition at line 597 of file CodeCompleteConsumer.h.
The different kinds of "chunks" that can occur within a code completion string.
Definition at line 446 of file CodeCompleteConsumer.h.
|
delete |
|
inline |
Definition at line 599 of file CodeCompleteConsumer.h.
Referenced by end(), and operator[]().
|
inline |
Definition at line 601 of file CodeCompleteConsumer.h.
|
inline |
Definition at line 600 of file CodeCompleteConsumer.h.
References begin().
Referenced by getAnnotation().
std::string CodeCompletionString::getAllTypedText | ( | ) | const |
Returns the combined text from all TypedText chunks.
Definition at line 349 of file CodeCompleteConsumer.cpp.
References CK_TypedText, and string().
const char * CodeCompletionString::getAnnotation | ( | unsigned | AnnotationNr | ) | const |
Retrieve the annotation string specified by AnnotationNr
.
Definition at line 307 of file CodeCompleteConsumer.cpp.
References end().
unsigned CodeCompletionString::getAnnotationCount | ( | ) | const |
Retrieve the number of annotations for this code completion result.
Definition at line 303 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 314 of file CodeCompleteConsumer.cpp.
References CK_CurrentParameter, CK_Informative, CK_Optional, CK_Placeholder, CK_ResultType, and string().
|
inline |
Retrieve the availability of this code completion result.
Definition at line 619 of file CodeCompleteConsumer.h.
|
inline |
Definition at line 632 of file CodeCompleteConsumer.h.
|
inline |
Retrieve the name of the parent context.
Definition at line 628 of file CodeCompleteConsumer.h.
|
inline |
Retrieve the priority of this code completion result.
Definition at line 616 of file CodeCompleteConsumer.h.
References Priority.
const char * CodeCompletionString::getTypedText | ( | ) | const |
Returns the text in the first TypedText chunk.
Definition at line 341 of file CodeCompleteConsumer.cpp.
References CK_TypedText.
|
delete |
Definition at line 604 of file CodeCompleteConsumer.h.
|
inline |
Definition at line 602 of file CodeCompleteConsumer.h.
Referenced by clang::CodeCompleteConsumer::OverloadCandidate::getParamDecl(), clang::CodeCompleteConsumer::OverloadCandidate::getParamType(), and operator[]().
|
friend |
Definition at line 564 of file CodeCompleteConsumer.h.
|
friend |
Definition at line 565 of file CodeCompleteConsumer.h.