Mercurial > projects > dstep
annotate dstep/foundation/NSDecimalNumber.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 |
rev | line source |
---|---|
14 | 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.NSDecimalNumber; | |
8 | |
9 import dstep.foundation.NSDecimal; | |
10 import dstep.foundation.NSDictionary; | |
11 import dstep.foundation.NSScanner; | |
12 import dstep.foundation.NSValue; | |
13 import dstep.objc.bridge.Bridge; | |
14 import dstep.objc.objc : id; | |
15 | |
16 import bindings = dstep.foundation.NSDecimalNumber_bindings; | |
17 | |
18 const NSString NSDecimalNumberExactnessException; | |
19 const NSString NSDecimalNumberOverflowException; | |
20 const NSString NSDecimalNumberUnderflowException; | |
21 const NSString NSDecimalNumberDivideByZeroException; | |
22 | |
23 static this () | |
24 { | |
25 NSDecimalNumberExactnessException = new NSString(bindings.NSDecimalNumberExactnessException); | |
26 NSDecimalNumberOverflowException = new NSString(bindings.NSDecimalNumberOverflowException); | |
27 NSDecimalNumberUnderflowException = new NSString(bindings.NSDecimalNumberUnderflowException); | |
28 NSDecimalNumberDivideByZeroException = new NSString(bindings.NSDecimalNumberDivideByZeroException); | |
29 } | |
30 | |
31 class NSDecimalNumber : NSNumber | |
32 { | |
33 mixin ObjcWrap; | |
34 | |
35 Object initWithMantissa (ulong mantissa, short exponent, bool flag) | |
36 { | |
37 return invokeObjcSelf!(Object, "initWithMantissa:exponent:isNegative:", ulong, short, bool)(mantissa, exponent, flag); | |
38 } | |
39 | |
40 this (ulong mantissa, short exponent, bool flag) | |
41 { | |
42 objcObject = Bridge.invokeObjcClassMethod!(id, "alloc")(objcClass); | |
43 id result = Bridge.invokeObjcMethod!(id, "initWithMantissa:exponent:isNegative:", ulong, short, bool)(objcObject, mantissa, exponent, flag); | |
44 | |
45 if (result) | |
46 objcObject = ret; | |
47 | |
48 dObject = this; | |
49 } | |
50 | |
51 Object initWithDecimal (NSDecimal dcm) | |
52 { | |
53 return invokeObjcSelf!(Object, "initWithDecimal:", NSDecimal)(dcm); | |
54 } | |
55 | |
56 this (NSDecimal dcm) | |
57 { | |
58 objcObject = Bridge.invokeObjcClassMethod!(id, "alloc")(objcClass); | |
59 id result = Bridge.invokeObjcMethod!(id, "initWithDecimal:", NSDecimal)(objcObject, dcm); | |
60 | |
61 if (result) | |
62 objcObject = ret; | |
63 | |
64 dObject = this; | |
65 } | |
66 | |
67 Object initWithString (NSString numberValue) | |
68 { | |
69 return invokeObjcSelf!(Object, "initWithString:", NSString)(numberValue); | |
70 } | |
71 | |
72 this (NSString numberValue) | |
73 { | |
74 objcObject = Bridge.invokeObjcClassMethod!(id, "alloc")(objcClass); | |
75 id result = Bridge.invokeObjcMethod!(id, "initWithString:", NSString)(objcObject, numberValue); | |
76 | |
77 if (result) | |
78 objcObject = ret; | |
79 | |
80 dObject = this; | |
81 } | |
82 | |
83 Object initWithString (NSString numberValue, Object locale) | |
84 { | |
85 return invokeObjcSelf!(Object, "initWithString:locale:", NSString, Object)(numberValue, locale); | |
86 } | |
87 | |
88 this (NSString numberValue, Object locale) | |
89 { | |
90 objcObject = Bridge.invokeObjcClassMethod!(id, "alloc")(objcClass); | |
91 id result = Bridge.invokeObjcMethod!(id, "initWithString:locale:", NSString, Object)(objcObject, numberValue, locale); | |
92 | |
93 if (result) | |
94 objcObject = ret; | |
95 | |
96 dObject = this; | |
97 } | |
98 | |
99 NSString descriptionWithLocale (Object locale) | |
100 { | |
101 return invokeObjcSelf!(NSString, "descriptionWithLocale:", Object)(locale); | |
102 } | |
103 | |
104 NSDecimal decimalValue () | |
105 { | |
106 return invokeObjcSelf!(NSDecimal, "decimalValue"); | |
107 } | |
108 | |
109 static NSDecimalNumber decimalNumberWithMantissa (ulong mantissa, short exponent, bool flag) | |
110 { | |
15
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
111 return invokeObjcSelfClass!(NSDecimalNumber, "decimalNumberWithMantissa:exponent:isNegative:", ulong, short, bool)(mantissa, exponent, flag); |
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
112 } |
14 | 113 |
114 static NSDecimalNumber decimalNumberWithDecimal (NSDecimal dcm) | |
115 { | |
15
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
116 return invokeObjcSelfClass!(NSDecimalNumber, "decimalNumberWithDecimal:", NSDecimal)(dcm); |
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
117 } |
14 | 118 |
119 static NSDecimalNumber decimalNumberWithString (NSString numberValue) | |
120 { | |
15
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
121 return invokeObjcSelfClass!(NSDecimalNumber, "decimalNumberWithString:", NSString)(numberValue); |
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
122 } |
14 | 123 |
124 static NSDecimalNumber decimalNumberWithString (NSString numberValue, Object locale) | |
125 { | |
15
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
126 return invokeObjcSelfClass!(NSDecimalNumber, "decimalNumberWithString:locale:", NSString, Object)(numberValue, locale); |
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
127 } |
14 | 128 |
129 static NSDecimalNumber zero () | |
130 { | |
15
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
131 return invokeObjcSelfClass!(NSDecimalNumber, "zero"); |
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
132 } |
14 | 133 |
134 static NSDecimalNumber one () | |
135 { | |
15
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
136 return invokeObjcSelfClass!(NSDecimalNumber, "one"); |
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
137 } |
14 | 138 |
139 static NSDecimalNumber minimumDecimalNumber () | |
140 { | |
15
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
141 return invokeObjcSelfClass!(NSDecimalNumber, "minimumDecimalNumber"); |
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
142 } |
14 | 143 |
144 static NSDecimalNumber maximumDecimalNumber () | |
145 { | |
15
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
146 return invokeObjcSelfClass!(NSDecimalNumber, "maximumDecimalNumber"); |
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
147 } |
14 | 148 |
149 static NSDecimalNumber notANumber () | |
150 { | |
15
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
151 return invokeObjcSelfClass!(NSDecimalNumber, "notANumber"); |
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
152 } |
14 | 153 |
154 NSDecimalNumber decimalNumberByAdding (NSDecimalNumber decimalNumber) | |
155 { | |
15
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
156 id result = invokeObjcSelf!(id, "decimalNumberByAdding:", NSDecimalNumber)(decimalNumber); |
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
157 return result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null); |
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
158 } |
14 | 159 |
160 NSDecimalNumber decimalNumberByAdding (NSDecimalNumber decimalNumber, INSDecimalNumberBehaviors behavior) | |
161 { | |
15
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
162 id result = invokeObjcSelf!(id, "decimalNumberByAdding:withBehavior:", NSDecimalNumber, INSDecimalNumberBehaviors)(decimalNumber, behavior); |
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
163 return result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null); |
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
164 } |
14 | 165 |
166 NSDecimalNumber decimalNumberBySubtracting (NSDecimalNumber decimalNumber) | |
167 { | |
15
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
168 id result = invokeObjcSelf!(id, "decimalNumberBySubtracting:", NSDecimalNumber)(decimalNumber); |
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
169 return result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null); |
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
170 } |
14 | 171 |
172 NSDecimalNumber decimalNumberBySubtracting (NSDecimalNumber decimalNumber, INSDecimalNumberBehaviors behavior) | |
173 { | |
15
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
174 id result = invokeObjcSelf!(id, "decimalNumberBySubtracting:withBehavior:", NSDecimalNumber, INSDecimalNumberBehaviors)(decimalNumber, behavior); |
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
175 return result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null); |
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
176 } |
14 | 177 |
178 NSDecimalNumber decimalNumberByMultiplyingBy (NSDecimalNumber decimalNumber) | |
179 { | |
15
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
180 id result = invokeObjcSelf!(id, "decimalNumberByMultiplyingBy:", NSDecimalNumber)(decimalNumber); |
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
181 return result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null); |
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
182 } |
14 | 183 |
184 NSDecimalNumber decimalNumberByMultiplyingBy (NSDecimalNumber decimalNumber, INSDecimalNumberBehaviors behavior) | |
185 { | |
15
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
186 id result = invokeObjcSelf!(id, "decimalNumberByMultiplyingBy:withBehavior:", NSDecimalNumber, INSDecimalNumberBehaviors)(decimalNumber, behavior); |
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
187 return result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null); |
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
188 } |
14 | 189 |
190 NSDecimalNumber decimalNumberByDividingBy (NSDecimalNumber decimalNumber) | |
191 { | |
15
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
192 id result = invokeObjcSelf!(id, "decimalNumberByDividingBy:", NSDecimalNumber)(decimalNumber); |
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
193 return result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null); |
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
194 } |
14 | 195 |
196 NSDecimalNumber decimalNumberByDividingBy (NSDecimalNumber decimalNumber, INSDecimalNumberBehaviors behavior) | |
197 { | |
15
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
198 id result = invokeObjcSelf!(id, "decimalNumberByDividingBy:withBehavior:", NSDecimalNumber, INSDecimalNumberBehaviors)(decimalNumber, behavior); |
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
199 return result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null); |
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
200 } |
14 | 201 |
202 NSDecimalNumber decimalNumberByRaisingToPower (NSUInteger power) | |
203 { | |
15
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
204 id result = invokeObjcSelf!(id, "decimalNumberByRaisingToPower:", NSUInteger)(power); |
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
205 return result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null); |
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
206 } |
14 | 207 |
208 NSDecimalNumber decimalNumberByRaisingToPower (NSUInteger power, INSDecimalNumberBehaviors behavior) | |
209 { | |
15
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
210 id result = invokeObjcSelf!(id, "decimalNumberByRaisingToPower:withBehavior:", NSUInteger, INSDecimalNumberBehaviors)(power, behavior); |
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
211 return result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null); |
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
212 } |
14 | 213 |
214 NSDecimalNumber decimalNumberByMultiplyingByPowerOf10 (short power) | |
215 { | |
15
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
216 id result = invokeObjcSelf!(id, "decimalNumberByMultiplyingByPowerOf10:", short)(power); |
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
217 return result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null); |
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
218 } |
14 | 219 |
220 NSDecimalNumber decimalNumberByMultiplyingByPowerOf10 (short power, INSDecimalNumberBehaviors behavior) | |
221 { | |
15
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
222 id result = invokeObjcSelf!(id, "decimalNumberByMultiplyingByPowerOf10:withBehavior:", short, INSDecimalNumberBehaviors)(power, behavior); |
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
223 return result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null); |
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
224 } |
14 | 225 |
226 NSDecimalNumber decimalNumberByRoundingAccordingToBehavior (INSDecimalNumberBehaviors behavior) | |
227 { | |
15
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
228 id result = invokeObjcSelf!(id, "decimalNumberByRoundingAccordingToBehavior:", INSDecimalNumberBehaviors)(behavior); |
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
229 return result is this.objcObject ? this : (result !is null ? new NSDecimalNumber(result) : null); |
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
230 } |
14 | 231 |
232 int compare (NSNumber decimalNumber) | |
233 { | |
234 return invokeObjcSelf!(int, "compare:", NSNumber)(decimalNumber); | |
235 } | |
236 | |
237 static void setDefaultBehavior (INSDecimalNumberBehaviors behavior) | |
238 { | |
239 return invokeObjcSelfClass!(void, "setDefaultBehavior:", INSDecimalNumberBehaviors)(behavior); | |
240 } | |
241 | |
242 static INSDecimalNumberBehaviors defaultBehavior () | |
243 { | |
244 return invokeObjcSelfClass!(INSDecimalNumberBehaviors, "defaultBehavior"); | |
245 } | |
246 | |
247 char* objCType () | |
248 { | |
249 return invokeObjcSelf!(char*, "objCType"); | |
250 } | |
251 | |
252 double doubleValue () | |
253 { | |
254 return invokeObjcSelf!(double, "doubleValue"); | |
255 } | |
256 } | |
257 | |
258 class NSDecimalNumberHandler : NSObject, INSDecimalNumberBehaviors, INSCoding | |
259 { | |
260 mixin ObjcWrap; | |
261 | |
262 static Object defaultDecimalNumberHandler () | |
263 { | |
264 return invokeObjcSelfClass!(Object, "defaultDecimalNumberHandler"); | |
265 } | |
266 | |
267 Object initWithRoundingMode (uint roundingMode, short scale, bool exact, bool overflow, bool underflow, bool divideByZero) | |
268 { | |
269 return invokeObjcSelf!(Object, "initWithRoundingMode:scale:raiseOnExactness:raiseOnOverflow:raiseOnUnderflow:raiseOnDivideByZero:", uint, short, bool, bool, bool, bool)(roundingMode, scale, exact, overflow, underflow, divideByZero); | |
270 } | |
271 | |
272 this (uint roundingMode, short scale, bool exact, bool overflow, bool underflow, bool divideByZero) | |
273 { | |
274 objcObject = Bridge.invokeObjcClassMethod!(id, "alloc")(objcClass); | |
275 id result = Bridge.invokeObjcMethod!(id, "initWithRoundingMode:scale:raiseOnExactness:raiseOnOverflow:raiseOnUnderflow:raiseOnDivideByZero:", uint, short, bool, bool, bool, bool)(objcObject, roundingMode, scale, exact, overflow, underflow, divideByZero); | |
276 | |
277 if (result) | |
278 objcObject = ret; | |
279 | |
280 dObject = this; | |
281 } | |
282 | |
283 static Object decimalNumberHandlerWithRoundingMode (uint roundingMode, short scale, bool exact, bool overflow, bool underflow, bool divideByZero) | |
284 { | |
285 return invokeObjcSelfClass!(Object, "decimalNumberHandlerWithRoundingMode:scale:raiseOnExactness:raiseOnOverflow:raiseOnUnderflow:raiseOnDivideByZero:", uint, short, bool, bool, bool, bool)(roundingMode, scale, exact, overflow, underflow, divideByZero); | |
286 } | |
287 | |
288 uint roundingMode () | |
289 { | |
290 return invokeObjcSelf!(uint, "roundingMode"); | |
291 } | |
292 | |
293 short scale () | |
294 { | |
295 return invokeObjcSelf!(short, "scale"); | |
296 } | |
297 | |
298 NSDecimalNumber exceptionDuringOperation (SEL operation, uint error, NSDecimalNumber leftOperand, NSDecimalNumber rightOperand) | |
299 { | |
300 return invokeObjcSelf!(NSDecimalNumber, "exceptionDuringOperation:error:leftOperand:rightOperand:", SEL, uint, NSDecimalNumber, NSDecimalNumber)(operation, error, leftOperand, rightOperand); | |
301 } | |
302 | |
303 void encodeWithCoder (NSCoder aCoder) | |
304 { | |
305 return invokeObjcSelf!(void, "encodeWithCoder:", NSCoder)(aCoder); | |
306 } | |
307 | |
308 Object initWithCoder (NSCoder aDecoder) | |
309 { | |
310 return invokeObjcSelf!(Object, "initWithCoder:", NSCoder)(aDecoder); | |
311 } | |
312 | |
313 this (NSCoder aDecoder) | |
314 { | |
315 objcObject = Bridge.invokeObjcClassMethod!(id, "alloc")(objcClass); | |
316 id result = Bridge.invokeObjcMethod!(id, "initWithCoder:", NSCoder)(objcObject, aDecoder); | |
317 | |
318 if (result) | |
319 objcObject = ret; | |
320 | |
321 dObject = this; | |
322 } | |
323 } | |
324 | |
325 interface INSDecimalNumberBehaviors | |
326 { | |
327 uint roundingMode (); | |
328 short scale (); | |
329 NSDecimalNumber exceptionDuringOperation (SEL operation, uint error, NSDecimalNumber leftOperand, NSDecimalNumber rightOperand); | |
330 } | |
331 | |
332 template TNSDecimalNumberExtensions () | |
333 { | |
334 NSDecimal decimalValue () | |
335 { | |
336 return invokeObjcSelf!(NSDecimal, "decimalValue"); | |
337 } | |
338 } | |
339 | |
340 template TNSDecimalNumberScanning () | |
341 { | |
342 bool scanDecimal (NSDecimal* dcm) | |
343 { | |
344 return invokeObjcSelf!(bool, "scanDecimal:", NSDecimal*)(dcm); | |
345 } | |
346 } | |
347 |