summaryrefslogtreecommitdiff
path: root/src/command_manager.hh
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2016-09-18 16:07:00 +0100
committerMaxime Coste <frrrwww@gmail.com>2016-09-18 16:07:00 +0100
commitd14c39ebddecb2e154bfe0e87fcb34419380c5e5 (patch)
tree6353594b82dde6e1a66a52a115cb15ae158faac0 /src/command_manager.hh
parent8627c93e11ad8649502b859697af7ed4b194393c (diff)
Rewrite PerArgumentCommandCompleter to use compile time dispatching
No need to store these vectors of std::functions around anymore.
Diffstat (limited to 'src/command_manager.hh')
-rw-r--r--src/command_manager.hh21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/command_manager.hh b/src/command_manager.hh
index 601629cb..e9f5c5fc 100644
--- a/src/command_manager.hh
+++ b/src/command_manager.hh
@@ -38,27 +38,6 @@ enum class CommandFlags
template<> struct WithBitOps<CommandFlags> : std::true_type {};
-class PerArgumentCommandCompleter
-{
-public:
- using ArgumentCompleter = std::function<Completions (const Context&,
- CompletionFlags flags,
- const String&, ByteCount)>;
- using ArgumentCompleterList = ConstArrayView<ArgumentCompleter>;
-
- PerArgumentCommandCompleter(ArgumentCompleterList completers)
- : m_completers(completers.begin(), completers.end()) {}
-
- Completions operator()(const Context& context,
- CompletionFlags flags,
- CommandParameters params,
- size_t token_to_complete,
- ByteCount pos_in_token) const;
-
-private:
- Vector<ArgumentCompleter, MemoryDomain::Commands> m_completers;
-};
-
using CommandInfo = std::pair<String, String>;
struct Token