Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: d44131a4056a0215a23d7d37b25850b5dbbe2b71 (plain) (blame)
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
/*
 * SubSystemRunnerBase.h
 *
 * The base class for running components.
 *
 *  Created on: 29.08.2012
 *      Author: karlitsc
 */

#ifndef SUBSYSTEMRUNNERBASE_H_
#define SUBSYSTEMRUNNERBASE_H_

#include <iostream>
#ifdef WIN32
#include <windows.h>
#endif

namespace etRuntime {

class SubSystemClassBase;

class SubSystemRunnerBase {
public:
	SubSystemRunnerBase();
	~SubSystemRunnerBase();

	/**
	 * blocks until the String "quit" is entered on the console
	 */
protected:
	static void waitForQuit(SubSystemClassBase& mainComponent) {
		waitAndPollSingleThreaded(mainComponent);
	}

private:
	static void waitMultiThreaded();
	static void waitAndPollSingleThreaded(SubSystemClassBase& mainComponent);
};

} /* namespace etRuntime */
#endif /* SUBSYSTEMRUNNERBASE_H_ */

Back to the top