blob: 2588caa0def66f40d7929e700ae455c3aac0ee3a (
plain)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
#include "action.h"
Action::Action()
{
}
Action::~Action()
{
}
void Action::addCommand( eAction act, const std::string &sWhat, bool bIsGroup )
{
lCmds.push_back( Cmd( act, sWhat, bIsGroup ) );
}
void Action::begin()
{
i = lCmds.begin();
}
bool Action::isEnded()
{
return i == lCmds.end();
}
void Action::next()
{
i++;
}
Action::eAction Action::getAct()
{
return (*i).act;
}
std::string Action::getWhat()
{
return (*i).sWhat;
}
bool Action::isGroup()
{
return (*i).bIsGroup;
}
void Action::setMode( eAction nAct )
{
for( CmdList::iterator j = lCmds.begin(); j != lCmds.end(); j++ )
{
(*j).act = nAct;
}
}
|