Mercurial > projects > dwt-mac
comparison dwt/internal/cocoa/NSXMLParser.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.NSXMLParser; | 14 module dwt.internal.cocoa.NSXMLParser; |
15 | 15 |
16 import dwt.internal.cocoa.id; | |
16 import dwt.internal.cocoa.NSData; | 17 import dwt.internal.cocoa.NSData; |
17 import dwt.internal.cocoa.NSError; | 18 import dwt.internal.cocoa.NSError; |
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; |
35 super(id); | 36 super(id); |
36 } | 37 } |
37 | 38 |
38 public void abortParsing () | 39 public void abortParsing () |
39 { | 40 { |
40 OS.objc_msgSend(this.id, OS.sel_abortParsing); | 41 OS.objc_msgSend(this.id_, OS.sel_abortParsing); |
41 } | 42 } |
42 | 43 |
43 public NSInteger columnNumber () | 44 public NSInteger columnNumber () |
44 { | 45 { |
45 return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_columnNumber); | 46 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_columnNumber); |
46 } | 47 } |
47 | 48 |
48 public id delegatee () | 49 public id delegatee () |
49 { | 50 { |
50 objc.id result = OS.objc_msgSend(this.id, OS.sel_delegate); | 51 objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate); |
51 return result !is null ? new id(result) : null; | 52 return result !is null ? new id(result) : null; |
52 } | 53 } |
53 | 54 |
54 public id initWithContentsOfURL (NSURL url) | 55 public id initWithContentsOfURL (NSURL url) |
55 { | 56 { |
56 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithContentsOfURL_1, url !is null ? url.id : null); | 57 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContentsOfURL_1, url !is null ? url.id_ : null); |
57 return result !is null ? new id(result) : null; | 58 return result !is null ? new id(result) : null; |
58 } | 59 } |
59 | 60 |
60 public id initWithData (NSData data) | 61 public id initWithData (NSData data) |
61 { | 62 { |
62 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithData_1, data !is null ? data.id : null); | 63 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithData_1, data !is null ? data.id_ : null); |
63 return result !is null ? new id(result) : null; | 64 return result !is null ? new id(result) : null; |
64 } | 65 } |
65 | 66 |
66 public NSInteger lineNumber () | 67 public NSInteger lineNumber () |
67 { | 68 { |
68 return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_lineNumber); | 69 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_lineNumber); |
69 } | 70 } |
70 | 71 |
71 public bool parse () | 72 public bool parse () |
72 { | 73 { |
73 return OS.objc_msgSend(this.id, OS.sel_parse) !is null; | 74 return OS.objc_msgSend(this.id_, OS.sel_parse) !is null; |
74 } | 75 } |
75 | 76 |
76 public NSError parserError () | 77 public NSError parserError () |
77 { | 78 { |
78 objc.id result = OS.objc_msgSend(this.id, OS.sel_parserError); | 79 objc.id result = OS.objc_msgSend(this.id_, OS.sel_parserError); |
79 return result !is null ? new NSError(result) : null; | 80 return result !is null ? new NSError(result) : null; |
80 } | 81 } |
81 | 82 |
82 public NSString publicID () | 83 public NSString publicID () |
83 { | 84 { |
84 objc.id result = OS.objc_msgSend(this.id, OS.sel_publicID); | 85 objc.id result = OS.objc_msgSend(this.id_, OS.sel_publicID); |
85 return result !is null ? new NSString(result) : null; | 86 return result !is null ? new NSString(result) : null; |
86 } | 87 } |
87 | 88 |
88 public void setDelegate (id delegatee) | 89 public void setDelegate (id delegatee) |
89 { | 90 { |
90 OS.objc_msgSend(this.id, OS.sel_setDelegate_1, delegatee !is null ? delegatee.id : null); | 91 OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, delegatee !is null ? delegatee.id_ : null); |
91 } | 92 } |
92 | 93 |
93 public void setShouldProcessNamespaces (bool shouldProcessNamespaces) | 94 public void setShouldProcessNamespaces (bool shouldProcessNamespaces) |
94 { | 95 { |
95 OS.objc_msgSend(this.id, OS.sel_setShouldProcessNamespaces_1, shouldProcessNamespaces); | 96 OS.objc_msgSend(this.id_, OS.sel_setShouldProcessNamespaces_1, shouldProcessNamespaces); |
96 } | 97 } |
97 | 98 |
98 public void setShouldReportNamespacePrefixes (bool shouldReportNamespacePrefixes) | 99 public void setShouldReportNamespacePrefixes (bool shouldReportNamespacePrefixes) |
99 { | 100 { |
100 OS.objc_msgSend(this.id, OS.sel_setShouldReportNamespacePrefixes_1, shouldReportNamespacePrefixes); | 101 OS.objc_msgSend(this.id_, OS.sel_setShouldReportNamespacePrefixes_1, shouldReportNamespacePrefixes); |
101 } | 102 } |
102 | 103 |
103 public void setShouldResolveExternalEntities (bool shouldResolveExternalEntities) | 104 public void setShouldResolveExternalEntities (bool shouldResolveExternalEntities) |
104 { | 105 { |
105 OS.objc_msgSend(this.id, OS.sel_setShouldResolveExternalEntities_1, shouldResolveExternalEntities); | 106 OS.objc_msgSend(this.id_, OS.sel_setShouldResolveExternalEntities_1, shouldResolveExternalEntities); |
106 } | 107 } |
107 | 108 |
108 public bool shouldProcessNamespaces () | 109 public bool shouldProcessNamespaces () |
109 { | 110 { |
110 return OS.objc_msgSend(this.id, OS.sel_shouldProcessNamespaces) !is null; | 111 return OS.objc_msgSend(this.id_, OS.sel_shouldProcessNamespaces) !is null; |
111 } | 112 } |
112 | 113 |
113 public bool shouldReportNamespacePrefixes () | 114 public bool shouldReportNamespacePrefixes () |
114 { | 115 { |
115 return OS.objc_msgSend(this.id, OS.sel_shouldReportNamespacePrefixes) !is null; | 116 return OS.objc_msgSend(this.id_, OS.sel_shouldReportNamespacePrefixes) !is null; |
116 } | 117 } |
117 | 118 |
118 public bool shouldResolveExternalEntities () | 119 public bool shouldResolveExternalEntities () |
119 { | 120 { |
120 return OS.objc_msgSend(this.id, OS.sel_shouldResolveExternalEntities) !is null; | 121 return OS.objc_msgSend(this.id_, OS.sel_shouldResolveExternalEntities) !is null; |
121 } | 122 } |
122 | 123 |
123 public NSString systemID () | 124 public NSString systemID () |
124 { | 125 { |
125 objc.id result = OS.objc_msgSend(this.id, OS.sel_systemID); | 126 objc.id result = OS.objc_msgSend(this.id_, OS.sel_systemID); |
126 return result !is null ? new NSString(result) : null; | 127 return result !is null ? new NSString(result) : null; |
127 } | 128 } |
128 | 129 |
129 } | 130 } |