LRT14  1.0
 All Classes Namespaces Functions Variables Enumerations Enumerator
Sequential.h
1 #ifndef SEQUENTIAL_H_
2 #define SEQUENTIAL_H_
3 
4 #include "Automation.h"
5 #include <queue>
6 #include <vector>
7 
11 class Sequential : public Automation
12 {
13 public:
20  Sequential(const char* name, bool queueIfBlocked = false, bool restartable = false);
21 
29  Sequential(const char* name, std::vector<Automation*> sequence, bool queueIfBlocked = false, bool restartable = false);
30  virtual ~Sequential();
31 
32  virtual bool Start();
33  virtual bool Abort();
34  virtual bool Run();
35  virtual void AllocateResources();
36 
41  void AddAutomation(Automation *automation);
42 
47  void AddAutomation(std::vector<Automation*> automation);
48 
52  void ClearSequence();
53 
54 protected:
59  virtual bool ContinueNextStep();
60 
61 private:
62  std::vector<Automation*> routines;
63  std::queue<Automation*> queued;
64  bool started;
65 };
66 
67 #endif