Espotel / Mbed 2 deprecated Elmo-Terminal-App

Dependencies:   SX1272lib mbed

Fork of Elmo-Terminal by Michal Leksinski

Revision:
2:8d8295a51f68
diff -r 07666d31d5f3 -r 8d8295a51f68 Commands/CmdFactory.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Commands/CmdFactory.h	Thu Oct 01 09:40:30 2015 +0200
@@ -0,0 +1,34 @@
+#ifndef _CMDFACTORY_H_
+#define _CMDFACTORY_H_
+
+#include <string>
+#include "mbed.h"
+#include "Serial.h"
+
+class Cmd;
+class Settings;
+
+class CmdFactory
+{
+    public:
+        CmdFactory(Settings* settings, Serial* serial);
+        ~CmdFactory();
+        Cmd* createCmd(std::string cmd) const;
+        
+    private:
+
+        /** Command builder
+         *
+         * @param cmds list of commands for which help will be shown.
+         * @param cmd command mnemonic
+         *
+         * @see CmdList
+         */
+        template <typename cmds>
+        Cmd* create(const std::string& cmd) const;
+
+        Settings* settings_;
+        Serial* serial_;
+};
+
+#endif