1{%mainunit foundation.pas}
2(*	NSDictionary.h
3	Copyright (c) 1994-2005, Apple, Inc. All rights reserved.
4*)
5
6{$ifdef HEADER}
7{$ifndef NSDICTIONARY_PAS_H}
8{$define NSDICTIONARY_PAS_H}
9
10
11//#import <Foundation/NSObject.h>
12{$endif}
13{$endif}
14
15{$ifdef FORWARD}
16  NSDictionary = class;
17  NSMutableDictionary = class;
18
19{$endif}
20
21{$ifdef CLASSES}
22{$ifndef NSDICTIONARY_PAS_C}
23{$define NSDICTIONARY_PAS_C}
24
25    // ***************	Immutable Dictionary	***************
26
27  { NSDictionary }
28
29  NSDictionary = class(NSObject)
30  public
31    class function getClass: lobjc.id; override;
32    function count: LongWord;
33    function keyEnumerator: lobjc.id;{NSEnumerator}
34    function objectForKey(_aKey: lobjc.id): lobjc.id;
35    function allKeys: CFArrayRef;
36    function allKeysForObject(_anObject: lobjc.id): CFArrayRef;
37    function allValues: CFArrayRef;
38    function description: CFStringRef;
39    function descriptionInStringsFileFormat: CFStringRef;
40    function descriptionWithLocale(_locale: CFDictionaryRef): CFStringRef;
41    function descriptionWithLocale_indent(_locale: CFDictionaryRef; _level: LongWord): CFStringRef;
42    function isEqualToDictionary(_otherDictionary: CFDictionaryRef): LongBool;
43    function objectEnumerator: lobjc.id;{NSEnumerator}
44    function objectsForKeys_notFoundMarker(_keys: CFArrayRef; _marker: lobjc.id): CFArrayRef;
45    function writeToFile_atomically(_path: CFStringRef; _useAuxiliaryFile: LongBool): LongBool;
46    function writeToURL_atomically(_url: CFURLRef; _atomically: LongBool): LongBool;
47    //  the atomically flag is ignored if url of a type that cannot be written atomically.
48    function keysSortedByValueUsingSelector(_comparator: SEL): CFArrayRef;
49    constructor dictionary;
50    constructor dictionaryWithContentsOfFile(_path: CFStringRef);
51    constructor dictionaryWithContentsOfURL(_url: CFURLRef);
52    constructor dictionaryWithObjects_forKeys(_objects: CFArrayRef; _keys: CFArrayRef);
53    constructor dictionaryWithObjects_forKeys_count(_objects: lobjc.id; _keys: lobjc.id; _count: LongWord);
54    constructor dictionaryWithObjectsAndKeys(_firstObject: lobjc.id);
55    constructor initWithContentsOfFile(_path: CFStringRef);
56    constructor initWithContentsOfURL(_url: CFURLRef);
57    constructor initWithObjects_forKeys(_objects: CFArrayRef; _keys: CFArrayRef);
58    constructor initWithObjects_forKeys_count(_objects: lobjc.id; _keys: lobjc.id; _count: LongWord);
59    constructor initWithObjectsAndKeys(_firstObject: lobjc.id);
60    constructor initWithDictionary(_otherDictionary: CFDictionaryRef);
61    constructor dictionaryWithDictionary(_dict: CFDictionaryRef);
62    constructor dictionaryWithObject_forKey(__object: lobjc.id; _key: lobjc.id);
63    constructor initWithDictionary_copyItems(_otherDictionary: CFDictionaryRef; _aBool: LongBool);
64  end;
65
66    // ***************	Mutable Dictionary	***************
67
68  { NSMutableDictionary }
69
70  NSMutableDictionary = class(NSDictionary)
71  public
72    class function getClass: lobjc.id; override;
73    procedure removeObjectForKey(_aKey: lobjc.id);
74    procedure setObject_forKey(_anObject: lobjc.id; _aKey: lobjc.id);
75    procedure addEntriesFromDictionary(_otherDictionary: CFDictionaryRef);
76    procedure removeAllObjects;
77    procedure removeObjectsForKeys(_keyArray: CFArrayRef);
78    procedure setDictionary(_otherDictionary: CFDictionaryRef);
79    constructor dictionaryWithCapacity(_numItems: LongWord);
80    constructor initWithCapacity(_numItems: LongWord);
81  end;
82
83{$endif}
84{$endif}
85
86{$ifdef IMPLEMENTATION}
87const
88  StrNSDictionary_NSDictionary = 'NSDictionary';
89  StrNSDictionary_count = 'count';
90  StrNSDictionary_keyEnumerator = 'keyEnumerator';
91  StrNSDictionary_objectForKey = 'objectForKey:';
92
93  StrNSDictionary_allKeys = 'allKeys';
94  StrNSDictionary_allKeysForObject = 'allKeysForObject:';
95  StrNSDictionary_allValues = 'allValues';
96  StrNSDictionary_description = 'description';
97  StrNSDictionary_descriptionInStringsFileFormat = 'descriptionInStringsFileFormat';
98  StrNSDictionary_descriptionWithLocale = 'descriptionWithLocale:';
99  StrNSDictionary_descriptionWithLocale_indent = 'descriptionWithLocale:indent:';
100  StrNSDictionary_isEqualToDictionary = 'isEqualToDictionary:';
101  StrNSDictionary_objectEnumerator = 'objectEnumerator';
102  StrNSDictionary_objectsForKeys_notFoundMarker = 'objectsForKeys:notFoundMarker:';
103  StrNSDictionary_writeToFile_atomically = 'writeToFile:atomically:';
104  StrNSDictionary_writeToURL_atomically = 'writeToURL:atomically:';
105  StrNSDictionary_keysSortedByValueUsingSelector = 'keysSortedByValueUsingSelector:';
106
107  StrNSDictionary_dictionary = 'dictionary';
108  StrNSDictionary_dictionaryWithContentsOfFile = 'dictionaryWithContentsOfFile:';
109  StrNSDictionary_dictionaryWithContentsOfURL = 'dictionaryWithContentsOfURL:';
110  StrNSDictionary_dictionaryWithObjects_forKeys = 'dictionaryWithObjects:forKeys:';
111  StrNSDictionary_dictionaryWithObjects_forKeys_count = 'dictionaryWithObjects:forKeys:count:';
112  StrNSDictionary_dictionaryWithObjectsAndKeys = 'dictionaryWithObjectsAndKeys:';
113  StrNSDictionary_initWithContentsOfFile = 'initWithContentsOfFile:';
114  StrNSDictionary_initWithContentsOfURL = 'initWithContentsOfURL:';
115  StrNSDictionary_initWithObjects_forKeys = 'initWithObjects:forKeys:';
116  StrNSDictionary_initWithObjects_forKeys_count = 'initWithObjects:forKeys:count:';
117  StrNSDictionary_initWithObjectsAndKeys = 'initWithObjectsAndKeys:';
118  StrNSDictionary_initWithDictionary = 'initWithDictionary:';
119  StrNSDictionary_dictionaryWithDictionary = 'dictionaryWithDictionary:';
120  StrNSDictionary_dictionaryWithObject_forKey = 'dictionaryWithObject:forKey:';
121  StrNSDictionary_initWithDictionary_copyItems = 'initWithDictionary:copyItems:';
122
123  StrNSMutableDictionary_NSMutableDictionary = 'NSMutableDictionary';
124  StrNSMutableDictionary_removeObjectForKey = 'removeObjectForKey:';
125  StrNSMutableDictionary_setObject_forKey = 'setObject:forKey:';
126
127  StrNSMutableDictionary_addEntriesFromDictionary = 'addEntriesFromDictionary:';
128  StrNSMutableDictionary_removeAllObjects = 'removeAllObjects';
129  StrNSMutableDictionary_removeObjectsForKeys = 'removeObjectsForKeys:';
130  StrNSMutableDictionary_setDictionary = 'setDictionary:';
131
132  StrNSMutableDictionary_dictionaryWithCapacity = 'dictionaryWithCapacity:';
133  StrNSMutableDictionary_initWithCapacity = 'initWithCapacity:';
134
135{ NSDictionary }
136
137class function NSDictionary.getClass: lobjc.id;
138begin
139  Result := objc_getClass(StrNSDictionary_NSDictionary);
140end;
141
142function NSDictionary.count: LongWord;
143begin
144  Result := {%H-}LongWord(objc_msgSend(Handle, sel_registerName(PChar(StrNSDictionary_count)), []));
145end;
146
147function NSDictionary.keyEnumerator: lobjc.id;
148begin
149  Result := lobjc.id(objc_msgSend(Handle, sel_registerName(PChar(StrNSDictionary_keyEnumerator)), []));
150end;
151
152function NSDictionary.objectForKey(_aKey: lobjc.id): lobjc.id;
153type
154  TmsgSendWrapper = function (param1: lobjc.id; param2: SEL;_aKey: lobjc.id): lobjc.id; cdecl;
155var
156  vmethod: TmsgSendWrapper;
157begin
158  vmethod := TmsgSendWrapper(@objc_msgSend);
159  Result := lobjc.id(vmethod(Handle, sel_registerName(PChar(StrNSDictionary_objectForKey)), _aKey));
160end;
161
162function NSDictionary.allKeys: CFArrayRef;
163begin
164  Result := CFArrayRef(objc_msgSend(Handle, sel_registerName(PChar(StrNSDictionary_allKeys)), []));
165end;
166
167function NSDictionary.allKeysForObject(_anObject: lobjc.id): CFArrayRef;
168type
169  TmsgSendWrapper = function (param1: lobjc.id; param2: SEL;_anObject: lobjc.id): CFArrayRef; cdecl;
170var
171  vmethod: TmsgSendWrapper;
172begin
173  vmethod := TmsgSendWrapper(@objc_msgSend);
174  Result := CFArrayRef(vmethod(Handle, sel_registerName(PChar(StrNSDictionary_allKeysForObject)), _anObject));
175end;
176
177function NSDictionary.allValues: CFArrayRef;
178begin
179  Result := CFArrayRef(objc_msgSend(Handle, sel_registerName(PChar(StrNSDictionary_allValues)), []));
180end;
181
182function NSDictionary.description: CFStringRef;
183begin
184  Result := CFStringRef(objc_msgSend(Handle, sel_registerName(PChar(StrNSDictionary_description)), []));
185end;
186
187function NSDictionary.descriptionInStringsFileFormat: CFStringRef;
188begin
189  Result := CFStringRef(objc_msgSend(Handle, sel_registerName(PChar(StrNSDictionary_descriptionInStringsFileFormat)), []));
190end;
191
192function NSDictionary.descriptionWithLocale(_locale: CFDictionaryRef): CFStringRef;
193type
194  TmsgSendWrapper = function (param1: lobjc.id; param2: SEL;_locale: CFDictionaryRef): CFStringRef; cdecl;
195var
196  vmethod: TmsgSendWrapper;
197begin
198  vmethod := TmsgSendWrapper(@objc_msgSend);
199  Result := CFStringRef(vmethod(Handle, sel_registerName(PChar(StrNSDictionary_descriptionWithLocale)), _locale));
200end;
201
202function NSDictionary.descriptionWithLocale_indent(_locale: CFDictionaryRef; _level: LongWord): CFStringRef;
203type
204  TmsgSendWrapper = function (param1: lobjc.id; param2: SEL;_locale: CFDictionaryRef; _level: LongWord): CFStringRef; cdecl;
205var
206  vmethod: TmsgSendWrapper;
207begin
208  vmethod := TmsgSendWrapper(@objc_msgSend);
209  Result := CFStringRef(vmethod(Handle, sel_registerName(PChar(StrNSDictionary_descriptionWithLocale_indent)), _locale, _level));
210end;
211
212function NSDictionary.isEqualToDictionary(_otherDictionary: CFDictionaryRef): LongBool;
213type
214  TmsgSendWrapper = function (param1: lobjc.id; param2: SEL;_otherDictionary: CFDictionaryRef): LongBool; cdecl;
215var
216  vmethod: TmsgSendWrapper;
217begin
218  vmethod := TmsgSendWrapper(@objc_msgSend);
219  Result := LongBool(vmethod(Handle, sel_registerName(PChar(StrNSDictionary_isEqualToDictionary)), _otherDictionary));
220end;
221
222function NSDictionary.objectEnumerator: lobjc.id;
223begin
224  Result := lobjc.id(objc_msgSend(Handle, sel_registerName(PChar(StrNSDictionary_objectEnumerator)), []));
225end;
226
227function NSDictionary.objectsForKeys_notFoundMarker(_keys: CFArrayRef; _marker: lobjc.id): CFArrayRef;
228type
229  TmsgSendWrapper = function (param1: lobjc.id; param2: SEL;_keys: CFArrayRef; _marker: lobjc.id): CFArrayRef; cdecl;
230var
231  vmethod: TmsgSendWrapper;
232begin
233  vmethod := TmsgSendWrapper(@objc_msgSend);
234  Result := CFArrayRef(vmethod(Handle, sel_registerName(PChar(StrNSDictionary_objectsForKeys_notFoundMarker)), _keys, _marker));
235end;
236
237function NSDictionary.writeToFile_atomically(_path: CFStringRef; _useAuxiliaryFile: LongBool): LongBool;
238type
239  TmsgSendWrapper = function (param1: lobjc.id; param2: SEL;_path: CFStringRef; _useAuxiliaryFile: LongBool): LongBool; cdecl;
240var
241  vmethod: TmsgSendWrapper;
242begin
243  vmethod := TmsgSendWrapper(@objc_msgSend);
244  Result := LongBool(vmethod(Handle, sel_registerName(PChar(StrNSDictionary_writeToFile_atomically)), _path, _useAuxiliaryFile));
245end;
246
247function NSDictionary.writeToURL_atomically(_url: CFURLRef; _atomically: LongBool): LongBool;
248type
249  TmsgSendWrapper = function (param1: lobjc.id; param2: SEL;_url: CFURLRef; _atomically: LongBool): LongBool; cdecl;
250var
251  vmethod: TmsgSendWrapper;
252begin
253  vmethod := TmsgSendWrapper(@objc_msgSend);
254  Result := LongBool(vmethod(Handle, sel_registerName(PChar(StrNSDictionary_writeToURL_atomically)), _url, _atomically));
255end;
256
257function NSDictionary.keysSortedByValueUsingSelector(_comparator: SEL): CFArrayRef;
258type
259  TmsgSendWrapper = function (param1: lobjc.id; param2: SEL;_comparator: SEL): CFArrayRef; cdecl;
260var
261  vmethod: TmsgSendWrapper;
262begin
263  vmethod := TmsgSendWrapper(@objc_msgSend);
264  Result := CFArrayRef(vmethod(Handle, sel_registerName(PChar(StrNSDictionary_keysSortedByValueUsingSelector)), _comparator));
265end;
266
267constructor NSDictionary.dictionary;
268type
269  TmsgSendWrapper = function (param1: lobjc.id; param2: SEL): lobjc.id; cdecl;
270var
271  vmethod: TmsgSendWrapper;
272begin
273  ClassID := getClass();
274  vmethod := TmsgSendWrapper(@objc_msgSend);
275  Handle := vmethod(ClassID, sel_registerName(PChar(StrNSDictionary_dictionary)));
276end;
277
278constructor NSDictionary.dictionaryWithContentsOfFile(_path: CFStringRef);
279type
280  TmsgSendWrapper = function (param1: lobjc.id; param2: SEL;_path: CFStringRef): lobjc.id; cdecl;
281var
282  vmethod: TmsgSendWrapper;
283begin
284  ClassID := getClass();
285  vmethod := TmsgSendWrapper(@objc_msgSend);
286  Handle := vmethod(ClassID, sel_registerName(PChar(StrNSDictionary_dictionaryWithContentsOfFile)), _path);
287end;
288
289constructor NSDictionary.dictionaryWithContentsOfURL(_url: CFURLRef);
290type
291  TmsgSendWrapper = function (param1: lobjc.id; param2: SEL;_url: CFURLRef): lobjc.id; cdecl;
292var
293  vmethod: TmsgSendWrapper;
294begin
295  ClassID := getClass();
296  vmethod := TmsgSendWrapper(@objc_msgSend);
297  Handle := vmethod(ClassID, sel_registerName(PChar(StrNSDictionary_dictionaryWithContentsOfURL)), _url);
298end;
299
300constructor NSDictionary.dictionaryWithObjects_forKeys(_objects: CFArrayRef; _keys: CFArrayRef);
301type
302  TmsgSendWrapper = function (param1: lobjc.id; param2: SEL;_objects: CFArrayRef; _keys: CFArrayRef): lobjc.id; cdecl;
303var
304  vmethod: TmsgSendWrapper;
305begin
306  ClassID := getClass();
307  vmethod := TmsgSendWrapper(@objc_msgSend);
308  Handle := vmethod(ClassID, sel_registerName(PChar(StrNSDictionary_dictionaryWithObjects_forKeys)), _objects, _keys);
309end;
310
311constructor NSDictionary.dictionaryWithObjects_forKeys_count(_objects: lobjc.id; _keys: lobjc.id; _count: LongWord);
312type
313  TmsgSendWrapper = function (param1: lobjc.id; param2: SEL;_objects: lobjc.id; _keys: lobjc.id; _count: LongWord): lobjc.id; cdecl;
314var
315  vmethod: TmsgSendWrapper;
316begin
317  ClassID := getClass();
318  vmethod := TmsgSendWrapper(@objc_msgSend);
319  Handle := vmethod(ClassID, sel_registerName(PChar(StrNSDictionary_dictionaryWithObjects_forKeys_count)), _objects, _keys, _count);
320end;
321
322constructor NSDictionary.dictionaryWithObjectsAndKeys(_firstObject: lobjc.id);
323type
324  TmsgSendWrapper = function (param1: lobjc.id; param2: SEL;_firstObject: lobjc.id): lobjc.id; cdecl;
325var
326  vmethod: TmsgSendWrapper;
327begin
328  ClassID := getClass();
329  vmethod := TmsgSendWrapper(@objc_msgSend);
330  Handle := vmethod(ClassID, sel_registerName(PChar(StrNSDictionary_dictionaryWithObjectsAndKeys)), _firstObject);
331end;
332
333constructor NSDictionary.initWithContentsOfFile(_path: CFStringRef);
334type
335  TmsgSendWrapper = function (param1: lobjc.id; param2: SEL;_path: CFStringRef): lobjc.id; cdecl;
336var
337  vmethod: TmsgSendWrapper;
338begin
339  ClassID := getClass();
340  allocbuf := objc_msgSend(ClassID, sel_registerName(PChar(Str_alloc)), []);
341  vmethod := TmsgSendWrapper(@objc_msgSend);
342  Handle := vmethod(allocbuf, sel_registerName(PChar(StrNSDictionary_initWithContentsOfFile)), _path);
343end;
344
345constructor NSDictionary.initWithContentsOfURL(_url: CFURLRef);
346type
347  TmsgSendWrapper = function (param1: lobjc.id; param2: SEL;_url: CFURLRef): lobjc.id; cdecl;
348var
349  vmethod: TmsgSendWrapper;
350begin
351  ClassID := getClass();
352  allocbuf := objc_msgSend(ClassID, sel_registerName(PChar(Str_alloc)), []);
353  vmethod := TmsgSendWrapper(@objc_msgSend);
354  Handle := vmethod(allocbuf, sel_registerName(PChar(StrNSDictionary_initWithContentsOfURL)), _url);
355end;
356
357constructor NSDictionary.initWithObjects_forKeys(_objects: CFArrayRef; _keys: CFArrayRef);
358type
359  TmsgSendWrapper = function (param1: lobjc.id; param2: SEL;_objects: CFArrayRef; _keys: CFArrayRef): lobjc.id; cdecl;
360var
361  vmethod: TmsgSendWrapper;
362begin
363  ClassID := getClass();
364  allocbuf := objc_msgSend(ClassID, sel_registerName(PChar(Str_alloc)), []);
365  vmethod := TmsgSendWrapper(@objc_msgSend);
366  Handle := vmethod(allocbuf, sel_registerName(PChar(StrNSDictionary_initWithObjects_forKeys)), _objects, _keys);
367end;
368
369constructor NSDictionary.initWithObjects_forKeys_count(_objects: lobjc.id; _keys: lobjc.id; _count: LongWord);
370type
371  TmsgSendWrapper = function (param1: lobjc.id; param2: SEL;_objects: lobjc.id; _keys: lobjc.id; _count: LongWord): lobjc.id; cdecl;
372var
373  vmethod: TmsgSendWrapper;
374begin
375  ClassID := getClass();
376  allocbuf := objc_msgSend(ClassID, sel_registerName(PChar(Str_alloc)), []);
377  vmethod := TmsgSendWrapper(@objc_msgSend);
378  Handle := vmethod(allocbuf, sel_registerName(PChar(StrNSDictionary_initWithObjects_forKeys_count)), _objects, _keys, _count);
379end;
380
381constructor NSDictionary.initWithObjectsAndKeys(_firstObject: lobjc.id);
382type
383  TmsgSendWrapper = function (param1: lobjc.id; param2: SEL;_firstObject: lobjc.id): lobjc.id; cdecl;
384var
385  vmethod: TmsgSendWrapper;
386begin
387  ClassID := getClass();
388  allocbuf := objc_msgSend(ClassID, sel_registerName(PChar(Str_alloc)), []);
389  vmethod := TmsgSendWrapper(@objc_msgSend);
390  Handle := vmethod(allocbuf, sel_registerName(PChar(StrNSDictionary_initWithObjectsAndKeys)), _firstObject);
391end;
392
393constructor NSDictionary.initWithDictionary(_otherDictionary: CFDictionaryRef);
394type
395  TmsgSendWrapper = function (param1: lobjc.id; param2: SEL;_otherDictionary: CFDictionaryRef): lobjc.id; cdecl;
396var
397  vmethod: TmsgSendWrapper;
398begin
399  ClassID := getClass();
400  allocbuf := objc_msgSend(ClassID, sel_registerName(PChar(Str_alloc)), []);
401  vmethod := TmsgSendWrapper(@objc_msgSend);
402  Handle := vmethod(allocbuf, sel_registerName(PChar(StrNSDictionary_initWithDictionary)), _otherDictionary);
403end;
404
405constructor NSDictionary.dictionaryWithDictionary(_dict: CFDictionaryRef);
406type
407  TmsgSendWrapper = function (param1: lobjc.id; param2: SEL;_dict: CFDictionaryRef): lobjc.id; cdecl;
408var
409  vmethod: TmsgSendWrapper;
410begin
411  ClassID := getClass();
412  vmethod := TmsgSendWrapper(@objc_msgSend);
413  Handle := vmethod(ClassID, sel_registerName(PChar(StrNSDictionary_dictionaryWithDictionary)), _dict);
414end;
415
416constructor NSDictionary.dictionaryWithObject_forKey(__object: lobjc.id; _key: lobjc.id);
417type
418  TmsgSendWrapper = function (param1: lobjc.id; param2: SEL;__object: lobjc.id; _key: lobjc.id): lobjc.id; cdecl;
419var
420  vmethod: TmsgSendWrapper;
421begin
422  ClassID := getClass();
423  vmethod := TmsgSendWrapper(@objc_msgSend);
424  Handle := vmethod(ClassID, sel_registerName(PChar(StrNSDictionary_dictionaryWithObject_forKey)), __object, _key);
425end;
426
427constructor NSDictionary.initWithDictionary_copyItems(_otherDictionary: CFDictionaryRef; _aBool: LongBool);
428type
429  TmsgSendWrapper = function (param1: lobjc.id; param2: SEL;_otherDictionary: CFDictionaryRef; _aBool: LongBool): lobjc.id; cdecl;
430var
431  vmethod: TmsgSendWrapper;
432begin
433  ClassID := getClass();
434  allocbuf := objc_msgSend(ClassID, sel_registerName(PChar(Str_alloc)), []);
435  vmethod := TmsgSendWrapper(@objc_msgSend);
436  Handle := vmethod(allocbuf, sel_registerName(PChar(StrNSDictionary_initWithDictionary_copyItems)), _otherDictionary, _aBool);
437end;
438
439{ NSMutableDictionary }
440
441class function NSMutableDictionary.getClass: lobjc.id;
442begin
443  Result := objc_getClass(StrNSMutableDictionary_NSMutableDictionary);
444end;
445
446procedure NSMutableDictionary.removeObjectForKey(_aKey: lobjc.id);
447type
448  TmsgSendWrapper = procedure (param1: lobjc.id; param2: SEL;_aKey: lobjc.id); cdecl;
449var
450  vmethod: TmsgSendWrapper;
451begin
452  vmethod := TmsgSendWrapper(@objc_msgSend);
453  vmethod(Handle, sel_registerName(PChar(StrNSMutableDictionary_removeObjectForKey)), _aKey);
454end;
455
456procedure NSMutableDictionary.setObject_forKey(_anObject: lobjc.id; _aKey: lobjc.id);
457type
458  TmsgSendWrapper = procedure (param1: lobjc.id; param2: SEL;_anObject: lobjc.id; _aKey: lobjc.id); cdecl;
459var
460  vmethod: TmsgSendWrapper;
461begin
462  vmethod := TmsgSendWrapper(@objc_msgSend);
463  vmethod(Handle, sel_registerName(PChar(StrNSMutableDictionary_setObject_forKey)), _anObject, _aKey);
464end;
465
466procedure NSMutableDictionary.addEntriesFromDictionary(_otherDictionary: CFDictionaryRef);
467type
468  TmsgSendWrapper = procedure (param1: lobjc.id; param2: SEL;_otherDictionary: CFDictionaryRef); cdecl;
469var
470  vmethod: TmsgSendWrapper;
471begin
472  vmethod := TmsgSendWrapper(@objc_msgSend);
473  vmethod(Handle, sel_registerName(PChar(StrNSMutableDictionary_addEntriesFromDictionary)), _otherDictionary);
474end;
475
476procedure NSMutableDictionary.removeAllObjects;
477begin
478  objc_msgSend(Handle, sel_registerName(PChar(StrNSMutableDictionary_removeAllObjects)), []);
479end;
480
481procedure NSMutableDictionary.removeObjectsForKeys(_keyArray: CFArrayRef);
482type
483  TmsgSendWrapper = procedure (param1: lobjc.id; param2: SEL;_keyArray: CFArrayRef); cdecl;
484var
485  vmethod: TmsgSendWrapper;
486begin
487  vmethod := TmsgSendWrapper(@objc_msgSend);
488  vmethod(Handle, sel_registerName(PChar(StrNSMutableDictionary_removeObjectsForKeys)), _keyArray);
489end;
490
491procedure NSMutableDictionary.setDictionary(_otherDictionary: CFDictionaryRef);
492type
493  TmsgSendWrapper = procedure (param1: lobjc.id; param2: SEL;_otherDictionary: CFDictionaryRef); cdecl;
494var
495  vmethod: TmsgSendWrapper;
496begin
497  vmethod := TmsgSendWrapper(@objc_msgSend);
498  vmethod(Handle, sel_registerName(PChar(StrNSMutableDictionary_setDictionary)), _otherDictionary);
499end;
500
501constructor NSMutableDictionary.dictionaryWithCapacity(_numItems: LongWord);
502type
503  TmsgSendWrapper = function (param1: lobjc.id; param2: SEL;_numItems: LongWord): lobjc.id; cdecl;
504var
505  vmethod: TmsgSendWrapper;
506begin
507  ClassID := getClass();
508  vmethod := TmsgSendWrapper(@objc_msgSend);
509  Handle := vmethod(ClassID, sel_registerName(PChar(StrNSMutableDictionary_dictionaryWithCapacity)), _numItems);
510end;
511
512constructor NSMutableDictionary.initWithCapacity(_numItems: LongWord);
513type
514  TmsgSendWrapper = function (param1: lobjc.id; param2: SEL;_numItems: LongWord): lobjc.id; cdecl;
515var
516  vmethod: TmsgSendWrapper;
517begin
518  ClassID := getClass();
519  allocbuf := objc_msgSend(ClassID, sel_registerName(PChar(Str_alloc)), []);
520  vmethod := TmsgSendWrapper(@objc_msgSend);
521  Handle := vmethod(allocbuf, sel_registerName(PChar(StrNSMutableDictionary_initWithCapacity)), _numItems);
522end;
523
524{$endif}
525