comparison dwt/internal/cocoa/NSHashTable.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
36 super(id); 36 super(id);
37 } 37 }
38 38
39 public void addObject (id object) 39 public void addObject (id object)
40 { 40 {
41 OS.objc_msgSend(this.id, OS.sel_addObject_1, object !is null ? object.id : null); 41 OS.objc_msgSend(this.id_, OS.sel_addObject_1, object !is null ? object.id_ : null);
42 } 42 }
43 43
44 public NSArray allObjects () 44 public NSArray allObjects ()
45 { 45 {
46 objc.id result = OS.objc_msgSend(this.id, OS.sel_allObjects); 46 objc.id result = OS.objc_msgSend(this.id_, OS.sel_allObjects);
47 return result !is null ? new NSArray(result) : null; 47 return result !is null ? new NSArray(result) : null;
48 } 48 }
49 49
50 public id anyObject () 50 public id anyObject ()
51 { 51 {
52 objc.id result = OS.objc_msgSend(this.id, OS.sel_anyObject); 52 objc.id result = OS.objc_msgSend(this.id_, OS.sel_anyObject);
53 return result !is null ? new id(result) : null; 53 return result !is null ? new id(result) : null;
54 } 54 }
55 55
56 public bool containsObject (id anObject) 56 public bool containsObject (id anObject)
57 { 57 {
58 return OS.objc_msgSend(this.id, OS.sel_containsObject_1, anObject !is null ? anObject.id : null) !is null; 58 return OS.objc_msgSend(this.id_, OS.sel_containsObject_1, anObject !is null ? anObject.id_ : null) !is null;
59 } 59 }
60 60
61 public NSUInteger count () 61 public NSUInteger count ()
62 { 62 {
63 return OS.objc_msgSend(this.id, OS.sel_count); 63 return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_count);
64 } 64 }
65 65
66 public static id hashTableWithOptions (NSPointerFunctionsOptions options) 66 public static id hashTableWithOptions (NSPointerFunctionsOptions options)
67 { 67 {
68 objc.id result = OS.objc_msgSend(OS.class_NSHashTable, OS.sel_hashTableWithOptions_1, options); 68 objc.id result = OS.objc_msgSend(OS.class_NSHashTable, OS.sel_hashTableWithOptions_1, options);
75 return result !is null ? new id(result) : null; 75 return result !is null ? new id(result) : null;
76 } 76 }
77 77
78 public id initWithOptions (NSPointerFunctionsOptions options, NSUInteger initialCapacity) 78 public id initWithOptions (NSPointerFunctionsOptions options, NSUInteger initialCapacity)
79 { 79 {
80 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithOptions_1capacity_1, options, initialCapacity); 80 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithOptions_1capacity_1, options, initialCapacity);
81 return result !is null ? new id(result) : null; 81 return result !is null ? new id(result) : null;
82 } 82 }
83 83
84 public id initWithPointerFunctions (NSPointerFunctions functions, NSUInteger initialCapacity) 84 public id initWithPointerFunctions (NSPointerFunctions functions, NSUInteger initialCapacity)
85 { 85 {
86 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithPointerFunctions_1capacity_1, functions !is null ? functions.id : null, 86 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithPointerFunctions_1capacity_1, functions !is null ? functions.id_ : null,
87 initialCapacity); 87 initialCapacity);
88 return result !is null ? new id(result) : null; 88 return result !is null ? new id(result) : null;
89 } 89 }
90 90
91 public void intersectHashTable (NSHashTable other) 91 public void intersectHashTable (NSHashTable other)
92 { 92 {
93 OS.objc_msgSend(this.id, OS.sel_intersectHashTable_1, other !is null ? other.id : null); 93 OS.objc_msgSend(this.id_, OS.sel_intersectHashTable_1, other !is null ? other.id_ : null);
94 } 94 }
95 95
96 public bool intersectsHashTable (NSHashTable other) 96 public bool intersectsHashTable (NSHashTable other)
97 { 97 {
98 return OS.objc_msgSend(this.id, OS.sel_intersectsHashTable_1, other !is null ? other.id : null) !is null; 98 return OS.objc_msgSend(this.id_, OS.sel_intersectsHashTable_1, other !is null ? other.id_ : null) !is null;
99 } 99 }
100 100
101 public bool isEqualToHashTable (NSHashTable other) 101 public bool isEqualToHashTable (NSHashTable other)
102 { 102 {
103 return OS.objc_msgSend(this.id, OS.sel_isEqualToHashTable_1, other !is null ? other.id : null) !is null; 103 return OS.objc_msgSend(this.id_, OS.sel_isEqualToHashTable_1, other !is null ? other.id_ : null) !is null;
104 } 104 }
105 105
106 public bool isSubsetOfHashTable (NSHashTable other) 106 public bool isSubsetOfHashTable (NSHashTable other)
107 { 107 {
108 return OS.objc_msgSend(this.id, OS.sel_isSubsetOfHashTable_1, other !is null ? other.id : null) !is null; 108 return OS.objc_msgSend(this.id_, OS.sel_isSubsetOfHashTable_1, other !is null ? other.id_ : null) !is null;
109 } 109 }
110 110
111 public id member (id object) 111 public id member (id object)
112 { 112 {
113 objc.id result = OS.objc_msgSend(this.id, OS.sel_member_1, object !is null ? object.id : null); 113 objc.id result = OS.objc_msgSend(this.id_, OS.sel_member_1, object !is null ? object.id_ : null);
114 return result !is null ? new id(result) : null; 114 return result !is null ? new id(result) : null;
115 } 115 }
116 116
117 public void minusHashTable (NSHashTable other) 117 public void minusHashTable (NSHashTable other)
118 { 118 {
119 OS.objc_msgSend(this.id, OS.sel_minusHashTable_1, other !is null ? other.id : null); 119 OS.objc_msgSend(this.id_, OS.sel_minusHashTable_1, other !is null ? other.id_ : null);
120 } 120 }
121 121
122 public NSEnumerator objectEnumerator () 122 public NSEnumerator objectEnumerator ()
123 { 123 {
124 objc.id result = OS.objc_msgSend(this.id, OS.sel_objectEnumerator); 124 objc.id result = OS.objc_msgSend(this.id_, OS.sel_objectEnumerator);
125 return result !is null ? new NSEnumerator(result) : null; 125 return result !is null ? new NSEnumerator(result) : null;
126 } 126 }
127 127
128 public NSPointerFunctions pointerFunctions () 128 public NSPointerFunctions pointerFunctions ()
129 { 129 {
130 objc.id result = OS.objc_msgSend(this.id, OS.sel_pointerFunctions); 130 objc.id result = OS.objc_msgSend(this.id_, OS.sel_pointerFunctions);
131 return result !is null ? new NSPointerFunctions(result) : null; 131 return result !is null ? new NSPointerFunctions(result) : null;
132 } 132 }
133 133
134 public void removeAllObjects () 134 public void removeAllObjects ()
135 { 135 {
136 OS.objc_msgSend(this.id, OS.sel_removeAllObjects); 136 OS.objc_msgSend(this.id_, OS.sel_removeAllObjects);
137 } 137 }
138 138
139 public void removeObject (id object) 139 public void removeObject (id object)
140 { 140 {
141 OS.objc_msgSend(this.id, OS.sel_removeObject_1, object !is null ? object.id : null); 141 OS.objc_msgSend(this.id_, OS.sel_removeObject_1, object !is null ? object.id_ : null);
142 } 142 }
143 143
144 public NSSet setRepresentation () 144 public NSSet setRepresentation ()
145 { 145 {
146 objc.id result = OS.objc_msgSend(this.id, OS.sel_setRepresentation); 146 objc.id result = OS.objc_msgSend(this.id_, OS.sel_setRepresentation);
147 return result !is null ? new NSSet(result) : null; 147 return result !is null ? new NSSet(result) : null;
148 } 148 }
149 149
150 public void unionHashTable (NSHashTable other) 150 public void unionHashTable (NSHashTable other)
151 { 151 {
152 OS.objc_msgSend(this.id, OS.sel_unionHashTable_1, other !is null ? other.id : null); 152 OS.objc_msgSend(this.id_, OS.sel_unionHashTable_1, other !is null ? other.id_ : null);
153 } 153 }
154 154
155 } 155 }