Mercurial > projects > dstep
comparison dstep/foundation/NSMethodSignature.d @ 14:89f3c3ef1fd2
Added the Foundation framework
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Mon, 03 Aug 2009 15:23:15 +0200 |
parents | |
children | 7ff919f595d5 |
comparison
equal
deleted
inserted
replaced
13:4f583f7e242e | 14:89f3c3ef1fd2 |
---|---|
1 /** | |
2 * Copyright: Copyright (c) 2009 Jacob Carlborg. | |
3 * Authors: Jacob Carlborg | |
4 * Version: Initial created: Aug 3, 2009 | |
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) | |
6 */ | |
7 module dstep.foundation.NSMethodSignature; | |
8 | |
9 import dstep.foundation.NSObject; | |
10 import dstep.objc.bridge.Bridge; | |
11 import dstep.objc.objc : id; | |
12 | |
13 class NSMethodSignature : NSObject | |
14 { | |
15 mixin ObjcWrap; | |
16 | |
17 static NSMethodSignature signatureWithObjCTypes (char* types) | |
18 { | |
19 return invokeObjcSelfClass!(NSMethodSignature, "signatureWithObjCTypes:", char*)(typesreturn result is this.objcObject ? this : (result !is null ? new NSMethodSignature(result) : null); } | |
20 | |
21 NSUInteger numberOfArguments () | |
22 { | |
23 return invokeObjcSelf!(NSUInteger, "numberOfArguments"); | |
24 } | |
25 | |
26 char* getArgumentTypeAtIndex (NSUInteger idx) | |
27 { | |
28 return invokeObjcSelf!(char*, "getArgumentTypeAtIndex:", NSUInteger)(idx); | |
29 } | |
30 | |
31 NSUInteger frameLength () | |
32 { | |
33 return invokeObjcSelf!(NSUInteger, "frameLength"); | |
34 } | |
35 | |
36 bool isOneway () | |
37 { | |
38 return invokeObjcSelf!(bool, "isOneway"); | |
39 } | |
40 | |
41 char* methodReturnType () | |
42 { | |
43 return invokeObjcSelf!(char*, "methodReturnType"); | |
44 } | |
45 | |
46 NSUInteger methodReturnLength () | |
47 { | |
48 return invokeObjcSelf!(NSUInteger, "methodReturnLength"); | |
49 } | |
50 } | |
51 |