Espotel / Mbed 2 deprecated Elmo-Terminal-App

Dependencies:   SX1272lib mbed

Fork of Elmo-Terminal by Michal Leksinski

Commands/CmdFactory.h

Committer:
WGorniak
Date:
2015-10-01
Revision:
2:8d8295a51f68

File content as of revision 2:8d8295a51f68:

#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