JODA  0.13.1 (59b41972)
JSON On-Demand Analysis
CLICompletion.h
Go to the documentation of this file.
1 //
2 // Created by Nico Schäfer on 15/08/18.
3 //
4 
5 #ifndef JODA_CLICOMLETION_H
6 #define JODA_CLICOMLETION_H
7 #include <string>
8 #include <vector>
9 
10 namespace joda::cli {
12  public:
20  static char **completer(const char *text, int start, int end);
21 
22  static void setCli_commands(const std::vector<std::string> &cli_commands);
23 
24  private:
25  static std::vector<std::string> cli_commands;
26  static std::vector<std::string> matches;
27  static size_t match_index;
28 
35  static char *basic_command_completer(const char *text, int state);
42  static char *basic_query_completer(const char *text, int state);
43 
44  static char *storage_completer(const char *text, int state);
45 
46  static char *query_function_completer(const char *text, int state);
47 
48  static char *return_match();
49 
50  static void init_match(const std::vector<std::string> &cmds,
51  const char *text);
52 };
53 } // namespace joda::cli
54 
55 #endif // JODA_CLICOMLETION_H
Definition: CLICompletion.h:11
static char ** completer(const char *text, int start, int end)
Definition: CLICompletion.cpp:21
static void setCli_commands(const std::vector< std::string > &cli_commands)
Definition: CLICompletion.cpp:112
Definition: CLI.h:19