LLDB mainline
|
#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< Completion > | GetResults () 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< Completion > | m_results |
List of found completions. | |
llvm::StringSet | m_added_values |
A set of the unique keys of all found completions so far. | |
Definition at line 38 of file CompletionRequest.h.
void CompletionResult::AddResult | ( | llvm::StringRef | completion, |
llvm::StringRef | description, | ||
CompletionMode | mode | ||
) |
Definition at line 61 of file CompletionRequest.cpp.
References lldb_private::CompletionResult::Completion::GetUniqueKey(), m_added_values, and m_results.
Referenced by lldb_private::CompletionRequest::AddCompletion().
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().
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().
|
inline |
Definition at line 90 of file CompletionRequest.h.
References m_results.
Referenced by lldb::SBCommandInterpreter::HandleCompletionWithDescriptions().
|
inline |
Definition at line 78 of file CompletionRequest.h.
References m_results.
Referenced by lldb_private::Editline::TabCommand().
|
private |
A set of the unique keys of all found completions so far.
Used to filter out duplicates.
Definition at line 72 of file CompletionRequest.h.
Referenced by AddResult().
|
private |
List of found completions.
Definition at line 67 of file CompletionRequest.h.
Referenced by AddResult(), GetDescriptions(), GetMatches(), GetNumberOfResults(), and GetResults().