-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCmdSequence.h
55 lines (41 loc) · 963 Bytes
/
CmdSequence.h
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
/*
* CmdSequence.h
*
* Created on: 10.03.2014
* Author: niklausd
*/
#ifndef CMDSEQUENCE_H_
#define CMDSEQUENCE_H_
class SpinTimer;
class Cmd;
class CmdAdapter;
class CmdSequence
{
public:
CmdSequence(CmdAdapter* adapter = 0);
virtual ~CmdSequence();
void start();
void stop();
bool isRunning();
Cmd* currentCmd();
void execNextCmd();
void attach(Cmd* cmd);
void detach(Cmd* cmd);
void attachAdapter(CmdAdapter* adapter);
CmdAdapter* adapter() { return m_adapter; }
Cmd* getFirstCmd();
Cmd* getNextCmd();
private:
void execCmd();
private:
bool m_isRunning;
Cmd* m_firstCmd;
Cmd* m_currentCmd;
Cmd* m_cmdListIter;
CmdAdapter* m_adapter;
SpinTimer* m_timer;
private: // forbidden default functions
CmdSequence& operator = (const CmdSequence& ); // assignment operator
CmdSequence(const CmdSequence& src); // copy constructor
};
#endif /* CMDSEQUENCE_H_ */