comparison dwt/internal/cocoa/NSScanner.d @ 1:8b48be5454ce

The internal cocoa classes compile now
author Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
date Tue, 19 Aug 2008 17:35:17 +0200
parents 380af2bdd8e5
children f565d3a95c0a
comparison
equal deleted inserted replaced
0:380af2bdd8e5 1:8b48be5454ce
11 * Port to the D Programming language: 11 * Port to the D Programming language:
12 * Jacob Carlborg <jacob.carlborg@gmail.com> 12 * Jacob Carlborg <jacob.carlborg@gmail.com>
13 *******************************************************************************/ 13 *******************************************************************************/
14 module dwt.internal.cocoa.NSScanner; 14 module dwt.internal.cocoa.NSScanner;
15 15
16 import dwt.internal.cocoa.id;
16 import dwt.internal.cocoa.NSCharacterSet; 17 import dwt.internal.cocoa.NSCharacterSet;
17 import dwt.internal.cocoa.NSDecimal; 18 import dwt.internal.cocoa.NSDecimal;
18 import dwt.internal.cocoa.NSInteger; 19 import dwt.internal.cocoa.NSInteger;
19 import dwt.internal.cocoa.NSObject; 20 import dwt.internal.cocoa.NSObject;
20 import dwt.internal.cocoa.NSString; 21 import dwt.internal.cocoa.NSString;
34 super(id); 35 super(id);
35 } 36 }
36 37
37 public bool caseSensitive () 38 public bool caseSensitive ()
38 { 39 {
39 return OS.objc_msgSend(this.id, OS.sel_caseSensitive) !is null; 40 return OS.objc_msgSend(this.id_, OS.sel_caseSensitive) !is null;
40 } 41 }
41 42
42 public NSCharacterSet charactersToBeSkipped () 43 public NSCharacterSet charactersToBeSkipped ()
43 { 44 {
44 objc.id result = OS.objc_msgSend(this.id, OS.sel_charactersToBeSkipped); 45 objc.id result = OS.objc_msgSend(this.id_, OS.sel_charactersToBeSkipped);
45 return result !is null ? new NSCharacterSet(result) : null; 46 return result !is null ? new NSCharacterSet(result) : null;
46 } 47 }
47 48
48 public NSScanner initWithString (NSString string) 49 public NSScanner initWithString (NSString string)
49 { 50 {
50 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithString_1, string !is null ? string.id : null); 51 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithString_1, string !is null ? string.id_ : null);
51 return result !is null ? this : null; 52 return result !is null ? this : null;
52 } 53 }
53 54
54 public bool isAtEnd () 55 public bool isAtEnd ()
55 { 56 {
56 return OS.objc_msgSend(this.id, OS.sel_isAtEnd) !is null; 57 return OS.objc_msgSend(this.id_, OS.sel_isAtEnd) !is null;
57 } 58 }
58 59
59 public id locale () 60 public id locale ()
60 { 61 {
61 objc.id result = OS.objc_msgSend(this.id, OS.sel_locale); 62 objc.id result = OS.objc_msgSend(this.id_, OS.sel_locale);
62 return result !is null ? new id(result) : null; 63 return result !is null ? new id(result) : null;
63 } 64 }
64 65
65 public static id localizedScannerWithString (NSString string) 66 public static id localizedScannerWithString (NSString string)
66 { 67 {
67 objc.id result = OS.objc_msgSend(OS.class_NSScanner, OS.sel_localizedScannerWithString_1, string !is null ? string.id : null); 68 objc.id result = OS.objc_msgSend(OS.class_NSScanner, OS.sel_localizedScannerWithString_1, string !is null ? string.id_ : null);
68 return result !is null ? new id(result) : null; 69 return result !is null ? new id(result) : null;
69 } 70 }
70 71
71 public bool scanCharactersFromSet (NSCharacterSet set, objc.id** value) 72 public bool scanCharactersFromSet (NSCharacterSet set, objc.id** value)
72 { 73 {
73 return OS.objc_msgSend(this.id, OS.sel_scanCharactersFromSet_1intoString_1, set !is null ? set.id : null, value) !is null; 74 return OS.objc_msgSend(this.id_, OS.sel_scanCharactersFromSet_1intoString_1, set !is null ? set.id_ : null, value) !is null;
74 } 75 }
75 76
76 public bool scanDecimal (NSDecimal* dcm) 77 public bool scanDecimal (NSDecimal* dcm)
77 { 78 {
78 return OS.objc_msgSend(this.id, OS.sel_scanDecimal_1, dcm) !is null; 79 return OS.objc_msgSend(this.id_, OS.sel_scanDecimal_1, dcm) !is null;
79 } 80 }
80 81
81 public bool scanDouble (double* value) 82 public bool scanDouble (double* value)
82 { 83 {
83 return OS.objc_msgSend(this.id, OS.sel_scanDouble_1, value) !is null; 84 return OS.objc_msgSend(this.id_, OS.sel_scanDouble_1, value) !is null;
84 } 85 }
85 86
86 public bool scanFloat (float* value) 87 public bool scanFloat (float* value)
87 { 88 {
88 return OS.objc_msgSend(this.id, OS.sel_scanFloat_1, value) !is null; 89 return OS.objc_msgSend(this.id_, OS.sel_scanFloat_1, value) !is null;
89 } 90 }
90 91
91 public bool scanHexDouble (objc.id result) 92 public bool scanHexDouble (objc.id result)
92 { 93 {
93 return OS.objc_msgSend(this.id, OS.sel_scanHexDouble_1, result) !is null; 94 return OS.objc_msgSend(this.id_, OS.sel_scanHexDouble_1, result) !is null;
94 } 95 }
95 96
96 public bool scanHexFloat (objc.id result) 97 public bool scanHexFloat (objc.id result)
97 { 98 {
98 return OS.objc_msgSend(this.id, OS.sel_scanHexFloat_1, result) !is null; 99 return OS.objc_msgSend(this.id_, OS.sel_scanHexFloat_1, result) !is null;
99 } 100 }
100 101
101 public bool scanHexInt (uint* value) 102 public bool scanHexInt (uint* value)
102 { 103 {
103 return OS.objc_msgSend(this.id, OS.sel_scanHexInt_1, value) !is null; 104 return OS.objc_msgSend(this.id_, OS.sel_scanHexInt_1, value) !is null;
104 } 105 }
105 106
106 public bool scanHexLongLong (objc.id result) 107 public bool scanHexLongLong (objc.id result)
107 { 108 {
108 return OS.objc_msgSend(this.id, OS.sel_scanHexLongLong_1, result) !is null; 109 return OS.objc_msgSend(this.id_, OS.sel_scanHexLongLong_1, result) !is null;
109 } 110 }
110 111
111 public bool scanInt (int* value) 112 public bool scanInt (int* value)
112 { 113 {
113 return OS.objc_msgSend(this.id, OS.sel_scanInt_1, value) !is null; 114 return OS.objc_msgSend(this.id_, OS.sel_scanInt_1, value) !is null;
114 } 115 }
115 116
116 public bool scanInteger (NSInteger* value) 117 public bool scanInteger (NSInteger* value)
117 { 118 {
118 return OS.objc_msgSend(this.id, OS.sel_scanInteger_1, value) !is null; 119 return OS.objc_msgSend(this.id_, OS.sel_scanInteger_1, value) !is null;
119 } 120 }
120 121
121 public NSUInteger scanLocation () 122 public NSUInteger scanLocation ()
122 { 123 {
123 return cast(NSUInteger) OS.objc_msgSend(this.id, OS.sel_scanLocation); 124 return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_scanLocation);
124 } 125 }
125 126
126 public bool scanLongLong (long* value) 127 public bool scanLongLong (long* value)
127 { 128 {
128 return OS.objc_msgSend(this.id, OS.sel_scanLongLong_1, value) !is null; 129 return OS.objc_msgSend(this.id_, OS.sel_scanLongLong_1, value) !is null;
129 } 130 }
130 131
131 public bool scanString (NSString string, objc.id** value) 132 public bool scanString (NSString string, objc.id** value)
132 { 133 {
133 return OS.objc_msgSend(this.id, OS.sel_scanString_1intoString_1, string !is null ? string.id : null, value) !is null; 134 return OS.objc_msgSend(this.id_, OS.sel_scanString_1intoString_1, string !is null ? string.id_ : null, value) !is null;
134 } 135 }
135 136
136 public bool scanUpToCharactersFromSet (NSCharacterSet set, objc.id** value) 137 public bool scanUpToCharactersFromSet (NSCharacterSet set, objc.id** value)
137 { 138 {
138 return OS.objc_msgSend(this.id, OS.sel_scanUpToCharactersFromSet_1intoString_1, set !is null ? set.id : null, value) !is null; 139 return OS.objc_msgSend(this.id_, OS.sel_scanUpToCharactersFromSet_1intoString_1, set !is null ? set.id_ : null, value) !is null;
139 } 140 }
140 141
141 public bool scanUpToString (NSString string, objc.id** value) 142 public bool scanUpToString (NSString string, objc.id** value)
142 { 143 {
143 return OS.objc_msgSend(this.id, OS.sel_scanUpToString_1intoString_1, string !is null ? string.id : null, value) !is null; 144 return OS.objc_msgSend(this.id_, OS.sel_scanUpToString_1intoString_1, string !is null ? string.id_ : null, value) !is null;
144 } 145 }
145 146
146 public static id scannerWithString (NSString string) 147 public static id scannerWithString (NSString string)
147 { 148 {
148 objc.id result = OS.objc_msgSend(OS.class_NSScanner, OS.sel_scannerWithString_1, string !is null ? string.id : null); 149 objc.id result = OS.objc_msgSend(OS.class_NSScanner, OS.sel_scannerWithString_1, string !is null ? string.id_ : null);
149 return result !is null ? new id(result) : null; 150 return result !is null ? new id(result) : null;
150 } 151 }
151 152
152 public void setCaseSensitive (bool flag) 153 public void setCaseSensitive (bool flag)
153 { 154 {
154 OS.objc_msgSend(this.id, OS.sel_setCaseSensitive_1, flag); 155 OS.objc_msgSend(this.id_, OS.sel_setCaseSensitive_1, flag);
155 } 156 }
156 157
157 public void setCharactersToBeSkipped (NSCharacterSet set) 158 public void setCharactersToBeSkipped (NSCharacterSet set)
158 { 159 {
159 OS.objc_msgSend(this.id, OS.sel_setCharactersToBeSkipped_1, set !is null ? set.id : null); 160 OS.objc_msgSend(this.id_, OS.sel_setCharactersToBeSkipped_1, set !is null ? set.id_ : null);
160 } 161 }
161 162
162 public void setLocale (id locale) 163 public void setLocale (id locale)
163 { 164 {
164 OS.objc_msgSend(this.id, OS.sel_setLocale_1, locale !is null ? locale.id : null); 165 OS.objc_msgSend(this.id_, OS.sel_setLocale_1, locale !is null ? locale.id_ : null);
165 } 166 }
166 167
167 public void setScanLocation (NSUInteger pos) 168 public void setScanLocation (NSUInteger pos)
168 { 169 {
169 OS.objc_msgSend(this.id, OS.sel_setScanLocation_1, pos); 170 OS.objc_msgSend(this.id_, OS.sel_setScanLocation_1, pos);
170 } 171 }
171 172
172 public NSString string () 173 public NSString string ()
173 { 174 {
174 objc.id result = OS.objc_msgSend(this.id, OS.sel_string); 175 objc.id result = OS.objc_msgSend(this.id_, OS.sel_string);
175 return result !is null ? new NSString(result) : null; 176 return result !is null ? new NSString(result) : null;
176 } 177 }
177 178
178 } 179 }