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
|
@interface OFMapTableObjectEnumerator: OFMapTableEnumerator
@end
@implementation OFMapTable
@synthesize keyFunctions = _keyFunctions, objectFunctions = _objectFunctions;
+ (instancetype)mapTableWithKeyFunctions: (of_map_table_functions_t)keyFunctions
objectFunctions: (of_map_table_functions_t)
objectFunctions
{
return [[[self alloc]
initWithKeyFunctions: keyFunctions
objectFunctions: objectFunctions] autorelease];
}
+ (instancetype)mapTableWithKeyFunctions: (of_map_table_functions_t)keyFunctions
objectFunctions: (of_map_table_functions_t)
objectFunctions
capacity: (size_t)capacity
{
return [[[self alloc]
initWithKeyFunctions: keyFunctions
objectFunctions: objectFunctions
capacity: capacity] autorelease];
}
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- (instancetype)initWithKeyFunctions: (of_map_table_functions_t)keyFunctions
objectFunctions: (of_map_table_functions_t)objectFunctions
{
return [self initWithKeyFunctions: keyFunctions
objectFunctions: objectFunctions
capacity: 0];
}
- (instancetype)initWithKeyFunctions: (of_map_table_functions_t)keyFunctions
objectFunctions: (of_map_table_functions_t)objectFunctions
capacity: (size_t)capacity
{
self = [super init];
@try {
_keyFunctions = keyFunctions;
_objectFunctions = objectFunctions;
|
|
<
|
|
<
|
|
|
|
|
|
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
|
@interface OFMapTableObjectEnumerator: OFMapTableEnumerator
@end
@implementation OFMapTable
@synthesize keyFunctions = _keyFunctions, objectFunctions = _objectFunctions;
+ (instancetype)mapTableWithKeyFunctions: (OFMapTableFunctions)keyFunctions
objectFunctions: (OFMapTableFunctions)objectFunctions
{
return [[[self alloc]
initWithKeyFunctions: keyFunctions
objectFunctions: objectFunctions] autorelease];
}
+ (instancetype)mapTableWithKeyFunctions: (OFMapTableFunctions)keyFunctions
objectFunctions: (OFMapTableFunctions)objectFunctions
capacity: (size_t)capacity
{
return [[[self alloc]
initWithKeyFunctions: keyFunctions
objectFunctions: objectFunctions
capacity: capacity] autorelease];
}
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- (instancetype)initWithKeyFunctions: (OFMapTableFunctions)keyFunctions
objectFunctions: (OFMapTableFunctions)objectFunctions
{
return [self initWithKeyFunctions: keyFunctions
objectFunctions: objectFunctions
capacity: 0];
}
- (instancetype)initWithKeyFunctions: (OFMapTableFunctions)keyFunctions
objectFunctions: (OFMapTableFunctions)objectFunctions
capacity: (size_t)capacity
{
self = [super init];
@try {
_keyFunctions = keyFunctions;
_objectFunctions = objectFunctions;
|