49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
- (instancetype)initWithSerialization: (OFXMLElement *)element
{
self = [super of_init];
@try {
void *pool = objc_autoreleasePoolPush();
if (![[element name] isEqual: [self className]] ||
![[element namespace] isEqual: OF_SERIALIZATION_NS])
@throw [OFInvalidArgumentException exception];
_processingInstructions = [[element stringValue] copy];
objc_autoreleasePoolPop(pool);
} @catch (id e) {
[self release];
@throw e;
}
|
|
|
|
|
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
- (instancetype)initWithSerialization: (OFXMLElement *)element
{
self = [super of_init];
@try {
void *pool = objc_autoreleasePoolPush();
if (![element.name isEqual: self.className] ||
![element.namespace isEqual: OF_SERIALIZATION_NS])
@throw [OFInvalidArgumentException exception];
_processingInstructions = [element.stringValue copy];
objc_autoreleasePoolPop(pool);
} @catch (id e) {
[self release];
@throw e;
}
|
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
return ([processingInstructions->_processingInstructions
isEqual: _processingInstructions]);
}
- (uint32_t)hash
{
return [_processingInstructions hash];
}
- (OFString *)stringValue
{
return @"";
}
|
|
|
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
return ([processingInstructions->_processingInstructions
isEqual: _processingInstructions]);
}
- (uint32_t)hash
{
return _processingInstructions.hash;
}
- (OFString *)stringValue
{
return @"";
}
|
138
139
140
141
142
143
144
145
146
147
148
149
|
- (OFString *)description
{
return [OFString stringWithFormat: @"<?%@?>", _processingInstructions];
}
- (OFXMLElement *)XMLElementBySerializing
{
return [OFXMLElement elementWithName: [self className]
namespace: OF_SERIALIZATION_NS
stringValue: _processingInstructions];
}
@end
|
|
|
138
139
140
141
142
143
144
145
146
147
148
149
|
- (OFString *)description
{
return [OFString stringWithFormat: @"<?%@?>", _processingInstructions];
}
- (OFXMLElement *)XMLElementBySerializing
{
return [OFXMLElement elementWithName: self.className
namespace: OF_SERIALIZATION_NS
stringValue: _processingInstructions];
}
@end
|