summaryrefslogtreecommitdiff
path: root/project2/common/iHaveSubTasks.h
blob: 1fd5041f2367e035f3ff3a7122fd9b0727bd4f73 (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
#ifndef HASSUBTASKS_H
#define HASSUBTASKS_H

#include "task.h"
#include "scriptStorage.h"

/// Base class for Project2 compoments that perform actions, but product no output
class IHaveSubTasks : public Task {
	public:
		typedef ANONORDEREDSTORAGEOF(Task) Tasks;

		IHaveSubTasks(ScriptNodePtr p);
		virtual ~IHaveSubTasks();

		virtual void execute(ExecContext * ec) const = 0;
		Tasks normal;

	protected:
		void run(const Tasks &, ExecContext * ec) const;
};

#endif