#include <autocomplete.h>
Classes | |
| struct | CommandDef |
Public Member Functions | |
| void | RegisterCommand (const std::string &cmd, const std::string &desc, const std::vector< std::string > &examples={}) |
| void | RegisterParameter (const std::string ¶m, const std::string &desc, const std::vector< std::string > &values={}) |
| std::vector< Suggestion > | GetSuggestions (const std::string &input) |
| std::vector< Suggestion > | GetContextualHelp (const std::string &partial_cmd) |
| void | SetRomContext (bool has_rom) |
Private Member Functions | |
| int | FuzzyScore (const std::string &text, const std::string &query) |
Private Attributes | |
| std::vector< CommandDef > | commands_ |
| bool | has_rom_ = false |
Definition at line 18 of file autocomplete.h.
| void yaze::cli::AutocompleteEngine::RegisterCommand | ( | const std::string & | cmd, |
| const std::string & | desc, | ||
| const std::vector< std::string > & | examples = {} |
||
| ) |
Definition at line 9 of file autocomplete.cc.
References commands_, yaze::cli::AutocompleteEngine::CommandDef::description, yaze::cli::AutocompleteEngine::CommandDef::examples, and yaze::cli::AutocompleteEngine::CommandDef::name.
Referenced by yaze::cli::EnhancedChatComponent::EnhancedChatComponent(), and yaze::cli::tui::ChatTUI::InitializeAutocomplete().
| void yaze::cli::AutocompleteEngine::RegisterParameter | ( | const std::string & | param, |
| const std::string & | desc, | ||
| const std::vector< std::string > & | values = {} |
||
| ) |
Definition at line 18 of file autocomplete.cc.
| std::vector< Suggestion > yaze::cli::AutocompleteEngine::GetSuggestions | ( | const std::string & | input | ) |
Definition at line 48 of file autocomplete.cc.
References commands_, yaze::cli::Suggestion::description, yaze::cli::Suggestion::example, FuzzyScore(), yaze::cli::Suggestion::score, and yaze::cli::Suggestion::text.
Referenced by yaze::cli::CreateAutocompleteInput().

| std::vector< Suggestion > yaze::cli::AutocompleteEngine::GetContextualHelp | ( | const std::string & | partial_cmd | ) |
Definition at line 71 of file autocomplete.cc.
|
inline |
Definition at line 30 of file autocomplete.h.
References has_rom_.
|
private |
Definition at line 23 of file autocomplete.cc.
Referenced by GetSuggestions().
|
private |
Definition at line 40 of file autocomplete.h.
Referenced by GetSuggestions(), and RegisterCommand().
|
private |
Definition at line 41 of file autocomplete.h.
Referenced by SetRomContext().