comparison dstep/foundation/NSPredicate.d @ 15:7ff919f595d5

Added the Foundation framework, again
author Jacob Carlborg <doob@me.com>
date Mon, 03 Aug 2009 15:31:48 +0200
parents 89f3c3ef1fd2
children 19885b43130e
comparison
equal deleted inserted replaced
14:89f3c3ef1fd2 15:7ff919f595d5
16 { 16 {
17 mixin ObjcWrap; 17 mixin ObjcWrap;
18 18
19 static NSPredicate predicateWithFormat (NSString predicateFormat, NSArray arguments) 19 static NSPredicate predicateWithFormat (NSString predicateFormat, NSArray arguments)
20 { 20 {
21 return invokeObjcSelfClass!(NSPredicate, "predicateWithFormat:argumentArray:", NSString, NSArray)(predicateFormat, argumentsreturn result is this.objcObject ? this : (result !is null ? new NSPredicate(result) : null); } 21 return invokeObjcSelfClass!(NSPredicate, "predicateWithFormat:argumentArray:", NSString, NSArray)(predicateFormat, arguments);
22 }
22 23
23 static NSPredicate predicateWithFormat (NSString predicateWithFormat, ...) 24 static NSPredicate predicateWithFormat (NSString predicateWithFormat, ...)
24 { 25 {
25 return invokeObjcSelfClass!(NSPredicate, "predicateWithFormat:", NSString)(predicateWithFormatreturn result is this.objcObject ? this : (result !is null ? new NSPredicate(result) : null); } 26 return invokeObjcSelfClass!(NSPredicate, "predicateWithFormat:", NSString)(predicateWithFormat);
27 }
26 28
27 static NSPredicate predicateWithFormat (NSString predicateFormat, char* argList) 29 static NSPredicate predicateWithFormat (NSString predicateFormat, char* argList)
28 { 30 {
29 return invokeObjcSelfClass!(NSPredicate, "predicateWithFormat:arguments:", NSString, char*)(predicateFormat, argListreturn result is this.objcObject ? this : (result !is null ? new NSPredicate(result) : null); } 31 return invokeObjcSelfClass!(NSPredicate, "predicateWithFormat:arguments:", NSString, char*)(predicateFormat, argList);
32 }
30 33
31 static NSPredicate predicateWithValue (bool value) 34 static NSPredicate predicateWithValue (bool value)
32 { 35 {
33 return invokeObjcSelfClass!(NSPredicate, "predicateWithValue:", bool)(valuereturn result is this.objcObject ? this : (result !is null ? new NSPredicate(result) : null); } 36 return invokeObjcSelfClass!(NSPredicate, "predicateWithValue:", bool)(value);
37 }
34 38
35 NSString predicateFormat () 39 NSString predicateFormat ()
36 { 40 {
37 return invokeObjcSelf!(NSString, "predicateFormat"); 41 return invokeObjcSelf!(NSString, "predicateFormat");
38 } 42 }
39 43
40 NSPredicate predicateWithSubstitutionVariables (NSDictionary variables) 44 NSPredicate predicateWithSubstitutionVariables (NSDictionary variables)
41 { 45 {
42 id result = invokeObjcSelf!(id, "predicateWithSubstitutionVariables:", NSDictionary)(variablesreturn result is this.objcObject ? this : (result !is null ? new NSPredicate(result) : null); } 46 id result = invokeObjcSelf!(id, "predicateWithSubstitutionVariables:", NSDictionary)(variables);
47 return result is this.objcObject ? this : (result !is null ? new NSPredicate(result) : null);
48 }
43 49
44 bool evaluateWithObject (Object object) 50 bool evaluateWithObject (Object object)
45 { 51 {
46 return invokeObjcSelf!(bool, "evaluateWithObject:", Object)(object); 52 return invokeObjcSelf!(bool, "evaluateWithObject:", Object)(object);
47 } 53 }