diff options
Diffstat (limited to 'src/action.h')
-rw-r--r-- | src/action.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/action.h b/src/action.h index 4ec3b4a..4f9a88e 100644 --- a/src/action.h +++ b/src/action.h | |||
@@ -3,6 +3,9 @@ | |||
3 | 3 | ||
4 | #include <stdint.h> | 4 | #include <stdint.h> |
5 | 5 | ||
6 | #include <string> | ||
7 | #include <list> | ||
8 | |||
6 | class Action | 9 | class Action |
7 | { | 10 | { |
8 | public: | 11 | public: |
@@ -15,7 +18,39 @@ public: | |||
15 | Action(); | 18 | Action(); |
16 | virtual ~Action(); | 19 | virtual ~Action(); |
17 | 20 | ||
21 | typedef struct Cmd | ||
22 | { | ||
23 | Cmd( eAction act, const std::string &sWhat ) : | ||
24 | act( act ), sWhat( sWhat ) | ||
25 | {} | ||
26 | eAction act; | ||
27 | std::string sWhat; | ||
28 | } Cmd; | ||
29 | |||
30 | void addCommand( eAction act, const std::string &sWhat ); | ||
31 | |||
32 | void begin(); | ||
33 | bool isEnded(); | ||
34 | void next(); | ||
35 | |||
36 | eAction getAct(); | ||
37 | std::string getWhat(); | ||
38 | |||
39 | void setName( const std::string &sName ) | ||
40 | { | ||
41 | this->sName = sName; | ||
42 | } | ||
43 | |||
44 | std::string getName() | ||
45 | { | ||
46 | return sName; | ||
47 | } | ||
48 | |||
18 | private: | 49 | private: |
50 | typedef std::list<Cmd> CmdList; | ||
51 | CmdList lCmds; | ||
52 | CmdList::iterator i; | ||
53 | std::string sName; | ||
19 | 54 | ||
20 | }; | 55 | }; |
21 | 56 | ||