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

#include <CompletionRequest.h>

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.
 
void GetDescriptions (StringList &descriptions) const
 Adds all collected completion descriptions to the given list.
 
std::size_t GetNumberOfResults () const
 

Private Attributes

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

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(), lldb_private::StringList::Clear(), and m_results.

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(), lldb_private::StringList::Clear(), and m_results.

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

◆ 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.

References m_results.

Referenced by lldb_private::Editline::TabCommand().

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.

Referenced by AddResult().

◆ m_results

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

List of found completions.

Definition at line 67 of file CompletionRequest.h.

Referenced by AddResult(), GetDescriptions(), GetMatches(), GetNumberOfResults(), and GetResults().


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