diff options
Diffstat (limited to 'src/action.cpp')
-rw-r--r-- | src/action.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/action.cpp b/src/action.cpp index cdf50e8..be11f48 100644 --- a/src/action.cpp +++ b/src/action.cpp | |||
@@ -7,3 +7,34 @@ Action::Action() | |||
7 | Action::~Action() | 7 | Action::~Action() |
8 | { | 8 | { |
9 | } | 9 | } |
10 | |||
11 | void Action::addCommand( eAction act, const std::string &sWhat ) | ||
12 | { | ||
13 | lCmds.push_back( Cmd( act, sWhat ) ); | ||
14 | } | ||
15 | |||
16 | void Action::begin() | ||
17 | { | ||
18 | i = lCmds.begin(); | ||
19 | } | ||
20 | |||
21 | bool Action::isEnded() | ||
22 | { | ||
23 | return i == lCmds.end(); | ||
24 | } | ||
25 | |||
26 | void Action::next() | ||
27 | { | ||
28 | i++; | ||
29 | } | ||
30 | |||
31 | Action::eAction Action::getAct() | ||
32 | { | ||
33 | return (*i).act; | ||
34 | } | ||
35 | |||
36 | std::string Action::getWhat() | ||
37 | { | ||
38 | return (*i).sWhat; | ||
39 | } | ||
40 | |||