clang API Documentation

Public Types | Public Member Functions
clang::CodeCompletionBuilder Class Reference

A builder class used to construct new code-completion strings. More...

#include <CodeCompleteConsumer.h>

List of all members.

Public Types

typedef CodeCompletionString::Chunk Chunk

Public Member Functions

 CodeCompletionBuilder (CodeCompletionAllocator &Allocator, CodeCompletionTUInfo &CCTUInfo)
 CodeCompletionBuilder (CodeCompletionAllocator &Allocator, CodeCompletionTUInfo &CCTUInfo, unsigned Priority, CXAvailabilityKind Availability)
CodeCompletionAllocatorgetAllocator () const
 Retrieve the allocator into which the code completion strings should be allocated.
CodeCompletionTUInfogetCodeCompletionTUInfo () const
CodeCompletionStringTakeString ()
 Take the resulting completion string.
void AddTypedTextChunk (const char *Text)
 Add a new typed-text chunk.
void AddTextChunk (const char *Text)
 Add a new text chunk.
void AddOptionalChunk (CodeCompletionString *Optional)
 Add a new optional chunk.
void AddPlaceholderChunk (const char *Placeholder)
 Add a new placeholder chunk.
void AddInformativeChunk (const char *Text)
 Add a new informative chunk.
void AddResultTypeChunk (const char *ResultType)
 Add a new result-type chunk.
void AddCurrentParameterChunk (const char *CurrentParameter)
 Add a new current-parameter chunk.
void AddChunk (CodeCompletionString::ChunkKind CK, const char *Text="")
 Add a new chunk.
void AddAnnotation (const char *A)
void addParentContext (const DeclContext *DC)
 Add the parent context information to this code completion.
const char * getBriefComment () const
void addBriefComment (StringRef Comment)
StringRef getParentName () const

Detailed Description

A builder class used to construct new code-completion strings.

Definition at line 556 of file CodeCompleteConsumer.h.


Member Typedef Documentation

Definition at line 558 of file CodeCompleteConsumer.h.


Constructor & Destructor Documentation

Definition at line 574 of file CodeCompleteConsumer.h.

Definition at line 580 of file CodeCompleteConsumer.h.


Member Function Documentation

void clang::CodeCompletionBuilder::AddAnnotation ( const char *  A) [inline]
void CodeCompletionBuilder::addBriefComment ( StringRef  Comment)
void CodeCompletionBuilder::AddChunk ( CodeCompletionString::ChunkKind  CK,
const char *  Text = "" 
)
void CodeCompletionBuilder::AddCurrentParameterChunk ( const char *  CurrentParameter)

Add a new current-parameter chunk.

Definition at line 370 of file CodeCompleteConsumer.cpp.

References clang::CodeCompletionString::Chunk::CreateCurrentParameter().

void CodeCompletionBuilder::AddInformativeChunk ( const char *  Text)

Add a new optional chunk.

Definition at line 353 of file CodeCompleteConsumer.cpp.

References clang::CodeCompletionString::Chunk::CreateOptional().

Referenced by AddFunctionParameterChunks(), and AddTemplateParameterChunks().

Add the parent context information to this code completion.

Definition at line 379 of file CodeCompleteConsumer.cpp.

References clang::DeclContext::isFunctionOrMethod(), and clang::DeclContext::isTranslationUnit().

Referenced by clang::CodeCompletionResult::CreateCodeCompletionString().

void CodeCompletionBuilder::AddPlaceholderChunk ( const char *  Placeholder)
void CodeCompletionBuilder::AddResultTypeChunk ( const char *  ResultType)

Add a new result-type chunk.

Definition at line 365 of file CodeCompleteConsumer.cpp.

References clang::CodeCompletionString::Chunk::CreateResultType().

Referenced by AddResultTypeChunk().

void CodeCompletionBuilder::AddTextChunk ( const char *  Text)
void CodeCompletionBuilder::AddTypedTextChunk ( const char *  Text)
const char* clang::CodeCompletionBuilder::getBriefComment ( ) const [inline]
StringRef clang::CodeCompletionBuilder::getParentName ( ) const [inline]

Take the resulting completion string.

This operation can only be performed once.

Definition at line 331 of file CodeCompleteConsumer.cpp.

Referenced by clang::CodeCompletionResult::CreateCodeCompletionString(), and clang::CodeCompleteConsumer::OverloadCandidate::CreateSignatureString().


The documentation for this class was generated from the following files: