comparison dstep/foundation/NSGarbageCollector.d @ 16:19885b43130e

Huge update, the bridge actually works now
author Jacob Carlborg <doob@me.com>
date Sun, 03 Jan 2010 22:06:11 +0100
parents 89f3c3ef1fd2
children b9de51448c6b
comparison
equal deleted inserted replaced
15:7ff919f595d5 16:19885b43130e
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) 5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
6 */ 6 */
7 module dstep.foundation.NSGarbageCollector; 7 module dstep.foundation.NSGarbageCollector;
8 8
9 import dstep.foundation.NSObject; 9 import dstep.foundation.NSObject;
10 import dstep.foundation.NSZone;
10 import dstep.objc.bridge.Bridge; 11 import dstep.objc.bridge.Bridge;
11 import dstep.objc.objc : id; 12 import dstep.objc.objc;
12 13
13 class NSGarbageCollector : NSObject 14 class NSGarbageCollector : NSObject
14 { 15 {
15 mixin ObjcWrap; 16 mixin (ObjcWrap);
16 17
17 static Object defaultCollector () 18 this ()
18 { 19 {
19 return invokeObjcSelfClass!(Object, "defaultCollector"); 20 super(NSGarbageCollector.alloc.init.objcObject);
21 }
22
23 NSGarbageCollector init ()
24 {
25 return invokeObjcSelf!(NSGarbageCollector, "init");
26 }
27
28 static NSGarbageCollector defaultCollector ()
29 {
30 return invokeObjcSuperClass!(NSGarbageCollector, "defaultCollector");
20 } 31 }
21 32
22 bool isCollecting () 33 bool isCollecting ()
23 { 34 {
24 return invokeObjcSelf!(bool, "isCollecting"); 35 return invokeObjcSelf!(bool, "isCollecting");