115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
|
}
+ (instancetype)elementWithXMLString: (OFString*)string
{
return [[[self alloc] initWithXMLString: string] autorelease];
}
+ (instancetype)elementWithFile: (OFString*)path
{
return [[[self alloc] initWithFile: path] autorelease];
}
- init
{
OF_INVALID_INIT_METHOD
}
- initWithName: (OFString*)name
|
>
>
|
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
|
}
+ (instancetype)elementWithXMLString: (OFString*)string
{
return [[[self alloc] initWithXMLString: string] autorelease];
}
#ifdef OF_HAVE_FILES
+ (instancetype)elementWithFile: (OFString*)path
{
return [[[self alloc] initWithFile: path] autorelease];
}
#endif
- init
{
OF_INVALID_INIT_METHOD
}
- initWithName: (OFString*)name
|
232
233
234
235
236
237
238
239
240
241
242
243
244
245
|
self = [delegate->_element retain];
objc_autoreleasePoolPop(pool);
return self;
}
- initWithFile: (OFString*)path
{
void *pool;
OFXMLParser *parser;
OFXMLElementBuilder *builder;
OFXMLElement_OFXMLElementBuilderDelegate *delegate;
|
>
|
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
|
self = [delegate->_element retain];
objc_autoreleasePoolPop(pool);
return self;
}
#ifdef OF_HAVE_FILES
- initWithFile: (OFString*)path
{
void *pool;
OFXMLParser *parser;
OFXMLElementBuilder *builder;
OFXMLElement_OFXMLElementBuilderDelegate *delegate;
|
262
263
264
265
266
267
268
269
270
271
272
273
274
275
|
self = [delegate->_element retain];
objc_autoreleasePoolPop(pool);
return self;
}
- initWithSerialization: (OFXMLElement*)element
{
self = [super init];
@try {
void *pool = objc_autoreleasePoolPush();
|
>
|
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
|
self = [delegate->_element retain];
objc_autoreleasePoolPop(pool);
return self;
}
#endif
- initWithSerialization: (OFXMLElement*)element
{
self = [super init];
@try {
void *pool = objc_autoreleasePoolPush();
|