diff dwt/internal/cocoa/NSCharacterSet.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/NSCharacterSet.d	Sat Aug 09 17:00:02 2008 +0200
@@ -0,0 +1,183 @@
+/*******************************************************************************
+ * 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.NSCharacterSet;
+
+import dwt.internal.cocoa.id;
+import dwt.internal.cocoa.NSData;
+import dwt.internal.cocoa.NSObject;
+import dwt.internal.cocoa.NSRange;
+import dwt.internal.cocoa.NSString;
+import dwt.internal.cocoa.OS;
+import objc = dwt.internal.objc.runtime;
+
+public class NSCharacterSet : NSObject
+{
+
+    public this ()
+    {
+        super();
+    }
+
+    public this (objc.id id)
+    {
+        super(id);
+    }
+
+    public static id alphanumericCharacterSet ()
+    {
+        objc.id result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_alphanumericCharacterSet);
+        return result !is null ? new id(result) : null;
+    }
+
+    public NSData bitmapRepresentation ()
+    {
+        objc.id result = OS.objc_msgSend(this.id, OS.sel_bitmapRepresentation);
+        return result !is null ? new NSData(result) : null;
+    }
+
+    public static id capitalizedLetterCharacterSet ()
+    {
+        objc.id result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_capitalizedLetterCharacterSet);
+        return result !is null ? new id(result) : null;
+    }
+
+    public bool characterIsMember (short aCharacter)
+    {
+        return OS.objc_msgSend(this.id, OS.sel_characterIsMember_1, aCharacter) !is null;
+    }
+
+    public static id characterSetWithBitmapRepresentation (NSData data)
+    {
+        objc.id result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_characterSetWithBitmapRepresentation_1, data !is null ? data.id : null);
+        return result !is null ? new id(result) : null;
+    }
+
+    public static id characterSetWithCharactersInString (NSString aString)
+    {
+        objc.id result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_characterSetWithCharactersInString_1, aString !is null ? aString.id : null);
+        return result !is null ? new id(result) : null;
+    }
+
+    public static id characterSetWithContentsOfFile (NSString fName)
+    {
+        objc.id result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_characterSetWithContentsOfFile_1, fName !is null ? fName.id : null);
+        return result !is null ? new id(result) : null;
+    }
+
+    public static id characterSetWithRange (NSRange aRange)
+    {
+        objc.id result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_characterSetWithRange_1, aRange);
+        return result !is null ? new id(result) : null;
+    }
+
+    public static id controlCharacterSet ()
+    {
+        objc.id result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_controlCharacterSet);
+        return result !is null ? new id(result) : null;
+    }
+
+    public static id decimalDigitCharacterSet ()
+    {
+        objc.id result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_decimalDigitCharacterSet);
+        return result !is null ? new id(result) : null;
+    }
+
+    public static id decomposableCharacterSet ()
+    {
+        objc.id result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_decomposableCharacterSet);
+        return result !is null ? new id(result) : null;
+    }
+
+    public bool hasMemberInPlane (byte thePlane)
+    {
+        return OS.objc_msgSend(this.id, OS.sel_hasMemberInPlane_1, thePlane) !is null;
+    }
+
+    public static id illegalCharacterSet ()
+    {
+        objc.id result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_illegalCharacterSet);
+        return result !is null ? new id(result) : null;
+    }
+
+    public NSCharacterSet invertedSet ()
+    {
+        objc.id result = OS.objc_msgSend(this.id, OS.sel_invertedSet);
+        return result is this.id ? this : (result !is null ? new NSCharacterSet(result) : null);
+    }
+
+    public bool isSupersetOfSet (NSCharacterSet theOtherSet)
+    {
+        return OS.objc_msgSend(this.id, OS.sel_isSupersetOfSet_1, theOtherSet !is null ? theOtherSet.id : null) !is null;
+    }
+
+    public static id letterCharacterSet ()
+    {
+        objc.id result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_letterCharacterSet);
+        return result !is null ? new id(result) : null;
+    }
+
+    public bool longCharacterIsMember (dchar theLongChar)
+    {
+        return OS.objc_msgSend(this.id, OS.sel_longCharacterIsMember_1, theLongChar) !is null;
+    }
+
+    public static id lowercaseLetterCharacterSet ()
+    {
+        objc.id result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_lowercaseLetterCharacterSet);
+        return result !is null ? new id(result) : null;
+    }
+
+    public static id newlineCharacterSet ()
+    {
+        objc.id result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_newlineCharacterSet);
+        return result !is null ? new id(result) : null;
+    }
+
+    public static id nonBaseCharacterSet ()
+    {
+        objc.id result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_nonBaseCharacterSet);
+        return result !is null ? new id(result) : null;
+    }
+
+    public static id punctuationCharacterSet ()
+    {
+        objc.id result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_punctuationCharacterSet);
+        return result !is null ? new id(result) : null;
+    }
+
+    public static id symbolCharacterSet ()
+    {
+        objc.id result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_symbolCharacterSet);
+        return result !is null ? new id(result) : null;
+    }
+
+    public static id uppercaseLetterCharacterSet ()
+    {
+        objc.id result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_uppercaseLetterCharacterSet);
+        return result !is null ? new id(result) : null;
+    }
+
+    public static id whitespaceAndNewlineCharacterSet ()
+    {
+        objc.id result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_whitespaceAndNewlineCharacterSet);
+        return result !is null ? new id(result) : null;
+    }
+
+    public static id whitespaceCharacterSet ()
+    {
+        objc.id result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_whitespaceCharacterSet);
+        return result !is null ? new id(result) : null;
+    }
+
+}