PageRenderTime 9ms CodeModel.GetById 2ms app.highlight 5ms RepoModel.GetById 2ms app.codeStats 0ms

/runtime/moduleinfo.d

http://github.com/wilkie/djehuty
D | 39 lines | 28 code | 10 blank | 1 comment | 1 complexity | 9df8093bc5c83f5ebc09e7ea7d5fbf6d MD5 | raw file
 1module runtime.moduleinfo;
 2
 3import core.definitions;
 4
 5// Description: This class describes a D module.
 6class ModuleInfo {
 7	string name;
 8	ModuleInfo[] importedModules;
 9	ClassInfo[] localClasses;
10
11	uint flags;
12
13	void function() ctor;
14	void function() dtor;
15	void function() unitTest;
16
17	void* xgetMembers;
18	void function() ictor;
19
20	static int opApply(int delegate(ref ModuleInfo) loopBody) {
21		int ret = 0;
22
23		foreach(mod; _modules) {
24			ret = loopBody(mod);
25			if(ret) {
26				break;
27			}
28		}
29
30		return ret;
31	}
32
33	ModuleInfo[] modules {
34		return _modules.dup;
35	}
36
37private:
38	static ModuleInfo[] _modules;
39}