blob: 7fe309a4b65aa41bb8cb6dbf3c0a2d090e52dbd1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
{ Parsed from Foundation.framework NSHashTable.h }
{$ifdef TYPES}
{$ifndef NSHASHTABLE_PAS_T}
{$define NSHASHTABLE_PAS_T}
{ Constants }
const
NSHashTableStrongMemory = 0;
NSHashTableZeroingWeakMemory = NSPointerFunctionsZeroingWeakMemory;
NSHashTableCopyIn = NSPointerFunctionsCopyIn;
NSHashTableObjectPointerPersonality = NSPointerFunctionsObjectPointerPersonality;
{ Types }
type
NSHashTableOptions = NSUInteger;
NSHashTableOptionsPtr = ^NSHashTableOptions;
{$endif}
{$endif}
{$ifdef RECORDS}
{$ifndef NSHASHTABLE_PAS_R}
{$define NSHASHTABLE_PAS_R}
{ Records }
type
NSHashEnumerator = record
_pi: NSUInteger;
_si: NSUInteger;
_bs: Pointer;
end;
NSHashEnumeratorPtr = ^NSHashEnumerator;
type
NSHashTableCallBacks = record
hash: function (table: NSHashTable; param1: Pointer): NSUInteger; cdecl;
isEqual: function (table: NSHashTable; param1: Pointer; param2: Pointer): Boolean; cdecl;
retain: procedure (table: NSHashTable; param1: Pointer); cdecl;
release: procedure (table: NSHashTable; param1: Pointer); cdecl;
describe: function (table: NSHashTable; param1: Pointer): NSString; cdecl;
end;
NSHashTableCallBacksPtr = ^NSHashTableCallBacks;
{$endif}
{$endif}
{$ifdef FUNCTIONS}
{$ifndef NSHASHTABLE_PAS_F}
{$define NSHASHTABLE_PAS_F}
{ Functions }
procedure NSFreeHashTable(table: NSHashTable); cdecl; external;
procedure NSResetHashTable(table: NSHashTable); cdecl; external;
function NSCompareHashTables(table1: NSHashTable; table2: NSHashTable): Boolean; cdecl; external;
function NSCopyHashTableWithZone(table: NSHashTable; zone: NSZonePtr): NSHashTable; cdecl; external;
function NSHashGet(table: NSHashTable; pointer_: Pointer): Pointer; cdecl; external;
procedure NSHashInsert(table: NSHashTable; pointer_: Pointer); cdecl; external;
procedure NSHashInsertKnownAbsent(table: NSHashTable; pointer_: Pointer); cdecl; external;
function NSHashInsertIfAbsent(table: NSHashTable; pointer_: Pointer): Pointer; cdecl; external;
procedure NSHashRemove(table: NSHashTable; pointer_: Pointer); cdecl; external;
function NSEnumerateHashTable(table: NSHashTable): NSHashEnumerator; cdecl; external;
function NSNextHashEnumeratorItem(enumerator: NSHashEnumeratorPtr): Pointer; cdecl; external;
procedure NSEndHashTableEnumeration(enumerator: NSHashEnumeratorPtr); cdecl; external;
function NSCountHashTable(table: NSHashTable): NSUInteger; cdecl; external;
function NSStringFromHashTable(table: NSHashTable): NSString; cdecl; external;
function NSAllHashTableObjects(table: NSHashTable): NSArray; cdecl; external;
function NSCreateHashTableWithZone(callBacks: NSHashTableCallBacks; capacity: NSUInteger; zone: NSZonePtr): NSHashTable; cdecl; external;
function NSCreateHashTable(callBacks: NSHashTableCallBacks; capacity: NSUInteger): NSHashTable; cdecl; external;
{$endif}
{$endif}
{$ifdef EXTERNAL_SYMBOLS}
{$ifndef NSHASHTABLE_PAS_S}
{$define NSHASHTABLE_PAS_S}
{ External symbols }
var
NSIntegerHashCallBacks: NSHashTableCallBacks; cvar; external;
NSNonOwnedPointerHashCallBacks: NSHashTableCallBacks; cvar; external;
NSNonRetainedObjectHashCallBacks: NSHashTableCallBacks; cvar; external;
NSObjectHashCallBacks: NSHashTableCallBacks; cvar; external;
NSOwnedObjectIdentityHashCallBacks: NSHashTableCallBacks; cvar; external;
NSOwnedPointerHashCallBacks: NSHashTableCallBacks; cvar; external;
NSPointerToStructHashCallBacks: NSHashTableCallBacks; cvar; external;
NSIntHashCallBacks: NSHashTableCallBacks deprecated 'in Mac OS X 10.5 and later'; cvar; external;
{$endif}
{$endif}
{$ifdef FORWARD}
NSHashTable = objcclass;
NSHashTablePointer = ^NSHashTable;
NSHashTablePtr = NSHashTablePointer;
{$endif}
{$ifdef CLASSES}
{$ifndef NSHASHTABLE_PAS_C}
{$define NSHASHTABLE_PAS_C}
{ NSHashTable }
NSHashTable = objcclass external (NSObject, NSCopyingProtocol, NSCodingProtocol, NSFastEnumerationProtocol)
public
function initWithOptions_capacity(options: NSPointerFunctionsOptions; initialCapacity: NSUInteger): id; message 'initWithOptions:capacity:';
function initWithPointerFunctions_capacity(functions: NSPointerFunctions; initialCapacity: NSUInteger): id; message 'initWithPointerFunctions:capacity:';
class function hashTableWithOptions(options: NSPointerFunctionsOptions): id; message 'hashTableWithOptions:';
class function hashTableWithWeakObjects: id; message 'hashTableWithWeakObjects';
function pointerFunctions: NSPointerFunctions; message 'pointerFunctions';
function count: NSUInteger; message 'count';
function member(object_: id): id; message 'member:';
function objectEnumerator: NSEnumerator; message 'objectEnumerator';
procedure addObject(object_: id); message 'addObject:';
procedure removeObject(object_: id); message 'removeObject:';
procedure removeAllObjects; message 'removeAllObjects';
function allObjects: NSArray; message 'allObjects';
function anyObject: id; message 'anyObject';
function containsObject(anObject: id): Boolean; message 'containsObject:';
function intersectsHashTable(other: NSHashTable): Boolean; message 'intersectsHashTable:';
function isEqualToHashTable(other: NSHashTable): Boolean; message 'isEqualToHashTable:';
function isSubsetOfHashTable(other: NSHashTable): Boolean; message 'isSubsetOfHashTable:';
procedure intersectHashTable(other: NSHashTable); message 'intersectHashTable:';
procedure unionHashTable(other: NSHashTable); message 'unionHashTable:';
procedure minusHashTable(other: NSHashTable); message 'minusHashTable:';
function setRepresentation: NSSet; message 'setRepresentation';
{ Adopted Protocols }
function copyWithZone(zone_: NSZonePtr): id;
procedure encodeWithCoder(aCoder: NSCoder);
function initWithCoder(aDecoder: NSCoder): id;
function countByEnumeratingWithState_objects_count(state: NSFastEnumerationStatePtr; stackbuf: idPtr; len: NSUInteger): NSUInteger;
end;
{$endif}
{$endif}
|