Mercurial > projects > dstep
view dstep/objc/bridge/Type.d @ 1:033d260cfc9b
First upload of the bridge
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Thu, 18 Jun 2009 22:00:13 +0200 |
parents | |
children | 9fd439a28ce3 |
line wrap: on
line source
/** * Copyright: Copyright (c) 2009 Jacob Carlborg. * Authors: Jacob Carlborg * Version: Initial created: May 16, 2009 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) */ module dstep.objc.bridge.Type; version (Tango) import tango.core.Tuple; else import std.typetuple; import dstep.objc.objc; template ObjcTypeTuple (TList...) { alias replaceClasses!(TList).types ObjcTypeTuple; } private struct Wrap (TList...) { TList types; } private Wrap!(TList) replaceClasses (TList...) () { alias Tuple!(TList) Types; foreach (ref type ; Types) static if (is(type == class)) type = id; return Wrap!(Types); }