Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of Elmo-Terminal by
Diff: Commands/CmdFactory.h
- Revision:
- 2:8d8295a51f68
--- /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
