51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
{
self = [self init];
@try {
void *pool = objc_autoreleasePoolPush();
if (![element.name isEqual: self.className] ||
![element.namespace isEqual: OF_SERIALIZATION_NS])
@throw [OFInvalidArgumentException exception];
for (OFXMLElement *child in
[element elementsForNamespace: OF_SERIALIZATION_NS]) {
void *pool2 = objc_autoreleasePoolPush();
[self appendObject: child.objectByDeserializing];
objc_autoreleasePoolPop(pool2);
}
|
|
|
|
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
{
self = [self init];
@try {
void *pool = objc_autoreleasePoolPush();
if (![element.name isEqual: self.className] ||
![element.namespace isEqual: OFSerializationNS])
@throw [OFInvalidArgumentException exception];
for (OFXMLElement *child in
[element elementsForNamespace: OFSerializationNS]) {
void *pool2 = objc_autoreleasePoolPush();
[self appendObject: child.objectByDeserializing];
objc_autoreleasePoolPop(pool2);
}
|
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
|
return ret;
}
- (OFXMLElement *)XMLElementBySerializing
{
OFXMLElement *element =
[OFXMLElement elementWithName: self.className
namespace: OF_SERIALIZATION_NS];
for (OFListItem *iter = _firstListItem;
iter != NULL; iter = iter->next) {
void *pool = objc_autoreleasePoolPush();
[element addChild: [iter->object XMLElementBySerializing]];
|
|
|
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
|
return ret;
}
- (OFXMLElement *)XMLElementBySerializing
{
OFXMLElement *element =
[OFXMLElement elementWithName: self.className
namespace: OFSerializationNS];
for (OFListItem *iter = _firstListItem;
iter != NULL; iter = iter->next) {
void *pool = objc_autoreleasePoolPush();
[element addChild: [iter->object XMLElementBySerializing]];
|