Mercurial > projects > dstep
diff dstep/objc/bridge/TypeEncoding.d @ 11:07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Sat, 01 Aug 2009 15:03:28 +0200 |
parents | 033d260cfc9b |
children | 19885b43130e |
line wrap: on
line diff
--- a/dstep/objc/bridge/TypeEncoding.d Thu Jul 09 23:25:18 2009 +0200 +++ b/dstep/objc/bridge/TypeEncoding.d Sat Aug 01 15:03:28 2009 +0200 @@ -154,3 +154,10 @@ return result; } +/** + * Converts the given string representing of a OSType into an integer. + */ +template getOSType (string osType) +{ + const getOSType = (cast(int)osType[0]) << 24 | (cast(int)osType[1]) << 16 | (cast(int)osType[2]) << 8 | (cast(int)osType[3]); +} \ No newline at end of file