comparison dwt/internal/cocoa/NSXMLElement.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
35 super(id); 35 super(id);
36 } 36 }
37 37
38 public void addAttribute (NSXMLNode attribute) 38 public void addAttribute (NSXMLNode attribute)
39 { 39 {
40 OS.objc_msgSend(this.id, OS.sel_addAttribute_1, attribute !is null ? attribute.id : null); 40 OS.objc_msgSend(this.id_, OS.sel_addAttribute_1, attribute !is null ? attribute.id_ : null);
41 } 41 }
42 42
43 public void addChild (NSXMLNode child) 43 public void addChild (NSXMLNode child)
44 { 44 {
45 OS.objc_msgSend(this.id, OS.sel_addChild_1, child !is null ? child.id : null); 45 OS.objc_msgSend(this.id_, OS.sel_addChild_1, child !is null ? child.id_ : null);
46 } 46 }
47 47
48 public void addNamespace (NSXMLNode aNamespace) 48 public void addNamespace (NSXMLNode aNamespace)
49 { 49 {
50 OS.objc_msgSend(this.id, OS.sel_addNamespace_1, aNamespace !is null ? aNamespace.id : null); 50 OS.objc_msgSend(this.id_, OS.sel_addNamespace_1, aNamespace !is null ? aNamespace.id_ : null);
51 } 51 }
52 52
53 public NSXMLNode attributeForLocalName (NSString localName, NSString URI) 53 public NSXMLNode attributeForLocalName (NSString localName, NSString URI)
54 { 54 {
55 objc.id result = OS.objc_msgSend(this.id, OS.sel_attributeForLocalName_1URI_1, localName !is null ? localName.id : null, 55 objc.id result = OS.objc_msgSend(this.id_, OS.sel_attributeForLocalName_1URI_1, localName !is null ? localName.id_ : null,
56 URI !is null ? URI.id : null); 56 URI !is null ? URI.id_ : null);
57 return result !is null ? new NSXMLNode(result) : null; 57 return result !is null ? new NSXMLNode(result) : null;
58 } 58 }
59 59
60 public NSXMLNode attributeForName (NSString name) 60 public NSXMLNode attributeForName (NSString name)
61 { 61 {
62 objc.id result = OS.objc_msgSend(this.id, OS.sel_attributeForName_1, name !is null ? name.id : null); 62 objc.id result = OS.objc_msgSend(this.id_, OS.sel_attributeForName_1, name !is null ? name.id_ : null);
63 return result !is null ? new NSXMLNode(result) : null; 63 return result !is null ? new NSXMLNode(result) : null;
64 } 64 }
65 65
66 public NSArray attributes () 66 public NSArray attributes ()
67 { 67 {
68 objc.id result = OS.objc_msgSend(this.id, OS.sel_attributes); 68 objc.id result = OS.objc_msgSend(this.id_, OS.sel_attributes);
69 return result !is null ? new NSArray(result) : null; 69 return result !is null ? new NSArray(result) : null;
70 } 70 }
71 71
72 public NSArray elementsForLocalName (NSString localName, NSString URI) 72 public NSArray elementsForLocalName (NSString localName, NSString URI)
73 { 73 {
74 objc.id result = OS.objc_msgSend(this.id, OS.sel_elementsForLocalName_1URI_1, localName !is null ? localName.id : null, 74 objc.id result = OS.objc_msgSend(this.id_, OS.sel_elementsForLocalName_1URI_1, localName !is null ? localName.id_ : null,
75 URI !is null ? URI.id : null); 75 URI !is null ? URI.id_ : null);
76 return result !is null ? new NSArray(result) : null; 76 return result !is null ? new NSArray(result) : null;
77 } 77 }
78 78
79 public NSArray elementsForName (NSString name) 79 public NSArray elementsForName (NSString name)
80 { 80 {
81 objc.id result = OS.objc_msgSend(this.id, OS.sel_elementsForName_1, name !is null ? name.id : null); 81 objc.id result = OS.objc_msgSend(this.id_, OS.sel_elementsForName_1, name !is null ? name.id_ : null);
82 return result !is null ? new NSArray(result) : null; 82 return result !is null ? new NSArray(result) : null;
83 } 83 }
84 84
85 public id initWithName_ (NSString name) 85 public id initWithName_ (NSString name)
86 { 86 {
87 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithName_1, name !is null ? name.id : null); 87 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithName_1, name !is null ? name.id_ : null);
88 return result !is null ? new id(result) : null; 88 return result !is null ? new id(result) : null;
89 } 89 }
90 90
91 public id initWithName_URI_ (NSString name, NSString URI) 91 public id initWithName_URI_ (NSString name, NSString URI)
92 { 92 {
93 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithName_1URI_1, name !is null ? name.id : null, URI !is null ? URI.id : null); 93 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithName_1URI_1, name !is null ? name.id_ : null, URI !is null ? URI.id_ : null);
94 return result !is null ? new id(result) : null; 94 return result !is null ? new id(result) : null;
95 } 95 }
96 96
97 public id initWithName_stringValue_ (NSString name, NSString string) 97 public id initWithName_stringValue_ (NSString name, NSString string)
98 { 98 {
99 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithName_1stringValue_1, name !is null ? name.id : null, 99 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithName_1stringValue_1, name !is null ? name.id_ : null,
100 string !is null ? string.id : null); 100 string !is null ? string.id_ : null);
101 return result !is null ? new id(result) : null; 101 return result !is null ? new id(result) : null;
102 } 102 }
103 103
104 public id initWithXMLString (NSString string, /*NSError** */objc.id** error) 104 public id initWithXMLString (NSString string, /*NSError** */objc.id** error)
105 { 105 {
106 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithXMLString_1error_1, string !is null ? string.id : null, error); 106 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithXMLString_1error_1, string !is null ? string.id_ : null, error);
107 return result !is null ? new id(result) : null; 107 return result !is null ? new id(result) : null;
108 } 108 }
109 109
110 public void insertChild (NSXMLNode child, NSUInteger index) 110 public void insertChild (NSXMLNode child, NSUInteger index)
111 { 111 {
112 OS.objc_msgSend(this.id, OS.sel_insertChild_1atIndex_1, child !is null ? child.id : null, index); 112 OS.objc_msgSend(this.id_, OS.sel_insertChild_1atIndex_1, child !is null ? child.id_ : null, index);
113 } 113 }
114 114
115 public void insertChildren (NSArray children, NSUInteger index) 115 public void insertChildren (NSArray children, NSUInteger index)
116 { 116 {
117 OS.objc_msgSend(this.id, OS.sel_insertChildren_1atIndex_1, children !is null ? children.id : null, index); 117 OS.objc_msgSend(this.id_, OS.sel_insertChildren_1atIndex_1, children !is null ? children.id_ : null, index);
118 } 118 }
119 119
120 public NSXMLNode namespaceForPrefix (NSString name) 120 public NSXMLNode namespaceForPrefix (NSString name)
121 { 121 {
122 objc.id result = OS.objc_msgSend(this.id, OS.sel_namespaceForPrefix_1, name !is null ? name.id : null); 122 objc.id result = OS.objc_msgSend(this.id_, OS.sel_namespaceForPrefix_1, name !is null ? name.id_ : null);
123 return result !is null ? new NSXMLNode(result) : null; 123 return result !is null ? new NSXMLNode(result) : null;
124 } 124 }
125 125
126 public NSArray namespaces () 126 public NSArray namespaces ()
127 { 127 {
128 objc.id result = OS.objc_msgSend(this.id, OS.sel_namespaces); 128 objc.id result = OS.objc_msgSend(this.id_, OS.sel_namespaces);
129 return result !is null ? new NSArray(result) : null; 129 return result !is null ? new NSArray(result) : null;
130 } 130 }
131 131
132 public void normalizeAdjacentTextNodesPreservingCDATA (bool preserve) 132 public void normalizeAdjacentTextNodesPreservingCDATA (bool preserve)
133 { 133 {
134 OS.objc_msgSend(this.id, OS.sel_normalizeAdjacentTextNodesPreservingCDATA_1, preserve); 134 OS.objc_msgSend(this.id_, OS.sel_normalizeAdjacentTextNodesPreservingCDATA_1, preserve);
135 } 135 }
136 136
137 public void removeAttributeForName (NSString name) 137 public void removeAttributeForName (NSString name)
138 { 138 {
139 OS.objc_msgSend(this.id, OS.sel_removeAttributeForName_1, name !is null ? name.id : null); 139 OS.objc_msgSend(this.id_, OS.sel_removeAttributeForName_1, name !is null ? name.id_ : null);
140 } 140 }
141 141
142 public void removeChildAtIndex (NSUInteger index) 142 public void removeChildAtIndex (NSUInteger index)
143 { 143 {
144 OS.objc_msgSend(this.id, OS.sel_removeChildAtIndex_1, index); 144 OS.objc_msgSend(this.id_, OS.sel_removeChildAtIndex_1, index);
145 } 145 }
146 146
147 public void removeNamespaceForPrefix (NSString name) 147 public void removeNamespaceForPrefix (NSString name)
148 { 148 {
149 OS.objc_msgSend(this.id, OS.sel_removeNamespaceForPrefix_1, name !is null ? name.id : null); 149 OS.objc_msgSend(this.id_, OS.sel_removeNamespaceForPrefix_1, name !is null ? name.id_ : null);
150 } 150 }
151 151
152 public void replaceChildAtIndex (NSUInteger index, NSXMLNode node) 152 public void replaceChildAtIndex (NSUInteger index, NSXMLNode node)
153 { 153 {
154 OS.objc_msgSend(this.id, OS.sel_replaceChildAtIndex_1withNode_1, index, node !is null ? node.id : null); 154 OS.objc_msgSend(this.id_, OS.sel_replaceChildAtIndex_1withNode_1, index, node !is null ? node.id_ : null);
155 } 155 }
156 156
157 public NSXMLNode resolveNamespaceForName (NSString name) 157 public NSXMLNode resolveNamespaceForName (NSString name)
158 { 158 {
159 objc.id result = OS.objc_msgSend(this.id, OS.sel_resolveNamespaceForName_1, name !is null ? name.id : null); 159 objc.id result = OS.objc_msgSend(this.id_, OS.sel_resolveNamespaceForName_1, name !is null ? name.id_ : null);
160 return result !is null ? new NSXMLNode(result) : null; 160 return result !is null ? new NSXMLNode(result) : null;
161 } 161 }
162 162
163 public NSString resolvePrefixForNamespaceURI (NSString namespaceURI) 163 public NSString resolvePrefixForNamespaceURI (NSString namespaceURI)
164 { 164 {
165 objc.id result = OS.objc_msgSend(this.id, OS.sel_resolvePrefixForNamespaceURI_1, namespaceURI !is null ? namespaceURI.id : null); 165 objc.id result = OS.objc_msgSend(this.id_, OS.sel_resolvePrefixForNamespaceURI_1, namespaceURI !is null ? namespaceURI.id_ : null);
166 return result !is null ? new NSString(result) : null; 166 return result !is null ? new NSString(result) : null;
167 } 167 }
168 168
169 public void setAttributes (NSArray attributes) 169 public void setAttributes (NSArray attributes)
170 { 170 {
171 OS.objc_msgSend(this.id, OS.sel_setAttributes_1, attributes !is null ? attributes.id : null); 171 OS.objc_msgSend(this.id_, OS.sel_setAttributes_1, attributes !is null ? attributes.id_ : null);
172 } 172 }
173 173
174 public void setAttributesAsDictionary (NSDictionary attributes) 174 public void setAttributesAsDictionary (NSDictionary attributes)
175 { 175 {
176 OS.objc_msgSend(this.id, OS.sel_setAttributesAsDictionary_1, attributes !is null ? attributes.id : null); 176 OS.objc_msgSend(this.id_, OS.sel_setAttributesAsDictionary_1, attributes !is null ? attributes.id_ : null);
177 } 177 }
178 178
179 public void setChildren (NSArray children) 179 public void setChildren (NSArray children)
180 { 180 {
181 OS.objc_msgSend(this.id, OS.sel_setChildren_1, children !is null ? children.id : null); 181 OS.objc_msgSend(this.id_, OS.sel_setChildren_1, children !is null ? children.id_ : null);
182 } 182 }
183 183
184 public void setNamespaces (NSArray namespaces) 184 public void setNamespaces (NSArray namespaces)
185 { 185 {
186 OS.objc_msgSend(this.id, OS.sel_setNamespaces_1, namespaces !is null ? namespaces.id : null); 186 OS.objc_msgSend(this.id_, OS.sel_setNamespaces_1, namespaces !is null ? namespaces.id_ : null);
187 } 187 }
188 188
189 } 189 }