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.
Command.h
00001 #pragma once 00002 #include "mbed.h" 00003 00004 #include <string> 00005 #include <cctype> 00006 #include <algorithm> 00007 00008 #include "Clock.h" 00009 #include "Reader.h" 00010 00011 class Command 00012 { 00013 private: 00014 string error; 00015 00016 protected: 00017 const string *argv; 00018 const uint8_t argc; 00019 00020 Reader *reader; 00021 00022 bool isHelp() const; 00023 void setError(const string &error); 00024 00025 public: 00026 Command(const string *argv, uint8_t argc); 00027 virtual ~Command(); 00028 00029 const string getError() const; 00030 const string getFirstParameter() const; 00031 00032 virtual bool execute(); 00033 virtual void printHelp() const; 00034 }; 00035 00036 class ValidCommand : public Command 00037 { 00038 public: 00039 ValidCommand(const string *argv, uint8_t argc); 00040 }; 00041 00042 class InvalidCommand : public Command 00043 { 00044 public: 00045 InvalidCommand(const string *argv, uint8_t argc); 00046 bool execute(); 00047 }; 00048 00049 class PruebaCommand : public ValidCommand 00050 { 00051 private: 00052 00053 public: 00054 PruebaCommand(const string *argv, uint8_t argc); 00055 00056 bool execute(); 00057 void printHelp() const; 00058 };
Generated on Fri Aug 19 2022 07:33:34 by
1.7.2