Mercurial > projects > dstep
diff dstep/objc/bridge/Type.d @ 2:9fd439a28ce3
Adapted the scripts for the new bridge + a lot more
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Sun, 05 Jul 2009 17:16:19 +0200 |
parents | 033d260cfc9b |
children | 19885b43130e |
line wrap: on
line diff
--- a/dstep/objc/bridge/Type.d Thu Jun 18 22:00:13 2009 +0200 +++ b/dstep/objc/bridge/Type.d Sun Jul 05 17:16:19 2009 +0200 @@ -14,6 +14,24 @@ import dstep.objc.objc; +template ObjcType (T) +{ + static if (needsEncapsulation!(T)) + alias id ObjcType; + + else + alias T ObjcType; +} + +template needsEncapsulation (T) +{ + static if (is(T == class)) + const needsEncapsulation = true; + + else + const needsEncapsulation = false; +} + template ObjcTypeTuple (TList...) { alias replaceClasses!(TList).types ObjcTypeTuple;