Inherits from GBParagraphItem : NSObject
Declared in GBParagraphSpecialItem.h
GBParagraphSpecialItem.m

Overview

Handles special paragraph items such as warnings and bugs.

Special items are containers for GBCommentParagraph which are formatted differently to catch user's attention. There can be several types of special items, to determine the type, use the value of specialItemType property.

Tasks

Initialization & disposal

Values

Other Methods

Properties

specialItemDescription

The description of the special item in the form of GBCommentParagraph.

@property (readonly) GBCommentParagraph *specialItemDescription

Declared In

GBParagraphSpecialItem.h

specialItemType

The type of the special item.

@property (assign) GBSpecialItemType specialItemType

Declared In

GBParagraphSpecialItem.h

Class Methods

specialItemWithType:

Returns new autoreleased GBParagraphSpecialItem instance of te given type.

+ (id)specialItemWithType:(GBSpecialItemType)type

Parameters

type
The type of the special item.

Return Value

Returns initialized instance.

Discussion

Sending this message to the class is equivalent of:

GBParagraphSpecialItem *item = [[[GBParagraphSpecialItem alloc] init] autorelease];
item.specialItemType = type;

Declared In

GBParagraphSpecialItem.h

specialItemWithType:stringValue:

Returns new autoreleased GBParagraphSpecialItem instance of te given type.

+ (id)specialItemWithType:(GBSpecialItemType)type stringValue:(NSString *)value

Parameters

type
The type of the special item.
value
The desired string value.

Return Value

Returns initialized instance.

Discussion

Sending this message to the class is equivalent of:

GBParagraphSpecialItem *item = [[[GBParagraphSpecialItem alloc] init] autorelease];
item.specialItemType = type;
item.stringValue = value;

Declared In

GBParagraphSpecialItem.h

Instance Methods

descriptionStringValue

String value as used in debug description.

- (NSString *)descriptionStringValue

Discussion

By default this returns string value trimmed to a predefined maximum length, but subclasses can override to provide their specific implementation. This is only used for debugging purposes and should not be used for any output generation! See description method implementation for details.

Sending this message is equivalent to sending descriptionForStringValue: to receiver and passing it stringValue as the parameter.

Declared In

GBParagraphItem.h@48 -> GBParagraphSpecialItem.m

isBugSpecialItem

Returns YES if this is bug special item. This is only used to simplify output generation!

- (BOOL)isBugSpecialItem

Declared In

GBParagraphItem.h@72 -> GBParagraphSpecialItem.m

isExampleSpecialItem

Returns YES if this is example special item. This is only used to simplify output generation!

- (BOOL)isExampleSpecialItem

Declared In

GBParagraphItem.h@75 -> GBParagraphSpecialItem.m

isWarningSpecialItem

Returns YES if this is warning special item. This is only used to simplify output generation!

- (BOOL)isWarningSpecialItem

Declared In

GBParagraphItem.h@69 -> GBParagraphSpecialItem.m

registerParagraph:

Registers the given paragraph.

- (void)registerParagraph:(GBCommentParagraph *)paragraph

Parameters

paragraph
GBCommentParagraph to register.

Exceptions

NSException
Thrown if the given item is nil.

Declared In

GBParagraphSpecialItem.h