PageRenderTime 13ms CodeModel.GetById 1ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 1ms

/platform/unix/platform/application.d

http://github.com/wilkie/djehuty
D | 44 lines | 32 code | 11 blank | 1 comment | 1 complexity | 481a009151357013f50d55e73c54dbc8 MD5 | raw file
 1module platform.application;
 2
 3import binding.c;
 4
 5class ApplicationController {
 6	this() {
 7	}
 8
 9	void exitCode(uint value) {
10		_exitCode = value;
11	}
12
13	uint exitCode() {
14		return _exitCode;
15	}
16
17	void start() {
18	}
19
20	void end() {
21//		exit(_exitCode);
22	}
23
24	static ApplicationController instance() {
25		if (_app is null) {
26			_app = new ApplicationController();
27		}
28		return _app;
29	}
30
31	bool usingCurses() {
32		return _usingCurses;
33	}
34
35	void usingCurses(bool value) {
36		_usingCurses = value;
37	}
38
39private:
40
41	bool _usingCurses;
42	uint _exitCode;
43	static ApplicationController _app;
44}