LLDB  mainline
Classes | Public Member Functions | Private Attributes | List of all members
lldb_private::CompletionResult Class Reference

#include <CompletionRequest.h>

Collaboration diagram for lldb_private::CompletionResult:
Collaboration graph
[legend]

Classes

class  Completion
 A single completion and all associated data. More...
 

Public Member Functions

void AddResult (llvm::StringRef completion, llvm::StringRef description, CompletionMode mode)
 
llvm::ArrayRef< CompletionGetResults () const
 
void GetMatches (StringList &matches) const
 Adds all collected completion matches to the given list. More...
 
void GetDescriptions (StringList &descriptions) const
 Adds all collected completion descriptions to the given list. More...
 
std::size_t GetNumberOfResults () const
 

Private Attributes

std::vector< Completionm_results
 List of found completions. More...
 
llvm::StringSet m_added_values
 A set of the unique keys of all found completions so far. More...
 

Detailed Description

Definition at line 38 of file CompletionRequest.h.

Member Function Documentation

◆ AddResult()

void CompletionResult::AddResult ( llvm::StringRef  completion,
llvm::StringRef  description,
CompletionMode  mode 
)

◆ GetDescriptions()

void CompletionResult::GetDescriptions ( StringList descriptions) const

Adds all collected completion descriptions to the given list.

The list will be cleared before the results are added. The number of results here is guaranteed to be equal to GetNumberOfResults().

Definition at line 77 of file CompletionRequest.cpp.

References lldb_private::StringList::AppendString(), and lldb_private::StringList::Clear().

Referenced by lldb::SBCommandInterpreter::HandleCompletionWithDescriptions(), and lldb_private::REPL::IOHandlerComplete().

◆ GetMatches()

void CompletionResult::GetMatches ( StringList matches) const

Adds all collected completion matches to the given list.

The list will be cleared before the results are added. The number of results here is guaranteed to be equal to GetNumberOfResults().

Definition at line 71 of file CompletionRequest.cpp.

References lldb_private::StringList::AppendString(), and lldb_private::StringList::Clear().

Referenced by DiskFilesOrDirectories(), DisplayCompletions(), lldb::SBCommandInterpreter::HandleCompletionWithDescriptions(), and lldb_private::REPL::IOHandlerComplete().

◆ GetNumberOfResults()

std::size_t lldb_private::CompletionResult::GetNumberOfResults ( ) const
inline

◆ GetResults()

llvm::ArrayRef<Completion> lldb_private::CompletionResult::GetResults ( ) const
inline

Definition at line 78 of file CompletionRequest.h.

Referenced by DisplayCompletions().

Member Data Documentation

◆ m_added_values

llvm::StringSet lldb_private::CompletionResult::m_added_values
private

A set of the unique keys of all found completions so far.

Used to filter out duplicates.

See also
CompletionResult::Completion::GetUniqueKey

Definition at line 72 of file CompletionRequest.h.

◆ m_results

std::vector<Completion> lldb_private::CompletionResult::m_results
private

List of found completions.

Definition at line 67 of file CompletionRequest.h.


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