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

Overview

Handles ordered and unordered lists for a GBCommentParagraph.

Lists are containers for list items which are instances of GBCommentParagraph. This allows us to form a tree structure with nested lists and other paragraph items. Lists can be ordered or unordered, the type can be determined by testing the value of isOrdered property.

Tasks

Initialization & disposal

Values

  • – registerItem: Registers the given item by adding it to the end of items array.
  •   isOrdered Specifies whether the list is ordered (YES) or unordered (NO). property
  •   listItems Array of all list items as instances of GBCommentParagraph in the same order as in comment text. property

Other Methods

Properties

isOrdered

Specifies whether the list is ordered (YES) or unordered (NO).

@property (assign) BOOL isOrdered

Declared In

GBParagraphListItem.h

listItems

Array of all list items as instances of GBCommentParagraph in the same order as in comment text.

@property (readonly) NSArray *listItems

Declared In

GBParagraphListItem.h

Class Methods

orderedParagraphListItem

Returns new autoreleased list item with ordered set to YES.

+ (id)orderedParagraphListItem

Discussion

This is equivalent to initializing with designated initialized (init) and setting ordered property value of initializaed object to YES.

Declared In

GBParagraphListItem.h

unorderedParagraphListItem

Returns new autoreleased list item with ordered set to NO.

+ (id)unorderedParagraphListItem

Discussion

This is equivalent to initializing with designated initialized (init) and setting ordered property value of initializaed object to NO.

Declared In

GBParagraphListItem.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 -> GBParagraphListItem.m

isOrderedListItem

Returns YES if this is ordered list item. This is only used to simplify output generation!

- (BOOL)isOrderedListItem

Declared In

GBParagraphItem.h@63 -> GBParagraphListItem.m

isUnorderedListItem

Returns YES if this is unordered list item. This is only used to simplify output generation!

- (BOOL)isUnorderedListItem

Declared In

GBParagraphItem.h@66 -> GBParagraphListItem.m

registerItem:

Registers the given item by adding it to the end of items array.

- (void)registerItem:(GBCommentParagraph *)item

Parameters

item
GBCommentParagraph to register.

Exceptions

NSException
Thrown if the given item is nil.

Declared In

GBParagraphListItem.h

stringValue

Item's string value.

- (NSString *)stringValue

Discussion

String value is used for output generation in case of leaf items. For container items, string value should not be used for output generation unless specified otherwise!

Declared In

GBParagraphItem.h@38 -> GBParagraphListItem.m