aboutsummaryrefslogtreecommitdiff
path: root/src/action.h
blob: 25badadd94adbe4193b9fbb4076e1cded66d593d (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
54
55
56
57
58
59
60
61
62
63
64
#ifndef ACTION_H
#define ACTION_H

#include <stdint.h>

#include <string>
#include <list>

class Action
{
public:
	enum eAction
	{
		actCheck,
		actClean
	};
public:
	Action();
	virtual ~Action();

	typedef struct Cmd
	{
		Cmd( eAction act, const std::string &sWhat ) :
			act( act ), sWhat( sWhat )
		{}
		eAction act;
		std::string sWhat;
	} Cmd;

	void addCommand( eAction act, const std::string &sWhat );

	void begin();
	bool isEnded();
	void next();

	int size()
	{
		return lCmds.size();
	}

	eAction getAct();
	std::string getWhat();

	void setName( const std::string &sName )
	{
		this->sName = sName;
	}

	std::string getName()
	{
		return sName;
	}
	
	void setMode( eAction nAct );

private:
	typedef std::list<Cmd> CmdList;
	CmdList lCmds;
	CmdList::iterator i;
	std::string sName;

};

#endif