clang API Documentation

Public Member Functions | Static Public Member Functions | Public Attributes
clang::CodeCompletionString::Chunk Struct Reference

One piece of the code completion string. More...

#include <CodeCompleteConsumer.h>

Collaboration diagram for clang::CodeCompletionString::Chunk:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Chunk ()
 Chunk (ChunkKind Kind, const char *Text="")

Static Public Member Functions

static Chunk CreateText (const char *Text)
 Create a new text chunk.
static Chunk CreateOptional (CodeCompletionString *Optional)
 Create a new optional chunk.
static Chunk CreatePlaceholder (const char *Placeholder)
 Create a new placeholder chunk.
static Chunk CreateInformative (const char *Informative)
 Create a new informative chunk.
static Chunk CreateResultType (const char *ResultType)
 Create a new result type chunk.
static Chunk CreateCurrentParameter (const char *CurrentParameter)
 Create a new current-parameter chunk.

Public Attributes

ChunkKind Kind
 The kind of data stored in this piece of the code completion string.
union {
   const char *   Text
 The text string associated with a CK_Text, CK_Placeholder, CK_Informative, or CK_Comma chunk. The string is owned by the chunk and will be deallocated (with delete[]) when the chunk is destroyed.
   CodeCompletionString *   Optional
 The code completion string associated with a CK_Optional chunk. The optional code completion string is owned by the chunk, and will be deallocated (with delete) when the chunk is destroyed.
}; 

Detailed Description

One piece of the code completion string.

Definition at line 382 of file CodeCompleteConsumer.h.


Constructor & Destructor Documentation

Definition at line 400 of file CodeCompleteConsumer.h.

CodeCompletionString::Chunk::Chunk ( ChunkKind  Kind,
const char *  Text = "" 
) [explicit]

Member Function Documentation

Create a new current-parameter chunk.

Definition at line 184 of file CodeCompleteConsumer.cpp.

References clang::CodeCompletionString::CK_CurrentParameter.

Referenced by clang::CodeCompletionBuilder::AddCurrentParameterChunk().

Create a new informative chunk.

Definition at line 174 of file CodeCompleteConsumer.cpp.

References clang::CodeCompletionString::CK_Informative.

Referenced by clang::CodeCompletionBuilder::AddInformativeChunk().

Create a new optional chunk.

Definition at line 161 of file CodeCompleteConsumer.cpp.

References clang::CodeCompletionString::CK_Optional, Kind, and Optional.

Referenced by clang::CodeCompletionBuilder::AddOptionalChunk().

Create a new placeholder chunk.

Definition at line 169 of file CodeCompleteConsumer.cpp.

References clang::CodeCompletionString::CK_Placeholder.

Referenced by clang::CodeCompletionBuilder::AddPlaceholderChunk().

Create a new result type chunk.

Definition at line 179 of file CodeCompleteConsumer.cpp.

References clang::CodeCompletionString::CK_ResultType.

Referenced by clang::CodeCompletionBuilder::AddResultTypeChunk().

Create a new text chunk.

Definition at line 156 of file CodeCompleteConsumer.cpp.

References clang::CodeCompletionString::CK_Text.

Referenced by clang::CodeCompletionBuilder::AddTextChunk().


Member Data Documentation

union { ... }

The kind of data stored in this piece of the code completion string.

Definition at line 385 of file CodeCompleteConsumer.h.

Referenced by CreateOptional().

The code completion string associated with a CK_Optional chunk. The optional code completion string is owned by the chunk, and will be deallocated (with delete) when the chunk is destroyed.

Definition at line 397 of file CodeCompleteConsumer.h.

Referenced by CreateOptional().

The text string associated with a CK_Text, CK_Placeholder, CK_Informative, or CK_Comma chunk. The string is owned by the chunk and will be deallocated (with delete[]) when the chunk is destroyed.

Definition at line 392 of file CodeCompleteConsumer.h.

Referenced by Chunk().


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