Mercurial > projects > dstep
comparison dstep/appkit/NSPredicateEditorRowTemplate.d @ 16:19885b43130e
Huge update, the bridge actually works now
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Sun, 03 Jan 2010 22:06:11 +0100 |
parents | |
children | b9de51448c6b |
comparison
equal
deleted
inserted
replaced
15:7ff919f595d5 | 16:19885b43130e |
---|---|
1 /** | |
2 * Copyright: Copyright (c) 2009 Jacob Carlborg. | |
3 * Authors: Jacob Carlborg | |
4 * Version: Initial created: Sep 24, 2009 | |
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) | |
6 */ | |
7 module dstep.appkit.NSPredicateEditorRowTemplate; | |
8 | |
9 import dstep.foundation.NSArray; | |
10 import dstep.coredata.NSAttributeDescription; | |
11 import dstep.coredata.NSEntityDescription; | |
12 import dstep.foundation.NSCoder; | |
13 import dstep.foundation.NSComparisonPredicate; | |
14 import dstep.foundation.NSObjCRuntime; | |
15 import dstep.foundation.NSObject; | |
16 import dstep.foundation.NSPredicate; | |
17 import dstep.foundation.NSZone; | |
18 import dstep.objc.bridge.Bridge; | |
19 import dstep.objc.objc; | |
20 | |
21 class NSPredicateEditorRowTemplate : NSObject, INSCoding, INSCopying | |
22 { | |
23 mixin (ObjcWrap); | |
24 | |
25 this (NSCoder aDecoder) | |
26 { | |
27 super(typeof(this).alloc.initWithCoder(aDecoder).objcObject); | |
28 } | |
29 | |
30 void encodeWithCoder (NSCoder aCoder) | |
31 { | |
32 return invokeObjcSelf!(void, "encodeWithCoder:", NSCoder)(aCoder); | |
33 } | |
34 | |
35 typeof(this) initWithCoder (NSCoder aDecoder) | |
36 { | |
37 return invokeObjcSelf!(typeof(this), "initWithCoder:", NSCoder)(aDecoder); | |
38 } | |
39 | |
40 typeof(this) copyWithZone (NSZone* zone) | |
41 { | |
42 return invokeObjcSelf!(typeof(this), "copyWithZone:", NSZone*)(zone); | |
43 } | |
44 | |
45 double matchForPredicate (NSPredicate predicate) | |
46 { | |
47 return invokeObjcSelf!(double, "matchForPredicate:", NSPredicate)(predicate); | |
48 } | |
49 | |
50 NSArray templateViews () | |
51 { | |
52 return invokeObjcSelf!(NSArray, "templateViews"); | |
53 } | |
54 | |
55 void setPredicate (NSPredicate predicate) | |
56 { | |
57 return invokeObjcSelf!(void, "setPredicate:", NSPredicate)(predicate); | |
58 } | |
59 | |
60 NSPredicate predicateWithSubpredicates (NSArray subpredicates) | |
61 { | |
62 return invokeObjcSelf!(NSPredicate, "predicateWithSubpredicates:", NSArray)(subpredicates); | |
63 } | |
64 | |
65 NSArray displayableSubpredicatesOfPredicate (NSPredicate predicate) | |
66 { | |
67 return invokeObjcSelf!(NSArray, "displayableSubpredicatesOfPredicate:", NSPredicate)(predicate); | |
68 } | |
69 | |
70 NSPredicateEditorRowTemplate initWithLeftExpressions (NSArray leftExpressions, NSArray rightExpressions, uint modifier, NSArray operators, NSUInteger options) | |
71 { | |
72 id result = invokeObjcSelf!(id, "initWithLeftExpressions:rightExpressions:modifier:operators:options:", NSArray, NSArray, uint, NSArray, NSUInteger)(leftExpressions, rightExpressions, modifier, operators, options); | |
73 return result is this.objcObject ? this : (result !is null ? new NSPredicateEditorRowTemplate(result) : null); | |
74 } | |
75 | |
76 this (NSArray leftExpressions, NSArray rightExpressions, uint modifier, NSArray operators, NSUInteger options) | |
77 { | |
78 super(NSPredicateEditorRowTemplate.alloc.initWithLeftExpressions(leftExpressions, rightExpressions, modifier, operators, options).objcObject); | |
79 } | |
80 | |
81 NSPredicateEditorRowTemplate initWithLeftExpressions (NSArray leftExpressions, uint attributeType, uint modifier, NSArray operators, NSUInteger options) | |
82 { | |
83 id result = invokeObjcSelf!(id, "initWithLeftExpressions:rightExpressionAttributeType:modifier:operators:options:", NSArray, uint, uint, NSArray, NSUInteger)(leftExpressions, attributeType, modifier, operators, options); | |
84 return result is this.objcObject ? this : (result !is null ? new NSPredicateEditorRowTemplate(result) : null); | |
85 } | |
86 | |
87 this (NSArray leftExpressions, uint attributeType, uint modifier, NSArray operators, NSUInteger options) | |
88 { | |
89 super(NSPredicateEditorRowTemplate.alloc.initWithLeftExpressions(leftExpressions, attributeType, modifier, operators, options).objcObject); | |
90 } | |
91 | |
92 NSPredicateEditorRowTemplate initWithCompoundTypes (NSArray compoundTypes) | |
93 { | |
94 id result = invokeObjcSelf!(id, "initWithCompoundTypes:", NSArray)(compoundTypes); | |
95 return result is this.objcObject ? this : (result !is null ? new NSPredicateEditorRowTemplate(result) : null); | |
96 } | |
97 | |
98 this (NSArray compoundTypes) | |
99 { | |
100 super(NSPredicateEditorRowTemplate.alloc.initWithCompoundTypes(compoundTypes).objcObject); | |
101 } | |
102 | |
103 NSArray leftExpressions () | |
104 { | |
105 return invokeObjcSelf!(NSArray, "leftExpressions"); | |
106 } | |
107 | |
108 NSArray rightExpressions () | |
109 { | |
110 return invokeObjcSelf!(NSArray, "rightExpressions"); | |
111 } | |
112 | |
113 uint rightExpressionAttributeType () | |
114 { | |
115 return invokeObjcSelf!(uint, "rightExpressionAttributeType"); | |
116 } | |
117 | |
118 uint modifier () | |
119 { | |
120 return invokeObjcSelf!(uint, "modifier"); | |
121 } | |
122 | |
123 NSArray operators () | |
124 { | |
125 return invokeObjcSelf!(NSArray, "operators"); | |
126 } | |
127 | |
128 NSUInteger options () | |
129 { | |
130 return invokeObjcSelf!(NSUInteger, "options"); | |
131 } | |
132 | |
133 NSArray compoundTypes () | |
134 { | |
135 return invokeObjcSelf!(NSArray, "compoundTypes"); | |
136 } | |
137 | |
138 static NSArray templatesWithAttributeKeyPaths (NSArray keyPaths, NSEntityDescription entityDescription) | |
139 { | |
140 return invokeObjcSelfClass!(NSArray, "templatesWithAttributeKeyPaths:inEntityDescription:", NSArray, NSEntityDescription)(keyPaths, entityDescription); | |
141 } | |
142 | |
143 } | |
144 |