Mercurial > projects > dwt-mac
comparison dwt/internal/cocoa/NSXMLDocument.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 |
---|---|
52 super(id); | 52 super(id); |
53 } | 53 } |
54 | 54 |
55 public NSXMLDTD DTD () | 55 public NSXMLDTD DTD () |
56 { | 56 { |
57 objc.id result = OS.objc_msgSend(this.id, OS.sel_DTD); | 57 objc.id result = OS.objc_msgSend(this.id_, OS.sel_DTD); |
58 return result !is null ? new NSXMLDTD(result) : null; | 58 return result !is null ? new NSXMLDTD(result) : null; |
59 } | 59 } |
60 | 60 |
61 public NSString MIMEType () | 61 public NSString MIMEType () |
62 { | 62 { |
63 objc.id result = OS.objc_msgSend(this.id, OS.sel_MIMEType); | 63 objc.id result = OS.objc_msgSend(this.id_, OS.sel_MIMEType); |
64 return result !is null ? new NSString(result) : null; | 64 return result !is null ? new NSString(result) : null; |
65 } | 65 } |
66 | 66 |
67 public NSData XMLData () | 67 public NSData XMLData () |
68 { | 68 { |
69 objc.id result = OS.objc_msgSend(this.id, OS.sel_XMLData); | 69 objc.id result = OS.objc_msgSend(this.id_, OS.sel_XMLData); |
70 return result !is null ? new NSData(result) : null; | 70 return result !is null ? new NSData(result) : null; |
71 } | 71 } |
72 | 72 |
73 public NSData XMLDataWithOptions (NSUInteger options) | 73 public NSData XMLDataWithOptions (NSUInteger options) |
74 { | 74 { |
75 objc.id result = OS.objc_msgSend(this.id, OS.sel_XMLDataWithOptions_1, options); | 75 objc.id result = OS.objc_msgSend(this.id_, OS.sel_XMLDataWithOptions_1, options); |
76 return result !is null ? new NSData(result) : null; | 76 return result !is null ? new NSData(result) : null; |
77 } | 77 } |
78 | 78 |
79 public void addChild (NSXMLNode child) | 79 public void addChild (NSXMLNode child) |
80 { | 80 { |
81 OS.objc_msgSend(this.id, OS.sel_addChild_1, child !is null ? child.id : null); | 81 OS.objc_msgSend(this.id_, OS.sel_addChild_1, child !is null ? child.id_ : null); |
82 } | 82 } |
83 | 83 |
84 public NSString characterEncoding () | 84 public NSString characterEncoding () |
85 { | 85 { |
86 objc.id result = OS.objc_msgSend(this.id, OS.sel_characterEncoding); | 86 objc.id result = OS.objc_msgSend(this.id_, OS.sel_characterEncoding); |
87 return result !is null ? new NSString(result) : null; | 87 return result !is null ? new NSString(result) : null; |
88 } | 88 } |
89 | 89 |
90 public NSXMLDocumentContentKind documentContentKind () | 90 public NSXMLDocumentContentKind documentContentKind () |
91 { | 91 { |
92 return cast(NSXMLDocumentContentKind) OS.objc_msgSend(this.id, OS.sel_documentContentKind); | 92 return cast(NSXMLDocumentContentKind) OS.objc_msgSend(this.id_, OS.sel_documentContentKind); |
93 } | 93 } |
94 | 94 |
95 public id initWithContentsOfURL (NSURL url, NSUInteger mask, /*NSError** */objc.id** error) | 95 public id initWithContentsOfURL (NSURL url, NSUInteger mask, /*NSError** */objc.id** error) |
96 { | 96 { |
97 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithContentsOfURL_1options_1error_1, url !is null ? url.id : null, mask, error); | 97 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContentsOfURL_1options_1error_1, url !is null ? url.id_ : null, mask, error); |
98 return result !is null ? new id(result) : null; | 98 return result !is null ? new id(result) : null; |
99 } | 99 } |
100 | 100 |
101 public id initWithData (NSData data, NSUInteger mask, /*NSError** */objc.id** error) | 101 public id initWithData (NSData data, NSUInteger mask, /*NSError** */objc.id** error) |
102 { | 102 { |
103 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithData_1options_1error_1, data !is null ? data.id : null, mask, error); | 103 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithData_1options_1error_1, data !is null ? data.id_ : null, mask, error); |
104 return result !is null ? new id(result) : null; | 104 return result !is null ? new id(result) : null; |
105 } | 105 } |
106 | 106 |
107 public id initWithRootElement (NSXMLElement element) | 107 public id initWithRootElement (NSXMLElement element) |
108 { | 108 { |
109 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithRootElement_1, element !is null ? element.id : null); | 109 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithRootElement_1, element !is null ? element.id_ : null); |
110 return result !is null ? new id(result) : null; | 110 return result !is null ? new id(result) : null; |
111 } | 111 } |
112 | 112 |
113 public id initWithXMLString (NSString string, NSUInteger mask, /*NSError** */objc.id** error) | 113 public id initWithXMLString (NSString string, NSUInteger mask, /*NSError** */objc.id** error) |
114 { | 114 { |
115 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithXMLString_1options_1error_1, string !is null ? string.id : null, mask, error); | 115 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithXMLString_1options_1error_1, string !is null ? string.id_ : null, mask, error); |
116 return result !is null ? new id(result) : null; | 116 return result !is null ? new id(result) : null; |
117 } | 117 } |
118 | 118 |
119 public void insertChild (NSXMLNode child, NSUInteger index) | 119 public void insertChild (NSXMLNode child, NSUInteger index) |
120 { | 120 { |
121 OS.objc_msgSend(this.id, OS.sel_insertChild_1atIndex_1, child !is null ? child.id : null, index); | 121 OS.objc_msgSend(this.id_, OS.sel_insertChild_1atIndex_1, child !is null ? child.id_ : null, index); |
122 } | 122 } |
123 | 123 |
124 public void insertChildren (NSArray children, NSUInteger index) | 124 public void insertChildren (NSArray children, NSUInteger index) |
125 { | 125 { |
126 OS.objc_msgSend(this.id, OS.sel_insertChildren_1atIndex_1, children !is null ? children.id : null, index); | 126 OS.objc_msgSend(this.id_, OS.sel_insertChildren_1atIndex_1, children !is null ? children.id_ : null, index); |
127 } | 127 } |
128 | 128 |
129 public bool isStandalone () | 129 public bool isStandalone () |
130 { | 130 { |
131 return OS.objc_msgSend(this.id, OS.sel_isStandalone) !is null; | 131 return OS.objc_msgSend(this.id_, OS.sel_isStandalone) !is null; |
132 } | 132 } |
133 | 133 |
134 public id objectByApplyingXSLT (NSData xslt, NSDictionary arguments, /*NSError** */objc.id** error) | 134 public id objectByApplyingXSLT (NSData xslt, NSDictionary arguments, /*NSError** */objc.id** error) |
135 { | 135 { |
136 objc.id result = OS.objc_msgSend(this.id, OS.sel_objectByApplyingXSLT_1arguments_1error_1, xslt !is null ? xslt.id : null, | 136 objc.id result = OS.objc_msgSend(this.id_, OS.sel_objectByApplyingXSLT_1arguments_1error_1, xslt !is null ? xslt.id_ : null, |
137 arguments !is null ? arguments.id : null, error); | 137 arguments !is null ? arguments.id_ : null, error); |
138 return result !is null ? new id(result) : null; | 138 return result !is null ? new id(result) : null; |
139 } | 139 } |
140 | 140 |
141 public id objectByApplyingXSLTAtURL (NSURL xsltURL, NSDictionary argument, /*NSError** */objc.id** error) | 141 public id objectByApplyingXSLTAtURL (NSURL xsltURL, NSDictionary argument, /*NSError** */objc.id** error) |
142 { | 142 { |
143 objc.id result = OS.objc_msgSend(this.id, OS.sel_objectByApplyingXSLTAtURL_1arguments_1error_1, xsltURL !is null ? xsltURL.id : null, | 143 objc.id result = OS.objc_msgSend(this.id_, OS.sel_objectByApplyingXSLTAtURL_1arguments_1error_1, xsltURL !is null ? xsltURL.id_ : null, |
144 argument !is null ? argument.id : null, error); | 144 argument !is null ? argument.id_ : null, error); |
145 return result !is null ? new id(result) : null; | 145 return result !is null ? new id(result) : null; |
146 } | 146 } |
147 | 147 |
148 public id objectByApplyingXSLTString (NSString xslt, NSDictionary arguments, /*NSError** */objc.id** error) | 148 public id objectByApplyingXSLTString (NSString xslt, NSDictionary arguments, /*NSError** */objc.id** error) |
149 { | 149 { |
150 objc.id result = OS.objc_msgSend(this.id, OS.sel_objectByApplyingXSLTString_1arguments_1error_1, xslt !is null ? xslt.id : null, | 150 objc.id result = OS.objc_msgSend(this.id_, OS.sel_objectByApplyingXSLTString_1arguments_1error_1, xslt !is null ? xslt.id_ : null, |
151 arguments !is null ? arguments.id : null, error); | 151 arguments !is null ? arguments.id_ : null, error); |
152 return result !is null ? new id(result) : null; | 152 return result !is null ? new id(result) : null; |
153 } | 153 } |
154 | 154 |
155 public void removeChildAtIndex (NSUInteger index) | 155 public void removeChildAtIndex (NSUInteger index) |
156 { | 156 { |
157 OS.objc_msgSend(this.id, OS.sel_removeChildAtIndex_1, index); | 157 OS.objc_msgSend(this.id_, OS.sel_removeChildAtIndex_1, index); |
158 } | 158 } |
159 | 159 |
160 public void replaceChildAtIndex (NSUInteger index, NSXMLNode node) | 160 public void replaceChildAtIndex (NSUInteger index, NSXMLNode node) |
161 { | 161 { |
162 OS.objc_msgSend(this.id, OS.sel_replaceChildAtIndex_1withNode_1, index, node !is null ? node.id : null); | 162 OS.objc_msgSend(this.id_, OS.sel_replaceChildAtIndex_1withNode_1, index, node !is null ? node.id_ : null); |
163 } | 163 } |
164 | 164 |
165 public static objc.Class replacementClassForClass (objc.Class cls) | 165 public static objc.Class replacementClassForClass (objc.Class cls) |
166 { | 166 { |
167 return cast(objc.Class) OS.objc_msgSend(OS.class_NSXMLDocument, OS.sel_replacementClassForClass_1, cls); | 167 return cast(objc.Class) OS.objc_msgSend(OS.class_NSXMLDocument, OS.sel_replacementClassForClass_1, cls); |
168 } | 168 } |
169 | 169 |
170 public NSXMLElement rootElement () | 170 public NSXMLElement rootElement () |
171 { | 171 { |
172 objc.id result = OS.objc_msgSend(this.id, OS.sel_rootElement); | 172 objc.id result = OS.objc_msgSend(this.id_, OS.sel_rootElement); |
173 return result !is null ? new NSXMLElement(result) : null; | 173 return result !is null ? new NSXMLElement(result) : null; |
174 } | 174 } |
175 | 175 |
176 public void setCharacterEncoding (NSString encoding) | 176 public void setCharacterEncoding (NSString encoding) |
177 { | 177 { |
178 OS.objc_msgSend(this.id, OS.sel_setCharacterEncoding_1, encoding !is null ? encoding.id : null); | 178 OS.objc_msgSend(this.id_, OS.sel_setCharacterEncoding_1, encoding !is null ? encoding.id_ : null); |
179 } | 179 } |
180 | 180 |
181 public void setChildren (NSArray children) | 181 public void setChildren (NSArray children) |
182 { | 182 { |
183 OS.objc_msgSend(this.id, OS.sel_setChildren_1, children !is null ? children.id : null); | 183 OS.objc_msgSend(this.id_, OS.sel_setChildren_1, children !is null ? children.id_ : null); |
184 } | 184 } |
185 | 185 |
186 public void setDTD (NSXMLDTD documentTypeDeclaration) | 186 public void setDTD (NSXMLDTD documentTypeDeclaration) |
187 { | 187 { |
188 OS.objc_msgSend(this.id, OS.sel_setDTD_1, documentTypeDeclaration !is null ? documentTypeDeclaration.id : null); | 188 OS.objc_msgSend(this.id_, OS.sel_setDTD_1, documentTypeDeclaration !is null ? documentTypeDeclaration.id_ : null); |
189 } | 189 } |
190 | 190 |
191 public void setDocumentContentKind (NSXMLDocumentContentKind kind) | 191 public void setDocumentContentKind (NSXMLDocumentContentKind kind) |
192 { | 192 { |
193 OS.objc_msgSend(this.id, OS.sel_setDocumentContentKind_1, kind); | 193 OS.objc_msgSend(this.id_, OS.sel_setDocumentContentKind_1, kind); |
194 } | 194 } |
195 | 195 |
196 public void setMIMEType (NSString MIMEType) | 196 public void setMIMEType (NSString MIMEType) |
197 { | 197 { |
198 OS.objc_msgSend(this.id, OS.sel_setMIMEType_1, MIMEType !is null ? MIMEType.id : null); | 198 OS.objc_msgSend(this.id_, OS.sel_setMIMEType_1, MIMEType !is null ? MIMEType.id_ : null); |
199 } | 199 } |
200 | 200 |
201 public void setRootElement (NSXMLNode root) | 201 public void setRootElement (NSXMLNode root) |
202 { | 202 { |
203 OS.objc_msgSend(this.id, OS.sel_setRootElement_1, root !is null ? root.id : null); | 203 OS.objc_msgSend(this.id_, OS.sel_setRootElement_1, root !is null ? root.id_ : null); |
204 } | 204 } |
205 | 205 |
206 public void setStandalone (bool standalone) | 206 public void setStandalone (bool standalone) |
207 { | 207 { |
208 OS.objc_msgSend(this.id, OS.sel_setStandalone_1, standalone); | 208 OS.objc_msgSend(this.id_, OS.sel_setStandalone_1, standalone); |
209 } | 209 } |
210 | 210 |
211 public void setVersion (NSString versionn) | 211 public void setVersion (NSString versionn) |
212 { | 212 { |
213 OS.objc_msgSend(this.id, OS.sel_setVersion_1, versionn !is null ? versionn.id : null); | 213 OS.objc_msgSend(this.id_, OS.sel_setVersion_1, versionn !is null ? versionn.id_ : null); |
214 } | 214 } |
215 | 215 |
216 public bool validateAndReturnError (/*NSError** */objc.id** error) | 216 public bool validateAndReturnError (/*NSError** */objc.id** error) |
217 { | 217 { |
218 return OS.objc_msgSend(this.id, OS.sel_validateAndReturnError_1, error) !is null; | 218 return OS.objc_msgSend(this.id_, OS.sel_validateAndReturnError_1, error) !is null; |
219 } | 219 } |
220 | 220 |
221 //public NSString version() { | 221 //public NSString version() { |
222 // objc.id result = OS.objc_msgSend(this.id, OS.sel_version); | 222 // objc.id result = OS.objc_msgSend(this.id_, OS.sel_version); |
223 // return result !is null ? new NSString(result) : null; | 223 // return result !is null ? new NSString(result) : null; |
224 //} | 224 //} |
225 | 225 |
226 } | 226 } |