Choreonoid  1.8
AbstractTaskSequencer.h
Go to the documentation of this file.
1 
6 #ifndef CNOID_UTIL_ABSTRACT_TASK_SEQUENCER_H
7 #define CNOID_UTIL_ABSTRACT_TASK_SEQUENCER_H
8 
9 #include "Task.h"
10 #include "exportdecl.h"
11 
12 namespace cnoid {
13 
14 class CNOID_EXPORT AbstractTaskSequencer
15 {
16 public:
17  virtual ~AbstractTaskSequencer();
18 
19  virtual void activate(bool on = true) = 0;
20  virtual bool isActive() = 0;
21 
22  virtual void addTask(Task* task) = 0;
23  virtual bool updateTask(Task* task) = 0;
24  virtual bool removeTask(Task* task) = 0;
25  virtual void clearTasks() = 0;
26  virtual SignalProxy<void(Task* task)> sigTaskAdded() = 0;
27  virtual SignalProxy<void(Task* task)> sigTaskRemoved() = 0;
28  virtual int numTasks() const = 0;
29  virtual Task* task(int index) = 0;
30  virtual int currentTaskIndex() const = 0;
31  virtual bool setCurrentTask(int taskIndex) = 0;
32  virtual SignalProxy<void()> sigCurrentTaskChanged() = 0;
33  virtual int currentPhaseIndex() const = 0;
34  virtual void setCurrentPhase(int phaseIndex) = 0;
35  virtual SignalProxy<void()> sigCurrentPhaseChanged() = 0;
36 
37  /*
38  @return The -1 value is returned when the current command is an implicit pre-processing command.
39  */
40  virtual int currentCommandIndex() const = 0;
41  virtual void executeCommand(int commandIndex) = 0;
42  virtual SignalProxy<void()> sigCurrentCommandChanged() = 0;
43  virtual bool isBusy() const = 0;
44  virtual SignalProxy<void()> sigBusyStateChanged() = 0;
45  virtual void cancelCurrentCommand() = 0;
46  virtual SignalProxy<void()> sigCurrentCommandCanceled() = 0;
47  virtual bool isAutoMode() const = 0;
48  virtual void setAutoMode(bool on) = 0;
49  virtual SignalProxy<void(bool isAutoMode)> sigAutoModeToggled() = 0;
50 
51  virtual void serializeTasks(const std::vector<std::string>& tasks) = 0;
52 };
53 
54 }
55 
56 #endif
Task.h
cnoid
Definition: AbstractSceneLoader.h:11
cnoid::Task
Definition: Task.h:202
cnoid::SignalProxy
Definition: Signal.h:470
cnoid::AbstractTaskSequencer
Definition: AbstractTaskSequencer.h:14