-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcli-action.h
More file actions
32 lines (26 loc) · 736 Bytes
/
cli-action.h
File metadata and controls
32 lines (26 loc) · 736 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef CLI_ACTION_H
#define CLI_ACTION_H
#include <iostream>
#include <vector>
#include <functional>
class CLI;
class CLIAction {
public:
~CLIAction();
std::vector<std::string> getNames();
std::string getName(int i = 0);
std::string namesToString();
std::string getDescription();
void setCalledAction(std::string);
std::string getCalledAction();
void execute();
bool isNoAction;
protected:
CLIAction(std::vector<std::string>, std::string, std::function<void ()>);
CLIAction(); // This constructor is for CLINoAction type
std::vector<std::string> names;
std::string description;
std::string calledAction;
std::function<void ()> function;
};
#endif