Numworks Epsilon  1.4.1
Graphing Calculator Operating System
command_handler.h
Go to the documentation of this file.
1 #ifndef ION_DEVICE_BENCH_COMMAND_HANDLER_H
2 #define ION_DEVICE_BENCH_COMMAND_HANDLER_H
3 
4 #include "command/command.h"
5 
6 namespace Ion {
7 namespace Device {
8 namespace Bench {
9 
11 public:
12  constexpr CommandHandler(const char * name, Command::Function function) :
13  m_name(name), m_function(function) {}
14  bool valid() const;
15  bool handle(const char * command) const;
16  Command::Function function() const { return m_function; }
17 private:
18  bool matches(const char * command) const;
19  const char * m_name;
20  Command::Function m_function;
21 };
22 
23 }
24 }
25 }
26 
27 #endif
void(* Function)(const char *input)
Definition: command.h:11
constexpr CommandHandler(const char *name, Command::Function function)
bool handle(const char *command) const
Command::Function function() const
Definition: backlight.h:6