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
|
* file.
*/
#include "config.h"
#include <stdlib.h>
#import "OFMutableDictionary_hashtable.h"
#import "OFArray.h"
#import "OFString.h"
static struct {
Class isa;
} placeholder;
@interface OFMutableDictionary_placeholder: OFDictionary
@end
@implementation OFMutableDictionary_placeholder
- (instancetype)init
{
return (id)[[OFMutableDictionary_hashtable alloc] init];
}
- (instancetype)initWithDictionary: (OFDictionary *)dictionary
{
return (id)[[OFMutableDictionary_hashtable alloc]
initWithDictionary: dictionary];
}
- (instancetype)initWithObject: (id)object
forKey: (id)key
{
return (id)[[OFMutableDictionary_hashtable alloc] initWithObject: object
forKey: key];
}
- (instancetype)initWithObjects: (OFArray *)objects
forKeys: (OFArray *)keys
{
return (id)[[OFMutableDictionary_hashtable alloc]
initWithObjects: objects
forKeys: keys];
}
- (instancetype)initWithObjects: (id const *)objects
forKeys: (id const *)keys
count: (size_t)count
{
return (id)[[OFMutableDictionary_hashtable alloc]
initWithObjects: objects
forKeys: keys
count: count];
}
- (instancetype)initWithKeysAndObjects: (id)firstKey, ...
{
id ret;
va_list arguments;
va_start(arguments, firstKey);
ret = (id)[[OFMutableDictionary_hashtable alloc]
initWithKey: firstKey
arguments: arguments];
va_end(arguments);
return ret;
}
- (instancetype)initWithKey: (id)firstKey
arguments: (va_list)arguments
{
return (id)[[OFMutableDictionary_hashtable alloc]
initWithKey: firstKey
arguments: arguments];
}
- (instancetype)initWithSerialization: (OFXMLElement *)element
{
return (id)[[OFMutableDictionary_hashtable alloc]
initWithSerialization: element];
}
- (instancetype)initWithCapacity: (size_t)capacity
{
return (id)[[OFMutableDictionary_hashtable alloc]
initWithCapacity: capacity];
}
- (instancetype)retain
{
return self;
}
|
|
|
|
|
|
|
|
<
|
|
<
|
|
|
<
|
|
<
|
|
|
|
|
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
|
* file.
*/
#include "config.h"
#include <stdlib.h>
#import "OFMutableMapTableDictionary.h"
#import "OFArray.h"
#import "OFString.h"
static struct {
Class isa;
} placeholder;
@interface OFMutableDictionaryPlaceholder: OFDictionary
@end
@implementation OFMutableDictionaryPlaceholder
- (instancetype)init
{
return (id)[[OFMutableMapTableDictionary alloc] init];
}
- (instancetype)initWithDictionary: (OFDictionary *)dictionary
{
return (id)[[OFMutableMapTableDictionary alloc]
initWithDictionary: dictionary];
}
- (instancetype)initWithObject: (id)object
forKey: (id)key
{
return (id)[[OFMutableMapTableDictionary alloc] initWithObject: object
forKey: key];
}
- (instancetype)initWithObjects: (OFArray *)objects
forKeys: (OFArray *)keys
{
return (id)[[OFMutableMapTableDictionary alloc] initWithObjects: objects
forKeys: keys];
}
- (instancetype)initWithObjects: (id const *)objects
forKeys: (id const *)keys
count: (size_t)count
{
return (id)[[OFMutableMapTableDictionary alloc] initWithObjects: objects
forKeys: keys
count: count];
}
- (instancetype)initWithKeysAndObjects: (id)firstKey, ...
{
id ret;
va_list arguments;
va_start(arguments, firstKey);
ret = (id)[[OFMutableMapTableDictionary alloc] initWithKey: firstKey
arguments: arguments];
va_end(arguments);
return ret;
}
- (instancetype)initWithKey: (id)firstKey
arguments: (va_list)arguments
{
return (id)[[OFMutableMapTableDictionary alloc] initWithKey: firstKey
arguments: arguments];
}
- (instancetype)initWithSerialization: (OFXMLElement *)element
{
return (id)[[OFMutableMapTableDictionary alloc]
initWithSerialization: element];
}
- (instancetype)initWithCapacity: (size_t)capacity
{
return (id)[[OFMutableMapTableDictionary alloc]
initWithCapacity: capacity];
}
- (instancetype)retain
{
return self;
}
|
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
|
}
@end
@implementation OFMutableDictionary
+ (void)initialize
{
if (self == [OFMutableDictionary class])
placeholder.isa = [OFMutableDictionary_placeholder class];
}
+ (instancetype)alloc
{
if (self == [OFMutableDictionary class])
return (id)&placeholder;
|
|
|
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
|
}
@end
@implementation OFMutableDictionary
+ (void)initialize
{
if (self == [OFMutableDictionary class])
placeholder.isa = [OFMutableDictionaryPlaceholder class];
}
+ (instancetype)alloc
{
if (self == [OFMutableDictionary class])
return (id)&placeholder;
|