Remove commented out code
[command.git] / include / callable.h
index 4ac1bd97635e43d8b9956b35857155e59ba0ec1e..efff3e8d88b2d1d0fbe36668a6798e85acc47128 100644 (file)
@@ -2,6 +2,7 @@
 #define __COMMAND_CALLABLE_H
 
 #include <string>
+#include <functional>
 
 namespace command {
     /**
@@ -13,7 +14,7 @@ namespace command {
         /**
          * Function handling user Arguments
          */
-        void (*func)(ParameterType);
+        std::function<void(ParameterType)> func;
 
     public:
         /**
@@ -21,7 +22,7 @@ namespace command {
          *
          * @param function Function that will be invoked
          */
-        Callable(void (*function)(ParameterType))
+        Callable(std::function<void(ParameterType)> function)
             : func(function) {
         }
 
@@ -48,7 +49,7 @@ namespace command {
         /**
          * Function handling user Arguments
          */
-        void (*func)(void);
+        std::function<void(void)> func;
 
     public:
         /**
@@ -56,9 +57,10 @@ namespace command {
          *
          * @param function Function that will be invoked
          */
-        Callable(void (*function)(void))
+        Callable(std::function<void(void)> function)
             : func(function) {
         }
+
         virtual ~Callable() { }
 
     protected: