Mercurial > projects > dwt-mac
comparison dwt/internal/cocoa/NSXMLDTDNode.d @ 0:380af2bdd8e5
Upload of whole dwt tree
author | Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com> |
---|---|
date | Sat, 09 Aug 2008 17:00:02 +0200 |
parents | |
children | 8b48be5454ce |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:380af2bdd8e5 |
---|---|
1 /******************************************************************************* | |
2 * Copyright (c) 2007 IBM Corporation and others. | |
3 * All rights reserved. This program and the accompanying materials | |
4 * are made available under the terms of the Eclipse Public License v1.0 | |
5 * which accompanies this distribution, and is available at | |
6 * http://www.eclipse.org/legal/epl-v10.html | |
7 * | |
8 * Contributors: | |
9 * IBM Corporation - initial API and implementation | |
10 * | |
11 * Port to the D Programming language: | |
12 * Jacob Carlborg <jacob.carlborg@gmail.com> | |
13 *******************************************************************************/ | |
14 module dwt.internal.cocoa.NSXMLDTDNode; | |
15 | |
16 import dwt.internal.cocoa.id; | |
17 import dwt.internal.cocoa.NSString; | |
18 import dwt.internal.cocoa.NSXMLNode; | |
19 import dwt.internal.cocoa.OS; | |
20 import objc = dwt.internal.objc.runtime; | |
21 | |
22 | |
23 | |
24 enum NSXMLDTDNodeKind : NSUInteger | |
25 { | |
26 NSXMLEntityGeneralKind = 1, | |
27 NSXMLEntityParsedKind, | |
28 NSXMLEntityUnparsedKind, | |
29 NSXMLEntityParameterKind, | |
30 NSXMLEntityPredefined, | |
31 | |
32 NSXMLAttributeCDATAKind, | |
33 NSXMLAttributeIDKind, | |
34 NSXMLAttributeIDRefKind, | |
35 NSXMLAttributeIDRefsKind, | |
36 NSXMLAttributeEntityKind, | |
37 NSXMLAttributeEntitiesKind, | |
38 NSXMLAttributeNMTokenKind, | |
39 NSXMLAttributeNMTokensKind, | |
40 NSXMLAttributeEnumerationKind, | |
41 NSXMLAttributeNotationKind, | |
42 | |
43 NSXMLElementDeclarationUndefinedKind, | |
44 NSXMLElementDeclarationEmptyKind, | |
45 NSXMLElementDeclarationAnyKind, | |
46 NSXMLElementDeclarationMixedKind, | |
47 NSXMLElementDeclarationElementKind | |
48 } | |
49 | |
50 alias NSXMLDTDNodeKind.NSXMLEntityGeneralKind NSXMLEntityGeneralKind; | |
51 alias NSXMLDTDNodeKind.NSXMLEntityParsedKind NSXMLEntityParsedKind; | |
52 alias NSXMLDTDNodeKind.NSXMLEntityUnparsedKind NSXMLEntityUnparsedKind; | |
53 alias NSXMLDTDNodeKind.NSXMLEntityParameterKind NSXMLEntityParameterKind; | |
54 alias NSXMLDTDNodeKind.NSXMLEntityPredefined NSXMLEntityPredefined; | |
55 | |
56 alias NSXMLDTDNodeKind.NSXMLAttributeCDATAKind NSXMLAttributeCDATAKind; | |
57 alias NSXMLDTDNodeKind.NSXMLAttributeIDKind NSXMLAttributeIDKind; | |
58 alias NSXMLDTDNodeKind.NSXMLAttributeIDRefKind NSXMLAttributeIDRefKind; | |
59 alias NSXMLDTDNodeKind.NSXMLAttributeIDRefsKind NSXMLAttributeIDRefsKind; | |
60 alias NSXMLDTDNodeKind.NSXMLAttributeEntityKind NSXMLAttributeEntityKind; | |
61 alias NSXMLDTDNodeKind.NSXMLAttributeEntitiesKind NSXMLAttributeEntitiesKind; | |
62 alias NSXMLDTDNodeKind.NSXMLAttributeNMTokenKind NSXMLAttributeNMTokenKind; | |
63 alias NSXMLDTDNodeKind.NSXMLAttributeNMTokensKind NSXMLAttributeNMTokensKind; | |
64 alias NSXMLDTDNodeKind.NSXMLAttributeEnumerationKind NSXMLAttributeEnumerationKind; | |
65 alias NSXMLDTDNodeKind.NSXMLAttributeNotationKind NSXMLAttributeNotationKind; | |
66 | |
67 alias NSXMLDTDNodeKind.NSXMLElementDeclarationUndefinedKind NSXMLElementDeclarationUndefinedKind; | |
68 alias NSXMLDTDNodeKind.NSXMLElementDeclarationEmptyKind NSXMLElementDeclarationEmptyKind; | |
69 alias NSXMLDTDNodeKind.NSXMLElementDeclarationAnyKind NSXMLElementDeclarationAnyKind; | |
70 alias NSXMLDTDNodeKind.NSXMLElementDeclarationMixedKind NSXMLElementDeclarationMixedKind; | |
71 alias NSXMLDTDNodeKind.NSXMLElementDeclarationElementKind NSXMLElementDeclarationElementKind; | |
72 | |
73 | |
74 | |
75 public class NSXMLDTDNode : NSXMLNode | |
76 { | |
77 | |
78 public this () | |
79 { | |
80 super(); | |
81 } | |
82 | |
83 public this (objc.id id) | |
84 { | |
85 super(id); | |
86 } | |
87 | |
88 public NSXMLDTDNodeKind DTDKind () | |
89 { | |
90 return cast(NSXMLDTDNodeKind) OS.objc_msgSend(this.id, OS.sel_DTDKind); | |
91 } | |
92 | |
93 public id initWithXMLString (NSString string) | |
94 { | |
95 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithXMLString_1, string !is null ? string.id : null); | |
96 return result !is null ? new id(result) : null; | |
97 } | |
98 | |
99 public bool isExternal () | |
100 { | |
101 return OS.objc_msgSend(this.id, OS.sel_isExternal) !is null; | |
102 } | |
103 | |
104 public NSString notationName () | |
105 { | |
106 objc.id result = OS.objc_msgSend(this.id, OS.sel_notationName); | |
107 return result !is null ? new NSString(result) : null; | |
108 } | |
109 | |
110 public NSString publicID () | |
111 { | |
112 objc.id result = OS.objc_msgSend(this.id, OS.sel_publicID); | |
113 return result !is null ? new NSString(result) : null; | |
114 } | |
115 | |
116 public void setDTDKind (NSXMLDTDNodeKind kind) | |
117 { | |
118 OS.objc_msgSend(this.id, OS.sel_setDTDKind_1, kind); | |
119 } | |
120 | |
121 public void setNotationName (NSString notationName) | |
122 { | |
123 OS.objc_msgSend(this.id, OS.sel_setNotationName_1, notationName !is null ? notationName.id : null); | |
124 } | |
125 | |
126 public void setPublicID (NSString publicID) | |
127 { | |
128 OS.objc_msgSend(this.id, OS.sel_setPublicID_1, publicID !is null ? publicID.id : null); | |
129 } | |
130 | |
131 public void setSystemID (NSString systemID) | |
132 { | |
133 OS.objc_msgSend(this.id, OS.sel_setSystemID_1, systemID !is null ? systemID.id : null); | |
134 } | |
135 | |
136 public NSString systemID () | |
137 { | |
138 objc.id result = OS.objc_msgSend(this.id, OS.sel_systemID); | |
139 return result !is null ? new NSString(result) : null; | |
140 } | |
141 | |
142 } |