Components/CommandProcessing/src/CommandProcessing/Command.h
Go to the documentation of this file.
1 /*
2  * CommandDelegate.h
3  *
4  * Created on: 2 jul. 2015
5  * Author: Herman
6  */
11 #pragma once
12 
13 #include <Delegate.h>
15 
17 {
19 class Command
20 {
21 public:
28  using Callback = Delegate<void(String commandLine, ReadWriteStream& commandOutput)>;
29 
36  Command(String reqName, String reqHelp, String reqGroup, Callback reqFunction)
37  : name(reqName), description(reqHelp), group(reqGroup), callback(reqFunction)
38  {
39  }
40 
42  {
43  }
44 
49 };
50 
51 } // namespace CommandProcessing
52 
Callback callback
Command Delegate (function that is called when command is invoked)
Definition: Components/CommandProcessing/src/CommandProcessing/Command.h:48
Command delegate class.
Definition: Components/CommandProcessing/src/CommandProcessing/Command.h:19
The String class.
Definition: WString.h:136
String name
Command name.
Definition: Components/CommandProcessing/src/CommandProcessing/Command.h:45
Definition: Components/CommandProcessing/src/CommandProcessing/Command.h:16
CommandLine commandLine
String description
Command help.
Definition: Components/CommandProcessing/src/CommandProcessing/Command.h:46
String group
Command group.
Definition: Components/CommandProcessing/src/CommandProcessing/Command.h:47
Command()
Definition: Components/CommandProcessing/src/CommandProcessing/Command.h:41
Command(String reqName, String reqHelp, String reqGroup, Callback reqFunction)
Definition: Components/CommandProcessing/src/CommandProcessing/Command.h:36
Base class for read/write stream.
Definition: ReadWriteStream.h:19