comparison mde/scheduler/InitStage.d @ 21:a60cbb7359dd

Window settings now come from options, and may use OpenGL (enabled/disabled at compile time). committer: Diggory Hardy <diggory.hardy@gmail.com>
author Diggory Hardy <diggory.hardy@gmail.com>
date Mon, 24 Mar 2008 17:53:28 +0000
parents 838577503598
children
comparison
equal deleted inserted replaced
20:838577503598 21:a60cbb7359dd
19 * It has been separated out of Init.d to massively reduce dependancies of modules adding init 19 * It has been separated out of Init.d to massively reduce dependancies of modules adding init
20 * functions. 20 * functions.
21 */ 21 */
22 module mde.scheduler.InitStage; 22 module mde.scheduler.InitStage;
23 23
24 import tango.util.log.Log : Log, Logger;
25 private Logger logger;
26 static this() {
27 logger = Log.getLogger ("mde.scheduler.InitStage");
28 }
29
24 /** Represents all functions to be called for a particular init stage. 30 /** Represents all functions to be called for a particular init stage.
25 * 31 *
26 * No code is included here to run the functions intentionally, to keep dependancies minimal. 32 * No code is included here to run the functions intentionally, to keep dependancies minimal.
27 */ 33 */
28 struct InitStage 34 struct InitStage
38 * instead. */ 44 * instead. */
39 void addFunc (InitFunction f) { 45 void addFunc (InitFunction f) {
40 funcs ~= f; 46 funcs ~= f;
41 } 47 }
42 48
43 /** Should be called by an init function when a failure occurs. */ 49 package InitFunction[] funcs = [];
44 void setFailure () {
45 synchronized failure = true;
46 }
47
48 package InitFunction[] funcs = [];
49 package bool failure = false;
50 } 50 }
51 51
52 /** Init can be divided up into these stages, each run in order: 52 /** Init can be divided up into these stages, each run in order:
53 * 53 *
54 * init0: 54 * init0:
85 */ 85 */
86 InitStage init2; 86 InitStage init2;
87 InitStage init4; /// ditto 87 InitStage init4; /// ditto
88 InitStage cleanup2; /// ditto 88 InitStage cleanup2; /// ditto
89 InitStage cleanup4; /// ditto 89 InitStage cleanup4; /// ditto
90
91 /** Should be called by an init function when a failure occurs. */
92 void setInitFailure () {
93 initFailure = true;
94 }
95 package bool initFailure = false;