@implementation StructuredTextParagraph
-- (id)initWithString:(NSString *)aString {
+- (id)initWithString:(NSString *)_s {
if ((self = [super init])) {
- _text = [aString retain];
+ self->_text = [_s retain];
}
return self;
}
- (void)dealloc {
- [_text release];
+ [self->_text release];
[super dealloc];
}
/* accessors */
- (NSString *)text {
- return _text;
+ return self->_text;
}
/* processing */
- (NSString *)textParsedWithDelegate:(id<StructuredTextRenderingDelegate>)_del
inContext:(NSDictionary *)_ctx
{
- NSString *text;
-
self->_delegate = _del;
- text = [self parseText:[self text] inContext:_ctx];
-
- return (_del)
- ? [_del insertText:text inContext:_ctx]
- : text;
+ [self beginParagraphInContext:_ctx];
+ [self parseText:[self text] inContext:_ctx];
+ [self endParagraphInContext:_ctx];
+ return nil;
}
@end /* StructuredTextParagraph */