diff dwt/internal/cocoa/NSXMLDTD.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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/cocoa/NSXMLDTD.d	Sat Aug 09 17:00:02 2008 +0200
@@ -0,0 +1,135 @@
+/*******************************************************************************
+ * Copyright (c) 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     
+ * Port to the D Programming language:
+ *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *******************************************************************************/
+module dwt.internal.cocoa.NSXMLDTD;
+
+import dwt.internal.cocoa.id;
+import dwt.internal.cocoa.NSArray;
+import dwt.internal.cocoa.NSData;
+import dwt.internal.cocoa.NSInteger;
+import dwt.internal.cocoa.NSString;
+import dwt.internal.cocoa.NSURL;
+import dwt.internal.cocoa.NSXMLDTDNode;
+import dwt.internal.cocoa.NSXMLNode;
+import dwt.internal.cocoa.OS;
+import objc = dwt.internal.objc.runtime;
+
+public class NSXMLDTD : NSXMLNode
+{
+
+    public this ()
+    {
+        super();
+    }
+
+    public this (objc.id id)
+    {
+        super(id);
+    }
+
+    public void addChild (NSXMLNode child)
+    {
+        OS.objc_msgSend(this.id, OS.sel_addChild_1, child !is null ? child.id : null);
+    }
+
+    public NSXMLDTDNode attributeDeclarationForName (NSString name, NSString elementName)
+    {
+        objc.id result = OS.objc_msgSend(this.id, OS.sel_attributeDeclarationForName_1elementName_1, name !is null ? name.id : null,
+                elementName !is null ? elementName.id : null);
+        return result !is null ? new NSXMLDTDNode(result) : null;
+    }
+
+    public NSXMLDTDNode elementDeclarationForName (NSString name)
+    {
+        objc.id result = OS.objc_msgSend(this.id, OS.sel_elementDeclarationForName_1, name !is null ? name.id : null);
+        return result !is null ? new NSXMLDTDNode(result) : null;
+    }
+
+    public NSXMLDTDNode entityDeclarationForName (NSString name)
+    {
+        objc.id result = OS.objc_msgSend(this.id, OS.sel_entityDeclarationForName_1, name !is null ? name.id : null);
+        return result !is null ? new NSXMLDTDNode(result) : null;
+    }
+
+    public id initWithContentsOfURL (NSURL url, NSUInteger mask, /*NSError** */objc.id** error)
+    {
+        objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithContentsOfURL_1options_1error_1, url !is null ? url.id : null, mask, error);
+        return result !is null ? new id(result) : null;
+    }
+
+    public id initWithData (NSData data, NSUInteger mask, /*NSError** */objc.id** error)
+    {
+        objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithData_1options_1error_1, data !is null ? data.id : null, mask, error);
+        return result !is null ? new id(result) : null;
+    }
+
+    public void insertChild (NSXMLNode child, NSUInteger index)
+    {
+        OS.objc_msgSend(this.id, OS.sel_insertChild_1atIndex_1, child !is null ? child.id : null, index);
+    }
+
+    public void insertChildren (NSArray children, NSUInteger index)
+    {
+        OS.objc_msgSend(this.id, OS.sel_insertChildren_1atIndex_1, children !is null ? children.id : null, index);
+    }
+
+    public NSXMLDTDNode notationDeclarationForName (NSString name)
+    {
+        objc.id result = OS.objc_msgSend(this.id, OS.sel_notationDeclarationForName_1, name !is null ? name.id : null);
+        return result !is null ? new NSXMLDTDNode(result) : null;
+    }
+
+    public static NSXMLDTDNode predefinedEntityDeclarationForName (NSString name)
+    {
+        objc.id result = OS.objc_msgSend(OS.class_NSXMLDTD, OS.sel_predefinedEntityDeclarationForName_1, name !is null ? name.id : null);
+        return result !is null ? new NSXMLDTDNode(result) : null;
+    }
+
+    public NSString publicID ()
+    {
+        objc.id result = OS.objc_msgSend(this.id, OS.sel_publicID);
+        return result !is null ? new NSString(result) : null;
+    }
+
+    public void removeChildAtIndex (NSUInteger index)
+    {
+        OS.objc_msgSend(this.id, OS.sel_removeChildAtIndex_1, index);
+    }
+
+    public void replaceChildAtIndex (NSUInteger index, NSXMLNode node)
+    {
+        OS.objc_msgSend(this.id, OS.sel_replaceChildAtIndex_1withNode_1, index, node !is null ? node.id : null);
+    }
+
+    public void setChildren (NSArray children)
+    {
+        OS.objc_msgSend(this.id, OS.sel_setChildren_1, children !is null ? children.id : null);
+    }
+
+    public void setPublicID (NSString publicID)
+    {
+        OS.objc_msgSend(this.id, OS.sel_setPublicID_1, publicID !is null ? publicID.id : null);
+    }
+
+    public void setSystemID (NSString systemID)
+    {
+        OS.objc_msgSend(this.id, OS.sel_setSystemID_1, systemID !is null ? systemID.id : null);
+    }
+
+    public NSString systemID ()
+    {
+        objc.id result = OS.objc_msgSend(this.id, OS.sel_systemID);
+        return result !is null ? new NSString(result) : null;
+    }
+
+}