1 #ifndef __COMMAND_CALLABLE_H
2 #define __COMMAND_CALLABLE_H
9 * Callable behaviour class.
11 template<typename ParameterType>
15 * Function handling user Arguments
17 std::function<void(ParameterType)> func;
21 * Default constructor.
23 * @param function Function that will be invoked
25 Callable(std::function<void(ParameterType)> function)
29 virtual ~Callable() { }
33 * Executes command binded with argument
35 * @param value Value passed to program argument
37 void call(ParameterType value) {
43 * Template specialization of Callable behaviour class.
44 * Allows passing functions with void argument
47 class Callable<void> {
50 * Function handling user Arguments
52 std::function<void(void)> func;
56 * Default constructor.
58 * @param function Function that will be invoked
60 Callable(std::function<void(void)> function)
64 virtual ~Callable() { }
76 #endif /* __COMMAND_DESCRIPTIVE_H */